TextUi::Widget
Inherits Reference / Object
Constructors
new(parent : Widget, x : Int32 = 0, y : Int32 = 0, width : Int32 = 1, height : Int32 = 1)
SourceClass methods
text_dimensions(text : String, max_width = -1, max_height = -1)
SourceInstance methods
absolute_height
Sourceabsolute_width
Sourceabsolute_x
Sourceabsolute_y
Sourcechildren
Sourcechildren?(widget : Widget) : Bool
Sourcechildren_focused?
Sourceclear_line(y : Int32, format = @default_format)
Sourcedefault_format
Sourcedefault_format=(default_format : Format)
Sourcedestroy
Sourceeach_char_pos(x, y, text : String, &)
Sourcefind(x, y, dbg = 0) : Widget | Nil
Finds the topmost widget at x/y coordinates, x/y are in absolute coordinates.
focus
Sourcefocusable=(focusable : Bool)
Sourcefocusable?
Sourcefocused=(focused : Bool)
Sourcefocused?
Sourceheight
Sourceheight=(height : Int32)
Sourceinvalidate
Sourcemove(x : Int32, y : Int32)
Sourceparent
Sourceprint_char(x : Int32, y : Int32, chr : Char, format : Format = @default_format)
Sourceprint_line(x : Int32, y : Int32, text : String, format : Array(Format) | Format = @default_format, offset = 0, count = text.size, width = 0, ellipsis = true) : Nil
Sourceprint_lines(x, y, text : String, format : Format = @default_format, width = 0)
Sourcerender
Sourcerender_cursor
Sourcerender_pending=(render_pending : Bool)
Sourcerender_pending?
Sourceresize(width : Int32, height : Int32)
Sourceset_cursor(x, y)
Sourceui
Sourcevisible=(visible : Bool)
Sourcevisible?
Sourcewidget_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.
width
Sourcewidth=(width : Int32)
Sourcex=(x : Int32)
Sourcey=(y : Int32)
Source