class TUI::Widget::MenuItem
- TUI::Widget::MenuItem
- TUI::Widget
- Reference
- Object
Direct Known Subclasses
Defined in:
tui/widget/menu_item.crConstructors
Instance Method Summary
- #height
- #label : String | Nil
- #label=(label : String | Nil)
-
#paint(painter : TUI::Painter)
Override to draw in the widget
-
#to_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
- #width : Int32
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) : selfbind(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
Instance Method Detail
def paint(painter : TUI::Painter)
#
Description copied from class TUI::Widget
Override to draw in the widget
def to_s(io : IO)
#
Description copied from class Reference
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>