Lysa.ui  0.0
Lysa 3D Engine
Window Class Referenceabstract

Detailed Description

A UI window that owns a root Widget hierarchy and is managed by the WindowManager.

Lua full name: lysa.ui.Window

Public Member Functions

nil set_widget (child: Widget|nil, resources: string|nil, padding: number|nil)
 Replaces the root widget. Call set_widget(nil) first if a layout was previously applied. More...
 
nil set_focused_widget (widget: Widget)
 Moves keyboard focus to the specified widget within this window. More...
 
nil set_pos (x: number, y: number)
 Moves the window's bottom-left corner to the given position. More...
 
nil close ()
 Closes and removes the window (effective at the start of the next frame). More...
 
nil show ()
 Makes the window visible (effective at the start of the next frame). More...
 
nil hide ()
 Hides the window without destroying it (effective at the start of the next frame). More...
 
nil set_transparency (alpha: number)
 Sets the global alpha transparency for the entire window (0.0 = invisible, 1.0 = fully opaque). More...
 
nil set_minimum_size (width: number, height: number)
 Sets the minimum dimensions the user can resize the window to (default 2×2). More...
 
nil set_maximum_size (width: number, height: number)
 Sets the maximum dimensions the user can resize the window to. More...
 
nil refresh ()
 Forces a full redraw of all widgets in this window at the start of the next frame. More...
 
Widget add_child (child: Widget, alignment: integer, resource: string|nil)
 Adds a pre-constructed widget to the root widget with the given alignment and optional resource string. More...
 
nil remove_child (child: Widget)
 Removes the given widget from the root widget. More...
 
Text create_text (alignment: Alignment, text: string)
 Creates and adds a Text widget. More...
 
Text create_text (resource: string, alignment: Alignment, text: string)
 Creates and adds a Text widget, loading its style from a resource string. More...
 
Panel create_panel (alignment: Alignment)
 Creates and adds a Panel widget. More...
 
Panel create_panel (resource: string, alignment: Alignment)
 Creates and adds a Panel widget, loading its style from a resource string. More...
 
Popup create_popup (x: number, y: number)
 Creates and adds a Popup widget at the given position, rendered on top of siblings. More...
 
Popup create_popup (resource: string, x: number, y: number)
 Creates and adds a Popup widget at the given position, loading its style from a resource string. More...
 
Tooltip create_tooltip (text: string, x: number, y: number)
 Creates and adds a Tooltip widget hanging from the given position. More...
 
Tooltip create_tooltip (resource: string, text: string, x: number, y: number)
 Creates and adds a Tooltip widget hanging from the given position, loading its style from a resource string. More...
 
Box create_box (alignment: Alignment)
 Creates and adds a Box widget (bordered panel). More...
 
Box create_box (resource: string, alignment: Alignment)
 Creates and adds a Box widget (bordered panel), loading its style from a resource string. More...
 
Button create_button (alignment: Alignment)
 Creates and adds a Button widget. More...
 
Button create_button (resource: string, alignment: Alignment)
 Creates and adds a Button widget, loading its style from a resource string. More...
 
ToggleButton create_toggle_button (alignment: Alignment)
 Creates and adds a ToggleButton widget. More...
 
ToggleButton create_toggle_button (resource: string, alignment: Alignment)
 Creates and adds a ToggleButton widget, loading its style from a resource string. More...
 
RadioButton create_radio_button (alignment: Alignment)
 Creates and adds a RadioButton widget. More...
 
RadioButton create_radio_button (resource: string, alignment: Alignment)
 Creates and adds a RadioButton widget, loading its style from a resource string. More...
 
HLine create_hline (alignment: Alignment)
 Creates and adds a horizontal Line widget. More...
 
HLine create_hline (resource: string, alignment: Alignment)
 Creates and adds a horizontal Line widget, loading its style from a resource string. More...
 
VLine create_vline (alignment: Alignment)
 Creates and adds a vertical Line widget. More...
 
VLine create_vline (resource: string, alignment: Alignment)
 Creates and adds a vertical Line widget, loading its style from a resource string. More...
 
Frame create_frame (alignment: Alignment, title: string)
 Creates and adds a Frame widget with the given title. More...
 
Frame create_frame (resource: string, alignment: Alignment, title: string)
 Creates and adds a Frame widget with the given title, loading its style from a resource string. More...
 
TextEdit create_text_edit (alignment: Alignment, text: string|nil)
 Creates and adds a TextEdit widget with optional initial text. More...
 
TextEdit create_text_edit (resource: string, alignment: Alignment, text: string|nil)
 Creates and adds a TextEdit widget, loading its style from a resource string. More...
 
RichTextArea create_rich_text_area (alignment: Alignment, bbcode: string|nil)
 Creates and adds a RichTextArea widget with the given alignment and optional BBCode markup. More...
 
RichTextArea create_rich_text_area (resource: string, alignment: Alignment, bbcode: string|nil)
 Creates and adds a RichTextArea widget, loading its style from a resource string. More...
 
Image create_image (alignment: Alignment)
 Creates and adds an Image widget. More...
 
Image create_image (resource: string, alignment: Alignment)
 Creates and adds an Image widget, loading its style from a resource string. More...
 
Image create_image (resource: string, alignment: Alignment, autoresize: boolean, fixedsize: boolean)
 Creates and adds an Image widget with auto-resize and fixed-size options. More...
 
VScrollBar create_vscrollbar (alignment: Alignment)
 Creates and adds a vertical ScrollBar widget. More...
 
VScrollBar create_vscrollbar (resource: string, alignment: Alignment)
 Creates and adds a vertical ScrollBar widget, loading its style from a resource string. More...
 
HScrollBar create_hscrollbar (alignment: Alignment)
 Creates and adds a horizontal ScrollBar widget. More...
 
HScrollBar create_hscrollbar (resource: string, alignment: Alignment)
 Creates and adds a horizontal ScrollBar widget, loading its style from a resource string. More...
 
TreeView create_tree_view (alignment: Alignment)
 Creates and adds a TreeView widget. More...
 
TreeView create_tree_view (resource: string, alignment: Alignment)
 Creates and adds a TreeView widget, loading its style from a resource string. More...
 
Widget create_widget (alignment: Alignment)
 Creates and adds a transparent container Widget. More...
 
Widget create_widget (resource: string, alignment: Alignment)
 Creates and adds a transparent container Widget, loading its style from a resource string. More...
 
ListBox create_list_box (alignment: Alignment)
 Creates and adds a ListBox widget. More...
 
ListBox create_list_box (resource: string, alignment: Alignment)
 Creates and adds a ListBox widget, loading its style from a resource string. More...
 
ProgressBar create_progress_bar (alignment: Alignment)
 Creates and adds a ProgressBar widget. More...
 
ProgressBar create_progress_bar (resource: string, alignment: Alignment)
 Creates and adds a ProgressBar widget, loading its style from a resource string. More...
 
VProgressBar create_vprogress_bar (alignment: Alignment)
 Creates and adds a vertical ProgressBar widget. More...
 
VProgressBar create_vprogress_bar (resource: string, alignment: Alignment)
 Creates and adds a vertical ProgressBar widget, loading its style from a resource string. More...
 
HProgressBar create_hprogress_bar (alignment: Alignment)
 Creates and adds a horizontal ProgressBar widget. More...
 
HProgressBar create_hprogress_bar (resource: string, alignment: Alignment)
 Creates and adds a horizontal ProgressBar widget, loading its style from a resource string. More...
 
ScrollBox create_scroll_box (alignment: Alignment)
 Creates and adds a ScrollBox widget. More...
 
ScrollBox create_scroll_box (resource: string, alignment: Alignment)
 Creates and adds a ScrollBox widget, loading its style from a resource string. More...
 
CheckBox create_check_box (alignment: Alignment)
 Creates and adds a CheckBox widget. More...
 
CheckBox create_check_box (resource: string, alignment: Alignment)
 Creates and adds a CheckBox widget, loading its style from a resource string. More...
 
CheckMark create_check_mark (alignment: Alignment)
 Creates and adds a CheckMark widget with the given alignment. More...
 
CheckMark create_check_mark (resource: string, alignment: Alignment)
 Creates and adds a CheckMark widget, loading its style from a resource string. More...
 
CrossMark create_cross_mark (alignment: Alignment)
 Creates and adds a CrossMark widget with the given alignment. More...
 
CrossMark create_cross_mark (resource: string, alignment: Alignment)
 Creates and adds a CrossMark widget, loading its style from a resource string. More...
 
Arrow create_arrow (alignment: Alignment, orientation: ArrowOrientation)
 Creates and adds an Arrow widget pointing to the given direction. More...
 
Arrow create_arrow (resource: string, alignment: Alignment, orientation: ArrowOrientation)
 Creates and adds an Arrow widget, loading its style from a resource string. More...
 
Menu create_menu (alignment: Alignment)
 Creates and adds a Menu widget. More...
 
Menu create_menu (resource: string, alignment: Alignment)
 Creates and adds a Menu widget, loading its style from a resource string. More...
 
TabBar create_tab_bar (alignment: Alignment)
 Creates and adds a TabBar widget with the given alignment. More...
 
TabBar create_tab_bar (resource: string, alignment: Alignment)
 Creates and adds a TabBar widget, loading its style from a resource string. More...
 
TabContainer create_tab_container (alignment: Alignment)
 Creates and adds a TabContainer widget with the given alignment. More...
 
TabContainer create_tab_container (resource: string, alignment: Alignment)
 Creates and adds a TabContainer widget, loading its style from a resource string. More...
 
Grid create_grid (alignment: Alignment)
 Creates and adds an empty Grid widget with the given alignment. More...
 
Grid create_grid (alignment: Alignment, rows: integer, columns: integer)
 Creates and adds a Grid widget with the given number of rows and columns. More...
 
Grid create_grid (resource: string, alignment: Alignment, rows: integer, columns: integer)
 Creates and adds a Grid widget, loading its style from a resource string. More...
 
Table create_table (alignment: Alignment)
 Creates and adds a Table widget with the given alignment. More...
 
Table create_table (resource: string, alignment: Alignment)
 Creates and adds a Table widget, loading its style from a resource string. More...
 
FoldableContainer create_foldable_container (alignment: Alignment)
 Creates and adds a FoldableContainer widget with the given alignment. More...
 
FoldableContainer create_foldable_container (resource: string, alignment: Alignment)
 Creates and adds a FoldableContainer widget, loading its style from a resource string. More...
 
HSlider create_hslider (alignment: Alignment)
 Creates and adds a horizontal Slider widget with the given alignment. More...
 
HSlider create_hslider (resource: string, alignment: Alignment)
 Creates and adds a horizontal Slider widget, loading its style from a resource string. More...
 
VSlider create_vslider (alignment: Alignment)
 Creates and adds a vertical Slider widget with the given alignment. More...
 
VSlider create_vslider (resource: string, alignment: Alignment)
 Creates and adds a vertical Slider widget, loading its style from a resource string. More...
 
HColorSlider create_hcolor_slider (alignment: Alignment)
 Creates and adds a horizontal ColorSlider widget with the given alignment. More...
 
HColorSlider create_hcolor_slider (resource: string, alignment: Alignment)
 Creates and adds a horizontal ColorSlider widget, loading its style from a resource string. More...
 
VColorSlider create_vcolor_slider (alignment: Alignment)
 Creates and adds a vertical ColorSlider widget with the given alignment. More...
 
VColorSlider create_vcolor_slider (resource: string, alignment: Alignment)
 Creates and adds a vertical ColorSlider widget, loading its style from a resource string. More...
 
Knob create_knob (alignment: Alignment)
 Creates and adds a Knob widget with the given alignment. More...
 
Knob create_knob (resource: string, alignment: Alignment)
 Creates and adds a Knob widget, loading its style from a resource string. More...
 
ColorWheel create_color_wheel (alignment: Alignment)
 Creates and adds a ColorWheel widget with the given alignment. More...
 
ColorWheel create_color_wheel (resource: string, alignment: Alignment)
 Creates and adds a ColorWheel widget, loading its style from a resource string. More...
 
ColorPicker create_color_picker (alignment: Alignment)
 Creates and adds a ColorPicker widget with the given alignment. More...
 
ColorPicker create_color_picker (resource: string, alignment: Alignment)
 Creates and adds a ColorPicker widget, loading its style from a resource string. More...
 
ColorPickerButton create_color_picker_button (alignment: Alignment)
 Creates and adds a ColorPickerButton widget with the given alignment. More...
 
ColorPickerButton create_color_picker_button (resource: string, alignment: Alignment)
 Creates and adds a ColorPickerButton widget, loading its style from a resource string. More...
 
SpinBox create_spin_box (alignment: Alignment)
 Creates and adds a SpinBox widget with the given alignment. More...
 
SpinBox create_spin_box (resource: string, alignment: Alignment)
 Creates and adds a SpinBox widget, loading its style from a resource string. More...
 
SpinButtons create_spin_buttons (alignment: Alignment)
 Creates and adds a SpinButtons widget with the given alignment. More...
 
SpinButtons create_spin_buttons (resource: string, alignment: Alignment)
 Creates and adds a SpinButtons widget, loading its style from a resource string. More...
 
DropDownList create_drop_down_list (alignment: Alignment)
 Creates and adds a DropDownList widget with the given alignment. More...
 
DropDownList create_drop_down_list (resource: string, alignment: Alignment)
 Creates and adds a DropDownList widget, loading its style from a resource string. More...
 
IconImage create_icon_image (alignment: Alignment)
 Creates and adds an IconImage widget with the given alignment. More...
 
IconImage create_icon_image (resource: string, alignment: Alignment)
 Creates and adds an IconImage widget, loading its style from a resource string. More...
 
IconSVG create_icon_svg (alignment: Alignment)
 Creates and adds an IconSVG widget with the given alignment. More...
 
IconSVG create_icon_svg (resource: string, alignment: Alignment)
 Creates and adds an IconSVG widget, loading its style from a resource string. More...
 

Properties

integer resizeable_borders
 Bitmask of which window borders are user-resizable (see lysa.ui.ResizeableBorder).
 
Widget widget
 The root widget that covers the entire client area of the window. (read-only)
 
Style style
 The style drawing the widgets of this window; falls back to the WindowManager default style when none is set.
 
number width
 Client area width in virtual screen units.
 
number height
 Client area height in virtual screen units.
 
lysa.Rect rect
 Client area position and size as a Rect.
 
number x
 Current X position of the window's bottom-left corner.
 
number y
 Current Y position of the window's bottom-left corner.
 
boolean visible
 Whether the window is visible; changes take effect at the start of the next frame.
 
number minimum_width
 The minimum width the window can be resized to. (read-only)
 
number minimum_height
 The minimum height the window can be resized to. (read-only)
 
number maximum_width
 The maximum width the window can be resized to. (read-only)
 
number maximum_height
 The maximum height the window can be resized to. (read-only)
 
number aspect_ratio
 Aspect ratio (width / height) of the Window client area. (read-only)
 
lysa.Font font
 The default font applied to widgets that do not specify their own.
 
number font_scale
 The default font scale applied to widgets that do not specify their own.
 

Member Function Documentation

nil set_widget ( Widget|nil  child,
string|nil  resources,
number|nil  padding)

Replaces the root widget. Call set_widget(nil) first if a layout was previously applied.

Parameters
childWidget|nil
resourcesstring|nil
paddingnumber|nil
nil set_focused_widget ( Widget  widget)

Moves keyboard focus to the specified widget within this window.

Parameters
widgetWidget
nil set_pos ( number  x,
number  y)

Moves the window's bottom-left corner to the given position.

Parameters
xnumber
ynumber
nil close ( )

Closes and removes the window (effective at the start of the next frame).

nil show ( )

Makes the window visible (effective at the start of the next frame).

nil hide ( )

Hides the window without destroying it (effective at the start of the next frame).

nil set_transparency ( number  alpha)

Sets the global alpha transparency for the entire window (0.0 = invisible, 1.0 = fully opaque).

Parameters
alphanumber
nil set_minimum_size ( number  width,
number  height)

Sets the minimum dimensions the user can resize the window to (default 2×2).

Parameters
widthnumber
heightnumber
nil set_maximum_size ( number  width,
number  height)

Sets the maximum dimensions the user can resize the window to.

Parameters
widthnumber
heightnumber
nil refresh ( )

Forces a full redraw of all widgets in this window at the start of the next frame.

Widget add_child ( Widget  child,
integer  alignment,
string|nil  resource)

Adds a pre-constructed widget to the root widget with the given alignment and optional resource string.

Parameters
childWidget
alignmentinteger
resourcestring|nil
Returns
Widget
nil remove_child ( Widget  child)

Removes the given widget from the root widget.

Parameters
childWidget
Text create_text ( Alignment  alignment,
string  text)

Creates and adds a Text widget.

Parameters
alignmentAlignment
textstring
Returns
Text
Text create_text ( string  resource,
Alignment  alignment,
string  text)

Creates and adds a Text widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
textstring
Returns
Text
Panel create_panel ( Alignment  alignment)

Creates and adds a Panel widget.

Parameters
alignmentAlignment
Returns
Panel
Panel create_panel ( string  resource,
Alignment  alignment)

Creates and adds a Panel widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
Panel
Popup create_popup ( number  x,
number  y)

Creates and adds a Popup widget at the given position, rendered on top of siblings.

Parameters
xnumber
ynumber
Returns
Popup
Popup create_popup ( string  resource,
number  x,
number  y)

Creates and adds a Popup widget at the given position, loading its style from a resource string.

Parameters
resourcestring
xnumber
ynumber
Returns
Popup
Tooltip create_tooltip ( string  text,
number  x,
number  y)

Creates and adds a Tooltip widget hanging from the given position.

Parameters
textstring
xnumber
ynumber
Returns
Tooltip
Tooltip create_tooltip ( string  resource,
string  text,
number  x,
number  y)

Creates and adds a Tooltip widget hanging from the given position, loading its style from a resource string.

Parameters
resourcestring
textstring
xnumber
ynumber
Returns
Tooltip
Box create_box ( Alignment  alignment)

Creates and adds a Box widget (bordered panel).

Parameters
alignmentAlignment
Returns
Box
Box create_box ( string  resource,
Alignment  alignment)

Creates and adds a Box widget (bordered panel), loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
Box
Button create_button ( Alignment  alignment)

Creates and adds a Button widget.

Parameters
alignmentAlignment
Returns
Button
Button create_button ( string  resource,
Alignment  alignment)

Creates and adds a Button widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
Button
ToggleButton create_toggle_button ( Alignment  alignment)

Creates and adds a ToggleButton widget.

Parameters
alignmentAlignment
Returns
ToggleButton
ToggleButton create_toggle_button ( string  resource,
Alignment  alignment)

Creates and adds a ToggleButton widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
ToggleButton
RadioButton create_radio_button ( Alignment  alignment)

Creates and adds a RadioButton widget.

Parameters
alignmentAlignment
Returns
RadioButton
RadioButton create_radio_button ( string  resource,
Alignment  alignment)

Creates and adds a RadioButton widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
RadioButton
HLine create_hline ( Alignment  alignment)

Creates and adds a horizontal Line widget.

Parameters
alignmentAlignment
Returns
HLine
HLine create_hline ( string  resource,
Alignment  alignment)

Creates and adds a horizontal Line widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
HLine
VLine create_vline ( Alignment  alignment)

Creates and adds a vertical Line widget.

Parameters
alignmentAlignment
Returns
VLine
VLine create_vline ( string  resource,
Alignment  alignment)

Creates and adds a vertical Line widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
VLine
Frame create_frame ( Alignment  alignment,
string  title)

Creates and adds a Frame widget with the given title.

Parameters
alignmentAlignment
titlestring
Returns
Frame
Frame create_frame ( string  resource,
Alignment  alignment,
string  title)

Creates and adds a Frame widget with the given title, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
titlestring
Returns
Frame
TextEdit create_text_edit ( Alignment  alignment,
string|nil  text)

Creates and adds a TextEdit widget with optional initial text.

Parameters
alignmentAlignment
textstring|nil
Returns
TextEdit
TextEdit create_text_edit ( string  resource,
Alignment  alignment,
string|nil  text)

Creates and adds a TextEdit widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
textstring|nil
Returns
TextEdit
RichTextArea create_rich_text_area ( Alignment  alignment,
string|nil  bbcode)

Creates and adds a RichTextArea widget with the given alignment and optional BBCode markup.

Parameters
alignmentAlignment
bbcodestring|nil
Returns
RichTextArea
RichTextArea create_rich_text_area ( string  resource,
Alignment  alignment,
string|nil  bbcode)

Creates and adds a RichTextArea widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
bbcodestring|nil
Returns
RichTextArea
Image create_image ( Alignment  alignment)

Creates and adds an Image widget.

Parameters
alignmentAlignment
Returns
Image
Image create_image ( string  resource,
Alignment  alignment)

Creates and adds an Image widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
Image
Image create_image ( string  resource,
Alignment  alignment,
boolean  autoresize,
boolean  fixedsize)

Creates and adds an Image widget with auto-resize and fixed-size options.

Parameters
resourcestring
alignmentAlignment
autoresizeboolean
fixedsizeboolean
Returns
Image
VScrollBar create_vscrollbar ( Alignment  alignment)

Creates and adds a vertical ScrollBar widget.

Parameters
alignmentAlignment
Returns
VScrollBar
VScrollBar create_vscrollbar ( string  resource,
Alignment  alignment)

Creates and adds a vertical ScrollBar widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
VScrollBar
HScrollBar create_hscrollbar ( Alignment  alignment)

Creates and adds a horizontal ScrollBar widget.

Parameters
alignmentAlignment
Returns
HScrollBar
HScrollBar create_hscrollbar ( string  resource,
Alignment  alignment)

Creates and adds a horizontal ScrollBar widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
HScrollBar
TreeView create_tree_view ( Alignment  alignment)

Creates and adds a TreeView widget.

Parameters
alignmentAlignment
Returns
TreeView
TreeView create_tree_view ( string  resource,
Alignment  alignment)

Creates and adds a TreeView widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
TreeView
Widget create_widget ( Alignment  alignment)

Creates and adds a transparent container Widget.

Parameters
alignmentAlignment
Returns
Widget
Widget create_widget ( string  resource,
Alignment  alignment)

Creates and adds a transparent container Widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
Widget
ListBox create_list_box ( Alignment  alignment)

Creates and adds a ListBox widget.

Parameters
alignmentAlignment
Returns
ListBox
ListBox create_list_box ( string  resource,
Alignment  alignment)

Creates and adds a ListBox widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
ListBox
ProgressBar create_progress_bar ( Alignment  alignment)

Creates and adds a ProgressBar widget.

Parameters
alignmentAlignment
Returns
ProgressBar
ProgressBar create_progress_bar ( string  resource,
Alignment  alignment)

Creates and adds a ProgressBar widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
ProgressBar
VProgressBar create_vprogress_bar ( Alignment  alignment)

Creates and adds a vertical ProgressBar widget.

Parameters
alignmentAlignment
Returns
VProgressBar
VProgressBar create_vprogress_bar ( string  resource,
Alignment  alignment)

Creates and adds a vertical ProgressBar widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
VProgressBar
HProgressBar create_hprogress_bar ( Alignment  alignment)

Creates and adds a horizontal ProgressBar widget.

Parameters
alignmentAlignment
Returns
HProgressBar
HProgressBar create_hprogress_bar ( string  resource,
Alignment  alignment)

Creates and adds a horizontal ProgressBar widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
HProgressBar
ScrollBox create_scroll_box ( Alignment  alignment)

Creates and adds a ScrollBox widget.

Parameters
alignmentAlignment
Returns
ScrollBox
ScrollBox create_scroll_box ( string  resource,
Alignment  alignment)

Creates and adds a ScrollBox widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
ScrollBox
CheckBox create_check_box ( Alignment  alignment)

Creates and adds a CheckBox widget.

Parameters
alignmentAlignment
Returns
CheckBox
CheckBox create_check_box ( string  resource,
Alignment  alignment)

Creates and adds a CheckBox widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
CheckBox
CheckMark create_check_mark ( Alignment  alignment)

Creates and adds a CheckMark widget with the given alignment.

Parameters
alignmentAlignment
Returns
CheckMark
CheckMark create_check_mark ( string  resource,
Alignment  alignment)

Creates and adds a CheckMark widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
CheckMark
CrossMark create_cross_mark ( Alignment  alignment)

Creates and adds a CrossMark widget with the given alignment.

Parameters
alignmentAlignment
Returns
CrossMark
CrossMark create_cross_mark ( string  resource,
Alignment  alignment)

Creates and adds a CrossMark widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
CrossMark
Arrow create_arrow ( Alignment  alignment,
ArrowOrientation  orientation)

Creates and adds an Arrow widget pointing to the given direction.

Parameters
alignmentAlignment
orientationArrowOrientation
Returns
Arrow
Arrow create_arrow ( string  resource,
Alignment  alignment,
ArrowOrientation  orientation)

Creates and adds an Arrow widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
orientationArrowOrientation
Returns
Arrow
Menu create_menu ( Alignment  alignment)

Creates and adds a Menu widget.

Parameters
alignmentAlignment
Returns
Menu
Menu create_menu ( string  resource,
Alignment  alignment)

Creates and adds a Menu widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
Menu
TabBar create_tab_bar ( Alignment  alignment)

Creates and adds a TabBar widget with the given alignment.

Parameters
alignmentAlignment
Returns
TabBar
TabBar create_tab_bar ( string  resource,
Alignment  alignment)

Creates and adds a TabBar widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
TabBar
TabContainer create_tab_container ( Alignment  alignment)

Creates and adds a TabContainer widget with the given alignment.

Parameters
alignmentAlignment
Returns
TabContainer
TabContainer create_tab_container ( string  resource,
Alignment  alignment)

Creates and adds a TabContainer widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
TabContainer
Grid create_grid ( Alignment  alignment)

Creates and adds an empty Grid widget with the given alignment.

Parameters
alignmentAlignment
Returns
Grid
Grid create_grid ( Alignment  alignment,
integer  rows,
integer  columns)

Creates and adds a Grid widget with the given number of rows and columns.

Parameters
alignmentAlignment
rowsinteger
columnsinteger
Returns
Grid
Grid create_grid ( string  resource,
Alignment  alignment,
integer  rows,
integer  columns)

Creates and adds a Grid widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
rowsinteger
columnsinteger
Returns
Grid
Table create_table ( Alignment  alignment)

Creates and adds a Table widget with the given alignment.

Parameters
alignmentAlignment
Returns
Table
Table create_table ( string  resource,
Alignment  alignment)

Creates and adds a Table widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
Table
FoldableContainer create_foldable_container ( Alignment  alignment)

Creates and adds a FoldableContainer widget with the given alignment.

Parameters
alignmentAlignment
Returns
FoldableContainer
FoldableContainer create_foldable_container ( string  resource,
Alignment  alignment)

Creates and adds a FoldableContainer widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
FoldableContainer
HSlider create_hslider ( Alignment  alignment)

Creates and adds a horizontal Slider widget with the given alignment.

Parameters
alignmentAlignment
Returns
HSlider
HSlider create_hslider ( string  resource,
Alignment  alignment)

Creates and adds a horizontal Slider widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
HSlider
VSlider create_vslider ( Alignment  alignment)

Creates and adds a vertical Slider widget with the given alignment.

Parameters
alignmentAlignment
Returns
VSlider
VSlider create_vslider ( string  resource,
Alignment  alignment)

Creates and adds a vertical Slider widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
VSlider
HColorSlider create_hcolor_slider ( Alignment  alignment)

Creates and adds a horizontal ColorSlider widget with the given alignment.

Parameters
alignmentAlignment
Returns
HColorSlider
HColorSlider create_hcolor_slider ( string  resource,
Alignment  alignment)

Creates and adds a horizontal ColorSlider widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
HColorSlider
VColorSlider create_vcolor_slider ( Alignment  alignment)

Creates and adds a vertical ColorSlider widget with the given alignment.

Parameters
alignmentAlignment
Returns
VColorSlider
VColorSlider create_vcolor_slider ( string  resource,
Alignment  alignment)

Creates and adds a vertical ColorSlider widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
VColorSlider
Knob create_knob ( Alignment  alignment)

Creates and adds a Knob widget with the given alignment.

Parameters
alignmentAlignment
Returns
Knob
Knob create_knob ( string  resource,
Alignment  alignment)

Creates and adds a Knob widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
Knob
ColorWheel create_color_wheel ( Alignment  alignment)

Creates and adds a ColorWheel widget with the given alignment.

Parameters
alignmentAlignment
Returns
ColorWheel
ColorWheel create_color_wheel ( string  resource,
Alignment  alignment)

Creates and adds a ColorWheel widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
ColorWheel
ColorPicker create_color_picker ( Alignment  alignment)

Creates and adds a ColorPicker widget with the given alignment.

Parameters
alignmentAlignment
Returns
ColorPicker
ColorPicker create_color_picker ( string  resource,
Alignment  alignment)

Creates and adds a ColorPicker widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
ColorPicker
ColorPickerButton create_color_picker_button ( Alignment  alignment)

Creates and adds a ColorPickerButton widget with the given alignment.

Parameters
alignmentAlignment
Returns
ColorPickerButton
ColorPickerButton create_color_picker_button ( string  resource,
Alignment  alignment)

Creates and adds a ColorPickerButton widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
ColorPickerButton
SpinBox create_spin_box ( Alignment  alignment)

Creates and adds a SpinBox widget with the given alignment.

Parameters
alignmentAlignment
Returns
SpinBox
SpinBox create_spin_box ( string  resource,
Alignment  alignment)

Creates and adds a SpinBox widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
SpinBox
SpinButtons create_spin_buttons ( Alignment  alignment)

Creates and adds a SpinButtons widget with the given alignment.

Parameters
alignmentAlignment
Returns
SpinButtons
SpinButtons create_spin_buttons ( string  resource,
Alignment  alignment)

Creates and adds a SpinButtons widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
SpinButtons
DropDownList create_drop_down_list ( Alignment  alignment)

Creates and adds a DropDownList widget with the given alignment.

Parameters
alignmentAlignment
Returns
DropDownList
DropDownList create_drop_down_list ( string  resource,
Alignment  alignment)

Creates and adds a DropDownList widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
DropDownList
IconImage create_icon_image ( Alignment  alignment)

Creates and adds an IconImage widget with the given alignment.

Parameters
alignmentAlignment
Returns
IconImage
IconImage create_icon_image ( string  resource,
Alignment  alignment)

Creates and adds an IconImage widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
IconImage
IconSVG create_icon_svg ( Alignment  alignment)

Creates and adds an IconSVG widget with the given alignment.

Parameters
alignmentAlignment
Returns
IconSVG
IconSVG create_icon_svg ( string  resource,
Alignment  alignment)

Creates and adds an IconSVG widget, loading its style from a resource string.

Parameters
resourcestring
alignmentAlignment
Returns
IconSVG

Property Documentation

integer resizeable_borders

Bitmask of which window borders are user-resizable (see lysa.ui.ResizeableBorder).

Widget widget

The root widget that covers the entire client area of the window. (read-only)

Style style

The style drawing the widgets of this window; falls back to the WindowManager default style when none is set.

number width

Client area width in virtual screen units.

number height

Client area height in virtual screen units.

lysa.Rect rect

Client area position and size as a Rect.

number x

Current X position of the window's bottom-left corner.

number y

Current Y position of the window's bottom-left corner.

boolean visible

Whether the window is visible; changes take effect at the start of the next frame.

number minimum_width

The minimum width the window can be resized to. (read-only)

number minimum_height

The minimum height the window can be resized to. (read-only)

number maximum_width

The maximum width the window can be resized to. (read-only)

number maximum_height

The maximum height the window can be resized to. (read-only)

number aspect_ratio

Aspect ratio (width / height) of the Window client area. (read-only)

lysa.Font font

The default font applied to widgets that do not specify their own.

number font_scale

The default font scale applied to widgets that do not specify their own.