ratatui_toolkit/primitives/menu_bar/
mod.rs1pub mod constructors;
6pub mod functions;
7pub mod methods;
8pub mod traits;
9
10use ratatui::layout::Rect;
11use ratatui::style::Style;
12
13#[derive(Debug, Clone)]
15pub struct MenuItem {
16 pub name: String,
18 pub icon: Option<String>,
20 pub value: usize,
22 pub selected: bool,
24 pub hovered: bool,
26 pub area: Option<Rect>,
28}
29
30#[derive(Debug, Clone)]
32pub struct MenuBar {
33 pub items: Vec<MenuItem>,
34 pub area: Option<Rect>,
35
36 pub normal_style: Style,
38 pub selected_style: Style,
39 pub hover_style: Style,
40 pub selected_hover_style: Style,
41}