class

Egui::TitleBarTabs

Inherits Reference < Object

Constants

CAPTION_H = 44.0

Caption height while the tabs are installed (Win11 Notepad's tabbed title bar is taller than the plain 32pt caption).

FIRST_INSET = 8.0
FONT = 16.0
HOVER = Color32.new(42, 42, 42, 255)

Win11 Notepad dark palette: cards sit on the #202020 caption. The ACTIVE card's fill is NOT a constant — it reuses the theme's panel_fill (the menu bar's color), so the active card visually merges with the bar below it, Notepad/Edge-style, in every theme.

HOVER_LIGHT = Color32.new(202, 202, 202, 255)

The light counterparts: cards sit on the #D6D6D6 caption (darker than the theme's panel_fill, so the active card — panel_fill — reads against the strip).

ICON = 11.0
ICON_GAP = 8.0
LAYER = LayerId.new(Order::Middle, Id.from("title_bar_tabs"), 40)

Cards above the drag strip (z=0), below the caption buttons (z=50) — see the class doc.

MIN_W = 110.0
NEW_BOX = 30.0
NEW_GAP = 8.0
NEW_HOVER = Color32.new(47, 47, 47, 255)
NEW_HOVER_LIGHT = Color32.new(202, 202, 202, 255)
PAD_X = 10.0
ROUNDING = 8.0
SCROLL_ID = Id.from("title_bar_tabs/scroll")
TAB_TOP_GAP = 8.0
TEXT_ACTIVE = Color32.new(255, 255, 255, 255)
TEXT_ACTIVE_LIGHT = Color32.new(32, 32, 32, 255)
TEXT_IDLE = Color32.new(200, 200, 200, 255)
TEXT_IDLE_LIGHT = Color32.new(96, 96, 96, 255)
X_BOX = 20.0
X_HOVER = Color32.new(80, 80, 80, 255)
X_HOVER_LIGHT = Color32.new(196, 196, 196, 255)
X_ROUND = 4.0

Class methods

palette(ctx : Context)

The card palette, dark or light, picked from the app theme — the strip follows ctx.theme like the frame it lives in.

Source
show(ctx : Context, area : Rect, titles : Array(String), selected : Int32, dirty : Array(Bool) = [] of Bool, on_select : Int32 -> | Nil = nil, on_close : Int32 -> | Nil = nil, on_new : -> Nil | Nil = nil) : Nil

Show the strip: paints into area (the WindowFrame content area) and fires at most one callback this frame. dirty marks unsaved tabs (dot instead of X, Notepad's marker).

Styling: every card reads its geometry and colors through the title_bar.tab class (+ per-element inspector overrides — see TabPart); the constants above are the unset defaults.

Source

Nested types