class

Tui::MenuBar

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

Constructors

new(id : String | Nil = nil)
Source

Instance methods

active_bg
Source
active_bg=(active_bg : Color)
Source
active_fg
Source
active_fg=(active_fg : Color)
Source
add_menu(label : String, hotkey : Char | Nil = nil, &block : Array(MenuAction) -> ) : Nil
Source
add_menu(menu : MenuItem) : Nil
Source
bg_color

Style - MC colors

Source
bg_color=(bg_color : Color)

Style - MC colors

Source
close
Source
fg_color
Source
fg_color=(fg_color : Color)
Source
hotkey_color
Source
hotkey_color=(hotkey_color : Color)
Source
on_close
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
open(menu_index : Int32 = 0) : Nil
Source
open?
Source
render(buffer : Buffer, clip : Rect) : Nil

Override to render widget content

Source
render_rect

Override render_rect to include dropdown area when open

Source
shadow_bg
Source
shadow_bg=(shadow_bg : Color)
Source
shadow_fg
Source
shadow_fg=(shadow_fg : Color)
Source
z_index

High z_index when dropdown is open so it renders on top

Source

Nested types