etui/widgets/tabs
Types
pub type Tabs {
Tabs(
labels: List(String),
active: Int,
fg: style.Color,
bg: style.Color,
active_style: style.Style,
divider: String,
padding: Int,
)
}
Constructors
-
Tabs( labels: List(String), active: Int, fg: style.Color, bg: style.Color, active_style: style.Style, divider: String, padding: Int, )Arguments
- active
-
0-based index of the active tab.
- divider
-
String rendered between tabs.
- padding
-
Padding spaces inside each tab label.
Values
pub fn render(
buf: buffer.Buffer,
area: geometry.Rect,
t: Tabs,
) -> buffer.Buffer
Render the tab bar into the first row of area.
pub fn with_active_style(t: Tabs, s: style.Style) -> Tabs
pub fn with_colors(
t: Tabs,
fg: style.Color,
bg: style.Color,
) -> Tabs