class UIng::Toolbar

Overview

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.

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_separator : 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, including while 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]