abstract class TextUi::Widget
- TextUi::Widget
- Reference
- Object
Direct Known Subclasses
- TextUi::Box
- TextUi::Label
- TextUi::List
- TextUi::StackedWidget
- TextUi::StatusBar
- TextUi::Table
- TextUi::TextEditor
- TextUi::TextInput
- TextUi::Ui
Defined in:
textui/widget.crConstructors
Class Method Summary
Instance Method Summary
- #absolute_height
- #absolute_width
- #absolute_x
- #absolute_y
- #children : Array(TextUi::Widget)
- #children?(widget : Widget) : Bool
- #children_focused?
- #clear_line(y : Int32, format = @default_format)
-
#contains?(x, y)
x/y are in absolute coordinates
- #default_format : Format
- #default_format=(default_format : Format)
- #destroy
- #each_char_pos(x, y, text : String, &)
-
#find(x, y, dbg = 0) : Widget | Nil
Finds the topmost widget at x/y coordinates, x/y are in absolute coordinates.
- #focus
- #focusable=(focusable : Bool)
- #focusable? : Bool
- #focused=(focused : Bool)
- #focused? : Bool
- #height : Int32
- #height=(height : Int32)
- #invalidate
- #move(x : Int32, y : Int32)
- #parent : TextUi::Widget
- #print_char(x : Int32, y : Int32, chr : Char, format : Format = @default_format)
- #print_line(x : Int32, y : Int32, text : String, format : Array(Format) | Format = @default_format, offset = 0, count = text.size, width = 0, ellipsis = true) : Nil
- #print_lines(x, y, text : String, format : Format = @default_format, width = 0)
- #render
- #render_cursor
- #render_pending=(render_pending : Bool)
- #render_pending? : Bool
- #resize(width : Int32, height : Int32)
- #set_cursor(x, y)
- #ui
- #visible=(visible : Bool)
- #visible? : Bool
-
#widget_too_small?
Return true if the widget is too small to be rendered.
- #width : Int32
- #width=(width : Int32)
- #x : Int32
- #x=(x : Int32)
- #y : Int32
- #y=(y : Int32)
Constructor Detail
def self.new(parent : Widget, x : Int32 = 0, y : Int32 = 0, width : Int32 = 1, height : Int32 = 1)
#
Class Method Detail
Instance Method Detail
Finds the topmost widget at x/y coordinates, x/y are in absolute coordinates.
def print_line(x : Int32, y : Int32, text : String, format : Array(Format) | Format = @default_format, offset = 0, count = text.size, width = 0, ellipsis = true) : Nil
#
def widget_too_small?
#
Return true if the widget is too small to be rendered. If a widget is too small it wont be rendered or receive any input events.