src/structs/states.rs

46e7ed5b32a7417aabe4491e60a597344597d330
youtube-tui/src/structs/states.rs history · blame · raw

23 lines · 473 bytes

 1use tui::layout::Constraint;
 2
 3use crate::app::pages::{global::GlobalItem, item_info::ItemInfoItem, main_menu::MainMenuItem};
 4
 5#[derive(Debug, Clone)]
 6pub enum Item {
 7    Global(GlobalItem),
 8    MainMenu(MainMenuItem),
 9    ItemInfo(ItemInfoItem),
10}
11
12#[derive(Debug, Clone)]
13pub struct Row {
14    pub items: Vec<RowItem>,
15    pub centered: bool,
16    pub height: Constraint,
17}
18
19#[derive(Debug, Clone)]
20pub struct RowItem {
21    pub item: Item,
22    pub constraint: Constraint,
23}