class TUI::Widget::Button

Defined in:

tui/widget/button.cr

Constructors

Instance Method Summary

Instance methods inherited from class TUI::Widget::MenuItem

height height, label : String | Nil label, label=(label : String | Nil) label=, paint(painter : TUI::Painter) paint, to_s(io : IO) to_s, width : Int32 width

Constructor methods inherited from class TUI::Widget::MenuItem

new(parent : Widget | Nil = nil, label : Nil | String = nil) new

Instance methods inherited from class TUI::Widget

<<(win : Widget) <<, app : Application app, app=(app : Application | Nil) app=, bind(key : Key | Char, &block : Event::Key -> Bool) : self
bind(mouse : MouseStatus, &block : Event::Mouse -> Bool) : self
bind
, border : Border border, border=(border : Border | Nil) border=, dirty : Bool dirty, dirty=(v : Bool) dirty=, dirty? : Bool dirty?, dump_tree_rect(io : IO, e : Event::Mouse, far = 0) dump_tree_rect, focused : Bool focused, focused=(focused : Bool) focused=, h(*args, **options)
h(*args, **options, &)
h
, handle(event : Event::Resize) : Bool
handle(event : Event::Draw) : Bool
handle(event : Event::Key) : Bool
handle(event : Event::Mouse) : Bool
handle
, height(w : Int32) : Int32 | Nil
height : Int32 | Nil
height
, hover : Tuple(Int32, Int32) | Nil hover, hover=(hover : Tuple(Int32, Int32) | Nil) hover=, key(event : Event::Key) : Bool key, layout : Layout layout, layout=(layout : Layout | Nil) layout=, mouse(event : Event::Mouse) : Bool mouse, paint(surface : Painter) : Bool paint, parent : Widget | Nil parent, parent! : Widget parent!, parent=(new_parent : TUI::Widget | Nil) parent=, rect : Rect rect, rect=(rect : Rect) rect=, rect? : Rect | Nil rect?, set_focused(val : Bool) set_focused, set_hover(e : Event::Mouse)
set_hover(xy : Tuple(Int32, Int32) | Nil)
set_hover
, tree_focused? : Bool tree_focused?, unbind(key : Key | Char) : self
unbind(mouse : MouseStatus) : self
unbind
, unbind_all : self unbind_all, unbind_keys : self unbind_keys, unbind_mouse : self unbind_mouse, w(*args, **options)
w(*args, **options, &)
w
, width(h : Int32) : Int32 | Nil
width : Int32 | Nil
width
, x(*args, **options)
x(*args, **options, &)
x
, y(*args, **options)
y(*args, **options, &)
y

Constructor methods inherited from class TUI::Widget

new(parent : TUI::Widget | Nil = nil) new

Constructor Detail

def self.new(parent : Widget | Nil = nil, lab = "Unset Label", &block) #

[View source]

Instance Method Detail

def activated : Proc(Nil) #

[View source]
def activated=(activated : Proc(Nil)) #

[View source]