class

Tui::TabbedPanel

Inherits Tui::Widget / Tui::Reactive / Reference / Object

Constructors

new(id : String | Nil = nil)
Source

Instance methods

active_tab
Source
active_tab=(index : Int32) : Nil
Source
active_tab_bg
Source
active_tab_bg=(active_tab_bg : Color)
Source
active_tab_fg
Source
active_tab_fg=(active_tab_fg : Color)
Source
active_tab_id
Source
add_position(pos : TabPosition) : Nil
Source
add_tab(id : String, label : String, tooltip : String | Nil = nil, &block : -> Widget | Nil) : Nil
Source
add_tab(tab : Tab) : Nil
Source
border_color
Source
border_color=(border_color : Color)
Source
border_style
Source
border_style=(border_style : Panel::BorderStyle)
Source
chevron_char
Source
chevron_char=(chevron_char : Char)
Source
close_active_tab
Source
close_overflow
Source
close_tab(id : String) : Bool
Source
content_bg
Source
content_bg=(content_bg : Color)
Source
content_fg
Source
content_fg=(content_fg : Color)
Source
enable_overflow

Overflow settings

Source
enable_overflow=(enable_overflow : Bool)

Overflow settings

Source
find_widget_at(x : Int32, y : Int32) : Widget | Nil

Override find_widget_at to only consider active tab's content This prevents inactive tabs' stale rects from interfering with hit testing

Source
focus_content

Focus the content of the active tab

Source
focused_tab_bg
Source
focused_tab_bg=(focused_tab_bg : Color)
Source
focused_tab_fg
Source
focused_tab_fg=(focused_tab_fg : Color)
Source
on_event(event : Event) : Bool

Handle events using DOM-like capture/bubble model KeyEvents: handled when TabbedPanel is target (tab bar focused) MouseEvents: handled when click is on tab bar area Tab from content bubbles up - parent decides where focus goes

Source
on_tab_close
Source
on_tab_switch
Source
overflow_active_bg
Source
overflow_active_bg=(overflow_active_bg : Color)
Source
overflow_active_fg
Source
overflow_active_fg=(overflow_active_fg : Color)
Source
overflow_bg
Source
overflow_bg=(overflow_bg : Color)
Source
overflow_fg
Source
overflow_fg=(overflow_fg : Color)
Source
positions
Source
positions=(positions : Set(TabPosition))
Source
remove_position(pos : TabPosition) : Nil
Source
rename_tab(id : String, new_label : String) : Bool

Rename a tab's label by id

Source
render(buffer : Buffer, clip : Rect) : Nil

Override to render widget content

Source
show_close_button
Source
show_close_button=(show_close_button : Bool)
Source
switch_to(id : String) : Bool
Source
tab_bg

Style

Source
tab_bg=(tab_bg : Color)

Style

Source
tab_fg
Source
tab_fg=(tab_fg : Color)
Source
tabs
Source
toggle_overflow
Source
vertical_tab_height

Tab size for vertical tabs

Source
vertical_tab_height=(vertical_tab_height : Int32)

Tab size for vertical tabs

Source

Nested types