class

UIng::Toolbar

Inherits UIng::BlockConstructor < Reference < Object

A native toolbar that can be attached to one Window at a time.

Toolbar is not a Control. An attached toolbar is freed when its window is destroyed. Detach it first to keep using it. Item icons are copied.

Constructors

new(*args, &)
Source
new(*args, **kwargs, &)
Source

Instance methods

append_button(text : String, icon : Image | Nil = nil) : ToolbarItem
Source
append_button(text : String, icon : Image | Nil = nil, &) : ToolbarItem

Configures the new item and returns it, regardless of the block result.

Source
append_button(text : String, icon : CrImage::Image) : ToolbarItem
Source
append_button(text : String, icon : CrImage::Image, &) : ToolbarItem
Source
append_separator
Source
append_toggle_button(text : String, icon : Image | Nil = nil) : ToolbarItem
Source
append_toggle_button(text : String, icon : Image | Nil = nil, &) : ToolbarItem
Source
append_toggle_button(text : String, icon : CrImage::Image) : ToolbarItem
Source
append_toggle_button(text : String, icon : CrImage::Image, &) : ToolbarItem
Source
attached?
Source
display_mode

Returns the requested display mode. The default is DisplayMode::IconAndTextVertical.

Source
display_mode=(mode : DisplayMode) : Nil

Sets the display mode, including while attached to a window. macOS displays DisplayMode::IconAndTextHorizontal vertically.

Source
free
Source
released?
Source
to_unsafe
Source

Nested types