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.

Included Modules

Defined in:

uing/crimage.cr
uing/toolbar.cr

Constructors

Instance Method Summary

Macros inherited from module UIng::BlockConstructor

block_constructor block_constructor

Constructor Detail

def self.new(*args, &) #

[View source]
def self.new(*args, **kwargs, &) #

[View source]
def self.new #

[View source]

Instance Method Detail

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

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

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


[View source]
def append_button(text : String, icon : CrImage::Image) : ToolbarItem #

[View source]
def append_button(text : String, icon : CrImage::Image, &) : ToolbarItem #

[View source]
def append_separator : Nil #

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

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

[View source]
def append_toggle_button(text : String, icon : CrImage::Image) : ToolbarItem #

[View source]
def append_toggle_button(text : String, icon : CrImage::Image, &) : 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]