class

Egui::Sidebar

Inherits Egui::Widget < Reference < Object

Constants

CLOSE_CLASS = "sidebar.close"
ROOT_CLASS = "sidebar"

Element classes for StyleSheet tweaks from app code: ctx.stylesheet.rule(Sidebar::TAB_CLASS, …)

SECTION_CLASS = "sidebar.section"
TAB_CLASS = "sidebar.tab"

Constructors

new(sections : Array(Section), selected_section : Int32 = 0, selected_tab : Int32 = 0)
Source

Instance methods

closed

The tab whose close button was clicked this frame — {section, tab} indices, nil when nothing closed. The app removes the tab from its own state (and fixes the selection).

Source
section_title

The selected section's title (for headings / dispatch).

Source
selected_section
Source
selected_tab
Source
style_class

CSS-like class this widget styles under in the global StyleSheet (nil = not registered yet). Widgets adopt the class system gradually; see Button and containers/sidebar.cr for the reference wiring (base + state overlays).

Source
tab_title

The selected tab's title.

Source
ui(ui : Ui) : Response
Source

Nested types