class UIng::Toolbar

Overview

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

Toolbar is not a Control. Free it explicitly after detaching it from its window. Images passed to toolbar items are borrowed by libui-ng and must remain alive until the toolbar is freed.

Defined in:

uing/toolbar.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def append_button(text : String, icon : Image | Nil = nil) : ToolbarItem #

[View source]
def append_flexible_space : Nil #

[View source]
def append_separator : Nil #

[View source]
def append_space : Nil #

[View source]
def append_toggle_button(text : String, icon : Image | Nil = nil) : ToolbarItem #

[View source]
def attached? : Bool #

[View source]
def display_mode : DisplayMode #

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


[View source]
def display_mode=(mode : DisplayMode) : Nil #

Sets the display mode before the toolbar is first attached to a window. macOS displays DisplayMode::IconAndTextHorizontal vertically.


[View source]
def free : Nil #

[View source]
def released? : Bool #

[View source]
def to_unsafe #

[View source]