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)
SourceInstance 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).
selected_section
Sourceselected_tab
Sourcestyle_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).
ui(ui : Ui) : Response
Source