class

Tui::IconSidebar

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

Constructors

new(id : String | Nil = nil)
Source

Instance methods

active_id

Active item

Source
active_index
Source
active_index=(index : Int32) : Nil
Source
active_indicator_style
Source
active_indicator_style=(active_indicator_style : Style)
Source
active_style
Source
active_style=(active_style : Style)
Source
add_item(id : String, icon : Char, label : String, tooltip : String | Nil = nil) : SidebarItem

Add item

Source
badge_style
Source
badge_style=(badge_style : Style)
Source
bg_style
Source
bg_style=(bg_style : Style)
Source
border_style
Source
border_style=(border_style : Style)
Source
hover_style
Source
hover_style=(hover_style : Style)
Source
icon_style
Source
icon_style=(icon_style : Style)
Source
items

Get items

Source
on_event(event : Event) : Bool

Override to handle events for this widget (target/bubble phase) Called after children have had a chance to handle the event

Source
on_select

Callback

Source
preferred_width

Get required width for layout

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

Override to render widget content

Source
select(id : String) : Bool
Source
set_badge(id : String, count : Int32 | Nil) : Bool

Set badge on item

Source
show_active_indicator=(show_active_indicator : Bool)
Source
show_active_indicator?
Source
show_border=(show_border : Bool)
Source
show_border?
Source
width

Visual settings

Source
width=(width : Int32)

Visual settings

Source

Nested types