Currently does not work well on windows, so WSL is recommended.
Functions
window_master
window_master(name, width, height, flags?) -> int<collection.CRATE_WINDOW>
- name
string - width
int - height
int - flags
int<gui.MasterWindowFlags>- Use 'bit.bitor' or 'bit.bitor_many' to combine flags.
int<collection.CRATE_WINDOW>- The id of the new window.
window_pos
window_pos(id) -> int, int
- id
int<collection.CRATE_WINDOW>
int- The x position of the window.int- The y position of the window.
window_set_pos
window_set_pos(id, x, y)
- id
int<collection.CRATE_WINDOW> - x
int - y
int
window_size
window_size(id) -> int, int
- id
int<collection.CRATE_WINDOW>
int- The width of the window.int- The height of the window.
window_set_size
window_set_size(id, width, height)
- id
int<collection.CRATE_WINDOW> - width
int - height
int
window_set_size_limits
window_set_size_limits(id, minw, minh, maxw, maxh)
- id
int<collection.CRATE_WINDOW> - minw
int - minh
int - maxw
int - maxh
int
window_set_bg_color_rgba
window_set_bg_color_rgba(id, r, g, b, a)
- id
int<collection.CRATE_WINDOW> - r
int - g
int - b
int - a
int
window_set_bg_color
window_set_bg_color(id, color)
- id
int<collection.CRATE_WINDOW> - color
struct<image.Color>
window_should_close
window_should_close(id, v)
- id
int<collection.CRATE_WINDOW> - v
bool
window_set_icon_imgscal
window_set_icon_imgscal(id, circled?)
Uses the 16x16 and 32x32 imscal application icons for the window icon. Note the imgscal icon is light green with a transparent background, against a white background it will be hard to see. The circled versions have a dark background and are more readable.
- id
int<collection.CRATE_WINDOW> - circled
bool
window_set_icon
window_set_icon(id, img)
- id
int<collection.CRATE_WINDOW> - img
int<collection.IMAGE>
window_set_icon_many
window_set_icon_many(id, imgs)
@blocking
Setting multiple icons allows it select the closest to the system's desired size.
- id
int<collection.CRATE_WINDOW> - imgs
[]int<collection.IMAGE>
window_clear_icon
window_clear_icon(id)
Resets window icon to the default, same as 'window_set_icon_many(id, {})'.
- id
int<collection.CRATE_WINDOW>
window_set_fps
window_set_fps(id, fps)
- id
int<collection.CRATE_WINDOW> - fps
int
window_set_title
window_set_title(id, title)
- id
int<collection.CRATE_WINDOW> - title
string
window_register_keyboard_shortcuts
window_register_keyboard_shortcuts(id, shortcuts)
- id
int<collection.CRATE_WINDOW> - shortcuts
[]struct<gui.Shortcut>
window_set_close_callback
window_set_close_callback(id, callback)
- id
int<collection.CRATE_WINDOW> - callback
function() -> bool
window_set_drop_callback
window_set_drop_callback(id, callback)
- id
int<collection.CRATE_WINDOW> - callback
function([]string)
window_additional_input_handler_callback
window_additional_input_handler_callback(id, callback)
- id
int<collection.CRATE_WINDOW> - callback
function(key int<gui.Key>, mod int<gui.Key>, action int<gui.Action>)
window_close
window_close(id)
Same as 'window_should_close(id, true)'.
- id
int<collection.CRATE_WINDOW>
window_run
window_run(id, fn)
@blocking
- id
int<collection.CRATE_WINDOW> - fn
function()
window_single
window_single() -> struct<gui.WidgetWindow>
struct<gui.WidgetWindow>
window_single_with_menu_bar
window_single_with_menu_bar() -> struct<gui.WidgetWindow>
struct<gui.WidgetWindow>
window
window() -> struct<gui.WidgetWindow>
- title
string
struct<gui.WidgetWindow>
layout
layout(widgets)
Builds a list of widgets when called.
- widgets
[]struct<gui.Widget>
popup_open
popup_open(name)
- name
string
popup_close
popup_close()
prepare_msg_box
prepare_msg_box() -> struct<gui.WidgetMSGBoxPrepare>
struct<gui.WidgetMSGBoxPrepare>
style_var_is_vec2
style_var_is_vec2(var) -> bool
- var
int<gui.StyleVarID>
bool
style_var_string
style_var_string(var) -> string
- var
int<gui.StyleVarID>
string
style_var_from_string
style_var_from_string(str) -> int<gui.StyleVarID>
- str
string
int<gui.StyleVarID>
shortcut
shortcut(key, mod, callback) -> struct<gui.Shortcut>
- key
int<gui.Key> - mod
int<gui.Key> - callback
function()
struct<gui.Shortcut>
css_parse
css_parse(path)
- path
string
align_text_to_frame_padding
align_text_to_frame_padding()
calc_text_size
calc_text_size(text) -> float, float
- text
string
float- Width of the text string.float- Height of the text string.
calc_text_size_width
calc_text_size_width(text) -> float
- text
string
float- Width of the text string.
calc_text_size_height
calc_text_size_height(text) -> float
- text
string
float- Height of the text string.
calc_text_size_v
calc_text_size_v(text, hideAfterDoubleHash, wrapWidth) -> float, float
- text
string - hideAfterDoubleHash
bool - wrapWidth
float
float- Width of the text string.float- Height of the text string.
available_region
available_region() -> float, float
float- Width.float- Height.
frame_padding
frame_padding() -> float, float
float- X padding.float- Y Padding.
item_inner_spacing
item_inner_spacing() -> float, float
float- Width.float- Height.
item_spacing
item_spacing() -> float, float
float- Width.float- Height.
mouse_pos_xy
mouse_pos_xy() -> int, int
int- Mouse x position.int- Mouse y position.
mouse_pos
mouse_pos() -> struct<image.Point>
struct<image.Point>
window_padding
window_padding() -> float, float
floatX padding.floatY padding.
is_item_active
is_item_active() -> bool
bool
is_item_clicked
is_item_clicked(button) -> bool
- button
int<gui.MouseButton>
bool
is_item_hovered
is_item_hovered() -> bool
bool
is_key_down
is_key_down(key) -> bool
- key
int<gui.Key>
bool
is_key_pressed
is_key_pressed(key) -> bool
- key
int<gui.Key>
bool
is_key_released
is_key_released(key) -> bool
- key
int<gui.Key>
bool
is_mouse_clicked
is_mouse_clicked(button) -> bool
- button
int<gui.MouseButton>
bool
is_mouse_double_clicked
is_mouse_double_clicked(button) -> bool
- button
int<gui.MouseButton>
bool
is_mouse_down
is_mouse_down(button) -> bool
- button
int<gui.MouseButton>
bool
is_mouse_released
is_mouse_released(button) -> bool
- button
int<gui.MouseButton>
bool
is_window_appearing
is_window_appearing() -> bool
bool
is_window_collapsed
is_window_collapsed() -> bool
bool
is_window_focused
is_window_focused(flags) -> bool
- flags
int<gui.FocusedFlags>
bool
is_window_hovered
is_window_hovered(flags) -> bool
- flags
int<gui.HoveredFlags>
bool
open_url
open_url(url)
- url
string
pop_clip_rect
pop_clip_rect()
pop_font
pop_font()
pop_item_width
pop_item_width()
pop_style
pop_style()
pop_style_color
pop_style_color()
pop_style_color_v
pop_style_color_v(count)
- count
int
pop_style_v
pop_style_v(count)
- count
int
pop_text_wrap_pos
pop_text_wrap_pos()
push_button_text_align
push_button_text_align(width, height)
- width
float - height
float
push_clip_rect
push_clip_rect(min, max, intersect)
- min
struct<image.Point> - max
struct<image.Point> - intersect
bool
push_color_button
push_color_button(color)
- color
struct<image.Color>
push_color_button_active
push_color_button_active(color)
- color
struct<image.Color>
push_color_button_hovered
push_color_button_hovered(color)
- color
struct<image.Color>
push_color_frame_bg
push_color_frame_bg(color)
- color
struct<image.Color>
push_color_text
push_color_text(color)
- color
struct<image.Color>
push_color_text_disabled
push_color_text_disabled(color)
- color
struct<image.Color>
push_color_window_bg
push_color_window_bg(color)
- color
struct<image.Color>
push_font
push_font(fontref) -> bool
- fontref
int<ref.FONT>
bool
push_frame_padding
push_frame_padding(width, height)
- width
float - height
float
push_item_spacing
push_item_spacing(width, height)
- width
float - height
float
push_item_width
push_item_width(width)
- width
float
push_selectable_text_align
push_selectable_text_align(width, height)
- width
float - height
float
push_style_color
push_style_color(id, color)
- id
int<gui.StyleColorID> - color
struct<image.Color>
push_text_wrap_pos
push_text_wrap_pos()
push_window_padding
push_window_padding(width, height)
- width
float - height
float
same_line
same_line()
cursor_pos_set_xy
cursor_pos_set_xy(x, y)
- x
int - y
int
cursor_pos_set
cursor_pos_set(point)
- point
struct<image.Point>
cursor_screeen_pos_set_xy
cursor_screeen_pos_set_xy(x, y)
- x
int - y
int
cursor_screen_pos_set
cursor_screen_pos_set(point)
- point
struct<image.Point>
item_default_focus_set
item_default_focus_set()
keyboard_focus_here
keyboard_focus_here()
keyboard_focus_here_v
keyboard_focus_here_v(i)
- i
int- Widget offset, e.g. -1 is the previous widget.
mouse_cursor_set
mouse_cursor_set(cursor)
- cursor
int<gui.Cursor>
next_window_pos_set
next_window_pos_set(x, y)
- x
int - y
int
next_window_size_set
next_window_size_set(width, height)
- width
float - height
float
next_window_size_v_set
next_window_size_v_set(width, height, cond)
- width
float - height
float - cond
int<gui.Condition>
update
update()
color_to_uint32
color_to_uint32(color) -> int
Returns the uint32 to lua as a float64 (The type lua uses for numbers).
- color
struct<image.Color>
int- Number representation of a color.
uint32_to_color
uint32_to_color(ucolor) -> struct<image.ColorRGBA>
- ucolor
int
struct<image.ColorRGBA>
wg_label
wg_label(text) -> struct<gui.WidgetLabel>
- text
string
struct<gui.WidgetLabel>
wg_number
wg_number(number) -> struct<gui.WidgetLabel>
Converts the number into a string before creating the label widget.
- number
float
struct<gui.WidgetLabel>
wg_markdown
wg_markdown(text) -> struct<gui.WidgetMarkdown>
- text
string
struct<gui.WidgetMarkdown>
wg_button
wg_button(text) -> struct<gui.WidgetButton>
- text
string
struct<gui.WidgetButton>
wg_dummy
wg_dummy(width, height) -> struct<gui.WidgetDummy>
- width
float - height
float
struct<gui.WidgetDummy>
wg_separator
wg_separator() -> struct<gui.WidgetSeparator>
struct<gui.WidgetSeparator>
wg_bullet_text
wg_bullet_text(text) -> struct<gui.WidgetBulletText>
- text
string
struct<gui.WidgetBulletText>
wg_bullet
wg_bullet() -> struct<gui.WidgetBullet>
struct<gui.WidgetBullet>
wg_checkbox
wg_checkbox(text, boolref) -> struct<gui.WidgetCheckbox>
- text
string - boolref
int<ref.BOOL>
struct<gui.WidgetCheckbox>
wg_child
wg_child() -> struct<gui.WidgetChild>
struct<gui.WidgetChild>
wg_color_edit
wg_color_edit(text, colorref) -> struct<gui.WidgetColorEdit>
- text
string - colorref
int<ref.RGBA>
struct<gui.WidgetColorEdit>
wg_column
wg_column(widgets?) -> struct<gui.WidgetColumn>
- widgets
[]struct<gui.Widget>
struct<gui.WidgetColumn>
wg_row
wg_row(widgets?) -> struct<gui.WidgetRow>
- widgets
[]struct<gui.Widget>
struct<gui.WidgetRow>
wg_combo_custom
wg_combo_custom(text, preview) -> struct<gui.WidgetComboCustom>
- text
string - preview
string
struct<gui.WidgetComboCustom>
wg_combo
wg_combo(text, preview, items, i32ref) -> struct<gui.WidgetCombo>
- text
string - preview
string - items
[]string - i32ref
int<ref.INT32>
struct<gui.WidgetCombo>
wg_combo_preview
wg_combo_preview(text, items, i32ref) -> struct<gui.WidgetCombo>
Same as wg_combo but sets preview to the selected value in items.
- text
string - items
[]string - i32ref
int<ref.INT32>
struct<gui.WidgetCombo>
wg_condition
wg_condition(condition, widgetIf, widgetElse) -> struct<gui.WidgetCondition>
- condition
bool - widgetIf
struct<gui.Widget> - widgetElse
struct<gui.Widget>
struct<gui.WidgetCondition>
wg_context_menu
wg_context_menu() -> struct<gui.WidgetContextMenu>
struct<gui.WidgetContextMenu>
wg_date_picker
wg_date_picker(id, timeref) -> struct<gui.WidgetDatePicker>
- id
string - timeref
int<ref.TIME>
struct<gui.WidgetDatePicker>
wg_drag_int
wg_drag_int(label, i32ref, minvalue, maxvalue) -> struct<gui.WidgetDragInt>
- label
string - i32ref
int<ref.INT32> - minvalue
int - maxvalue
int
struct<gui.WidgetDragInt>
wg_input_float
wg_input_float(f32ref) -> struct<gui.WidgetInputFloat>
- f32ref
int<ref.FLOAT32>
struct<gui.WidgetInputFloat>
wg_input_int
wg_input_int(i32ref) -> struct<gui.WidgetInputInt>
- i32ref
int<ref.INT32>
struct<gui.WidgetInputInt>
wg_input_text
wg_input_text(strref) -> struct<gui.WidgetInputText>
- strref
int<ref.STRING>
struct<gui.WidgetInputText>
wg_input_text_multiline
wg_input_text_multiline(strref) -> struct<gui.WidgetInputTextMultiline>
- strref
int<ref.STRING>
struct<gui.WidgetInputTextMultiline>
wg_progress_bar
wg_progress_bar(fraction) -> struct<gui.WidgetProgressBar>
- fraction
float
struct<gui.WidgetProgressBar>
wg_progress_indicator
wg_progress_indicator(label, width, height, radius) -> struct<gui.WidgetProgressIndicator>
- label
string - width
float - height
float - radius
float
struct<gui.WidgetProgressIndicator>
wg_spacing
wg_spacing() -> struct<gui.WidgetSpacing>
struct<gui.WidgetSpacing>
wg_button_small
wg_button_small(text) -> struct<gui.WidgetButtonSmall>
- text
string
struct<gui.WidgetButtonSmall>
wg_button_radio
wg_button_radio(text, active) -> struct<gui.WidgetButtonRadio>
- text
string - active
bool
struct<gui.WidgetButtonRadio>
wg_image_url
wg_image_url(url) -> struct<gui.WidgetImageURL>
- url
string
struct<gui.WidgetImageURL>
wg_image
wg_image(id) -> struct<gui.WidgetImage>
@blocking
- id
int<collection.IMAGE>
struct<gui.WidgetImage>
wg_image_sync
wg_image_sync(id) -> struct<gui.WidgetImage>
Note: this does not wait for the image to be ready or idle, if the image is not loaded it will dislay an empy image. May look weird if the image is also being processed while displayed here.
- id
int<collection.IMAGE>
struct<gui.WidgetImage>
wg_image_cached
wg_image_cached(id) -> struct<gui.WidgetImage>
- id
int<collection.CRATE_CACHEDIMAGE>
struct<gui.WidgetImage>
wg_list_box
wg_list_box(items) -> struct<gui.WidgetListbox>
- items
[]string
struct<gui.WidgetListbox>
wg_list_clipper
wg_list_clipper() -> struct<gui.WidgetListClipper>
struct<gui.WidgetListClipper>
wg_menu_bar_main
wg_menu_bar_main() -> struct<gui.WidgetMenuBarMain>
struct<gui.WidgetMenuBarMain>
wg_menu_bar
wg_menu_bar() -> struct<gui.WidgetMenuBar>
struct<gui.WidgetMenuBar>
wg_menu_item
wg_menu_item(label) -> struct<gui.WidgetMenuItem>
- label
string
struct<gui.WidgetMenuItem>
wg_menu
wg_menu(label) -> struct<gui.WidgetMenu>
- label
string
struct<gui.WidgetMenu>
wg_selectable
wg_selectable(label) -> struct<gui.WidgetSelectable>
- label
string
struct<gui.WidgetSelectable>
wg_slider_float
wg_slider_float(f32ref, min, max) -> struct<gui.WidgetSliderFloat>
- f32ref
int<ref.FLOAT32> - min
float - max
float
struct<gui.WidgetSliderFloat>
wg_slider_int
wg_slider_int(i32ref, min, max) -> struct<gui.WidgetSliderInt>
- i32ref
int<ref.INT32> - min
int - max
int
struct<gui.WidgetSliderInt>
wg_vslider_int
wg_vslider_int(i32ref, min, max) -> struct<gui.WidgetVSliderInt>
- i32ref
int<ref.INT32> - min
int - max
int
struct<gui.WidgetVSliderInt>
wg_tab_bar
wg_tab_bar() -> struct<gui.WidgetTabBar>
struct<gui.WidgetTabBar>
wg_tab_item
wg_tab_item(label) -> struct<gui.TabItem>
- label
string
struct<gui.TabItem>
wg_tooltip
wg_tooltip(tip) -> struct<gui.WidgetTooltip>
- tip
string
struct<gui.WidgetTooltip>
wg_table_column
wg_table_column(label) -> struct<gui.TableColumn>
- label
string
struct<gui.TableColumn>
wg_table_row
wg_table_row(widgets?) -> struct<gui.TableRow>
- widgets
[]struct<gui.Widget>
struct<gui.TableRow>
wg_table
wg_table() -> struct<gui.WidgetTable>
struct<gui.WidgetTable>
wg_button_arrow
wg_button_arrow(dir) -> {struct<gui.WidgetButtonArrow>}
- dir
int<gui.Direction>
struct<gui.WidgetButtonArrow>
wg_tree_node
wg_tree_node(label) -> struct<gui.WidgetTreeNode>
- label
string
struct<gui.WidgetTreeNode>
wg_tree_table_row
wg_tree_table_row(label, widgets?) -> struct<gui.TreeTableRow>
- label
string - widgets
[]struct<gui.Widget>
struct<gui.TreeTableRow>
wg_tree_table
wg_tree_table() -> struct<gui.WidgetTreeTable>
struct<gui.WidgetTreeTable>
wg_popup_modal
wg_popup_modal(name) -> struct<gui.WidgetPopupModal>
- name
string
struct<gui.WidgetPopupModal>
wg_popup
wg_popup(name) -> struct<gui.WidgetPopup>
- name
string
struct<gui.WidgetPopup>
wg_layout_split
wg_layout_split(direction, f32ref, layout1, layout2) -> struct<gui.WidgetLayoutSplit>
- direction
int<gui.Direction> - f32ref
int<ref.FLOAT32> - layout1
[]struct<gui.Widget> - layout2
[]struct<gui.Widget>
struct<gui.WidgetLayoutSplit>
wg_splitter
wg_splitter(direction, f32ref) -> struct<gui.WidgetSplitter>
- direction
int<gui.Direction> - f32ref
int<ref.FLOAT32>
struct<gui.WidgetSplitter>
wg_stack
wg_stack(visible, widgets) -> struct<gui.WidgetStack>
- visible
int- The index in widgets that is visible. - widgets
[]struct<gui.Widget>
struct<gui.WidgetStack>
wg_align
wg_align(at) -> struct<gui.WidgetAlign>
- at
int<gui.Alignment>
struct<gui.WidgetAlign>
wg_msg_box
wg_msg_box(title, content) -> struct<gui.WidgetMSGBox>
There must be a call to 'prepare_msg_box()' once a loop when using a msg box.
- title
string - content
string
struct<gui.WidgetMSGBox>
wg_button_invisible
wg_button_invisible() -> struct<gui.WidgetButtonInvisible>
struct<gui.WidgetButtonInvisible>
wg_button_image
wg_button_image(id) -> struct<gui.WidgetButtonImage>
- id
int<collection.IMAGE>
struct<gui.WidgetButtonImage>
wg_button_image_sync
wg_button_image_sync(id) -> struct<gui.WidgetButtonImage>
Note: this does not wait for the image to be ready or idle, if the image is not loaded it will dislay an empy image. May look weird if the image is also being processed while displayed here.
- id
int<collection.IMAGE>
struct<gui.WidgetButtonImage>
wg_button_image_cached
wg_button_image_cached(id) -> struct<gui.WidgetButtonImage>
- id
int<collection.CRATE_CACHEDIMAGE>
struct<gui.WidgetButtonImage>
wg_style
wg_style() -> struct<gui.WidgetStyle>
struct<gui.WidgetStyle>
wg_custom
wg_custom(builder) -> struct<gui.WidgetCustom>
- builder
function()
struct<gui.WidgetCustom>
wg_event
wg_event() -> struct<gui.WidgetEvent>
struct<gui.WidgetEvent>
wg_css_tag
wg_css_tag(tag) -> struct<gui.WidgetCSSTag>
- tag
string
struct<gui.WidgetCSSTag>
cursor_screen_pos_xy
cursor_screen_pos_xy() -> int, int
int- Cursor x position.int- Cursor y position.
cursor_screen_pos
cursor_screen_pos() -> struct<image.Point>
struct<image.Point>
cursor_pos_xy
cursor_pos_xy() -> int, int
int- Cursor x position.int- Cursor y position.
cursor_pos
cursor_pos() -> struct<image.Point>
struct<image.Point>
canvas_bezier_cubic
canvas_bezier_cubic(pos0, cp0, cp1, pos1, color, thickness, segments)
- pos0
struct<image.Point> - cp0
struct<image.Point> - cp1
struct<image.Point> - pos1
struct<image.Point> - color
struct<image.Color> - thickness
float - segments
int
canvas_circle
canvas_circle(center, radius, color, segments, thickness)
- center
struct<image.Point> - radius
float - color
struct<image.Color> - segments
int - thickness
float
canvas_circle_filled
canvas_circle_filled(center, radius, color)
- center
struct<image.Point> - radius
float - color
struct<image.Color>
canvas_line
canvas_line(p1, b2, color, thickness)
- p1
struct<image.Point> - p2
struct<image.Point> - color
struct<image.Color> - thickness
float
canvas_quad
canvas_quad(p1, p2, p3, p4, color, thickness)
- p1
struct<image.Point> - p2
struct<image.Point> - p3
struct<image.Point> - p4
struct<image.Point> - color
struct<image.Color> - thickness
float
canvas_quad_filled
canvas_quad_filled(p1, p2, p3, p4, color)
- p1
struct<image.Point> - p2
struct<image.Point> - p3
struct<image.Point> - p4
struct<image.Point> - color
struct<image.Color>
canvas_rect
canvas_rect(min, max, color, rounding, flags, thickness)
- min
struct<image.Point> - max
struct<image.Point> - color
struct<image.Color> - rounding
float - flags
int<gui.DrawFlags> - thickness
float
canvas_rect_filled
canvas_rect_filled(min, max, color, rounding, flags)
- min
struct<image.Point> - max
struct<image.Point> - color
struct<image.Color> - rounding
float - flags
int<gui.DrawFlags>
canvas_text
canvas_text(pos, color, text)
- pos
struct<image.Point> - color
struct<image.Color> - text
string
canvas_triangle
canvas_triangle(p1, p2, p3, color, thickness)
- p1
struct<image.Point> - p2
struct<image.Point> - p3
struct<image.Point> - color
struct<image.Color> - thickness
float
canvas_triangle_filled
canvas_triangle_filled(p1, p2, p3, color)
- p1
struct<image.Point> - p2
struct<image.Point> - p3
struct<image.Point> - color
struct<image.Color>
canvas_path_arc_to
canvas_path_arc_to(center, radius, min, max, segments)
- center
struct<image.Point> - radius
float - min
float - max
float - segments
int
canvas_path_arc_to_fast
canvas_path_arc_to_fast(center, radius, min, max, segments)
- center
struct<image.Point> - radius
float - min
int - max
int
canvas_path_bezier_cubic_to
canvas_path_bezier_cubic_to(p1, p2, p3, segments)
- p1
struct<image.Point> - p2
struct<image.Point> - p3
struct<image.Point> - segments
int
canvas_path_clear
canvas_path_clear()
canvas_fill_convex
canvas_fill_convex(color)
- color
struct<image.Color>
canvas_path_line_to
canvas_path_line_to(p1, segments)
- p1
struct<image.Point>
canvas_path_line_to_merge_duplicate
canvas_path_line_to_merge_duplicate(p1)
- p1
struct<image.Point>
canvas_path_stroke
canvas_path_stroke(color, flags, thickness)
- color
struct<image.Color> - flags
int<gui.DrawFlags> - thickness
float
fontatlas_add_font
fontatlas_add_font(name, size) -> int<ref.FONT>, bool
The returned font ref will be nil if ok is false.
- name
string - size
float
int<ref.FONT>bool
fontatlas_default_font_strings
fontatlas_default_font_strings() -> []string
[]string
fontatlas_default_fonts
fontatlas_default_fonts() -> []int<ref.FONT>
Take note that this creates an array of refs, refs are only cleared when the workflow ends, or manually with 'ref.del' or 'ref.del_many'.
[]int<ref.FONT>
fontatlas_register_string
fontatlas_register_string(str) -> string
- str
string
string
fontatlas_register_string_ref
fontatlas_register_string_ref(stringref) -> int<ref.STRING>
- stringref
int<ref.STRING>
int<ref.STRING>
fontatlas_register_string_many
fontatlas_register_string_many(str) -> []string
- str
[]string
[]string
fontatlas_set_default_font
fontatlas_set_default_font(name, size)
- name
string - size
float
fontatlas_set_default_font_size
fontatlas_set_default_font_size(size)
- size
float
font_set_size
font_set_size(fontref, size) -> int<ref.FONT>
- fontref
int<ref.FONT> - size
float
int<ref.FLOAT>
font_string
font_string(fontref) -> string
- fontref
int<ref.FONT>
string
Constants
ColorEditFlags
FLAGCOLOREDIT_NONEFLAGCOLOREDIT_NOALPHAFLAGCOLOREDIT_NOPICKERFLAGCOLOREDIT_NOOPTIONSFLAGCOLOREDIT_NOSMALLPREVIEWFLAGCOLOREDIT_NOINPUTSFLAGCOLOREDIT_NOTOOLTIPFLAGCOLOREDIT_NOLABELFLAGCOLOREDIT_NOSIDEPREVIEWFLAGCOLOREDIT_NODRAGDROPFLAGCOLOREDIT_NOBORDERFLAGCOLOREDIT_ALPHABARFLAGCOLOREDIT_ALPHAPREVIEWFLAGCOLOREDIT_ALPHAPREVIEWHALFFLAGCOLOREDIT_HDRFLAGCOLOREDIT_DISPLAYRGBFLAGCOLOREDIT_DISPLAYHSVFLAGCOLOREDIT_DISPLAYHEXFLAGCOLOREDIT_UINT8FLAGCOLOREDIT_FLOATFLAGCOLOREDIT_HUEBARFLAGCOLOREDIT_HUEWHEELFLAGCOLOREDIT_INPUTRGBFLAGCOLOREDIT_INPUTHSVFLAGCOLOREDIT_DEFAULTOPTIONSFLAGCOLOREDIT_DISPLAYMASKFLAGCOLOREDIT_DATATYPEMASKFLAGCOLOREDIT_PICKERMASKFLAGCOLOREDIT_INPUTMASK
ComboFlags
FLAGCOMBO_NONEFLAGCOMBO_POPUPALIGNLEFTFLAGCOMBO_HEIGHTSMALLFLAGCOMBO_HEIGHTREGULARFLAGCOMBO_HEIGHTLARGEFLAGCOMBO_HEIGHTLARGESTFLAGCOMBO_NOARROWBUTTONFLAGCOMBO_NOPREVIEWFLAGCOMBO_WIDTHFITPREVIEWFLAGCOMBO_HEIGHTMASK
MouseButton
MOUSEBUTTON_LEFTMOUSEBUTTON_RIGHTMOUSEBUTTON_MIDDLE
DatePickerLabel
DATEPICKERLABEL_MONTHDATEPICKERLABEL_YEAR
InputFlag
FLAGINPUTTEXT_NONEFLAGINPUTTEXT_CHARSDECIMALFLAGINPUTTEXT_CHARSHEXADECIMALFLAGINPUTTEXT_CHARSUPPERCASEFLAGINPUTTEXT_CHARSNOBLANKFLAGINPUTTEXT_AUTOSELECTALLFLAGINPUTTEXT_ENTERRETURNSTRUEFLAGINPUTTEXT_CALLBACKCOMPLETIONFLAGINPUTTEXT_CALLBACKHISTORYFLAGINPUTTEXT_CALLBACKALWAYSFLAGINPUTTEXT_CALLBACKCHARFILTERFLAGINPUTTEXT_ALLOWTABINPUTFLAGINPUTTEXT_CTRLENTERFORNEWLINEFLAGINPUTTEXT_NOHORIZONTALSCROLLFLAGINPUTTEXT_ALWAYSOVERWRITEFLAGINPUTTEXT_READONLYFLAGINPUTTEXT_PASSWORDFLAGINPUTTEXT_NOUNDOREDOFLAGINPUTTEXT_CHARSSCIENTIFICFLAGINPUTTEXT_CALLBACKRESIZEFLAGINPUTTEXT_CALLBACKEDITFLAGINPUTTEXT_ESCAPECLEARSALL
SelectableFlags
FLAGSELECTABLE_NONEFLAGSELECTABLE_DONTCLOSEPOPUPSFLAGSELECTABLE_SPANALLCOLUMNSFLAGSELECTABLE_ALLOWDOUBLECLICKFLAGSELECTABLE_DISABLEDFLAGSELECTABLE_ALLOWOVERLAP
SliderFlags
FLAGSLIDER_NONEFLAGSLIDER_ALWAYSCLAMPFLAGSLIDER_LOGARITHMICFLAGSLIDER_NOROUNDTOFORMATFLAGSLIDER_NOINPUTFLAGSLIDER_INVALIDMASK
TabBarFlags
FLAGTABBAR_NONEFLAGTABBAR_REORDERABLEFLAGTABBAR_AUTOSELECTNEWTABSFLAGTABBAR_TABLLISTPOPUPBUTTONFLAGTABBAR_NOCLOSEWITHMIDDLEMOUSEBUTTONFLAGTABBAR_NOTABLISTSCROLLINGBUTTONSFLAGTABBAR_NOTOOLTIPFLAGTABBAR_FITTINGPOLICYRESIZEDOWNFLAGTABBAR_FITTINGPOLICYSCROLLFLAGTABBAR_FITTINGPOLICYMASKFLAGTABBAR_FITTINGPOLICYDEFAULT
TabItemFlags
FLAGTABITEM_NONEFLAGTABITEM_UNSAVEDOCUMENTFLAGTABITEM_SETSELECTEDFLAGTABITEM_NOCLOSEWITHMIDDLEMOUSEBUTTONFLAGTABITEM_NOPUSHIDFLAGTABITEM_NOTOOLTIPFLAGTABITEM_NOREORDERFLAGTABITEM_LEADINGFLAGTABITEM_TRAILINGFLAGTABITEM_NOASSUMEDCLOSURE
TableColumnFlags
FLAGTABLECOLUMN_NONEFLAGTABLECOLUMN_DEFAULTHIDEFLAGTABLECOLUMN_DEFAULTSORTFLAGTABLECOLUMN_WIDTHSTRETCHFLAGTABLECOLUMN_WIDTHFIXEDFLAGTABLECOLUMN_NORESIZEFLAGTABLECOLUMN_NOREORDERFLAGTABLECOLUMN_NOHIDEFLAGTABLECOLUMN_NOCLIPFLAGTABLECOLUMN_NOSORTFLAGTABLECOLUMN_NOSORTASCENDINGFLAGTABLECOLUMN_NOSORTDESCENDINGFLAGTABLECOLUMN_NOHEADERWIDTHFLAGTABLECOLUMN_PREFERSORTASCENDINGFLAGTABLECOLUMN_PREFERSORTDESCENDINGFLAGTABLECOLUMN_INDENTENABLEFLAGTABLECOLUMN_INDENTDISABLEFLAGTABLECOLUMN_ISENABLEDFLAGTABLECOLUMN_ISVISIBLEFLAGTABLECOLUMN_ISSORTEDFLAGTABLECOLUMN_ISHOVEREDFLAGTABLECOLUMN_WIDTHMASKFLAGTABLECOLUMN_INDENTMASKFLAGTABLECOLUMN_STATUSMASKFLAGTABLECOLUMN_NODIRECTRESIZE
TableRowFlags
FLAGTABLEROW_NONEFLAGTABLEROW_HEADERS
TableFlags
FLAGTABLE_NONEFLAGTABLE_RESIZEABLEFLAGTABLE_REORDERABLEFLAGTABLE_HIDEABLEFLAGTABLE_SORTABLEFLAGTABLE_NOSAVEDSETTINGSFLAGTABLE_CONTEXTMENUINBODYFLAGTABLE_ROWBGFLAGTABLE_BORDERSINNERHFLAGTABLE_BORDERSOUTERHFLAGTABLE_BORDERSINNERVFLAGTABLE_BORDERSOUTERVFLAGTABLE_BORDERSHFLAGTABLE_BORDERSVFLAGTABLE_BORDERSINNERFLAGTABLE_BORDERSOUTERFLAGTABLE_BORDERSFLAGTABLE_NOBORDERSINBODYFLAGTABLE_NOBORDERSINBODYUNTILRESIZEFLAGTABLE_SIZINGFIXEDFITFLAGTABLE_SIZINGFIXEDSAMEFLAGTABLE_SIZINGSTRETCHPROPFLAGTABLE_SIZINGSTRETCHSAMEFLAGTABLE_NOHOSTEXTENDXFLAGTABLE_NOHOSTEXTENDYFLAGTABLE_NOKEEPCOLUMNSVISIBLEFLAGTABLE_PRECISEWIDTHSFLAGTABLE_NOCLIPFLAGTABLE_PADOUTERXFLAGTABLE_NOPADOUTERXFLAGTABLE_NOPADINNERXFLAGTABLE_SCROLLXFLAGTABLE_SCROLLYFLAGTABLE_SORTMULTIFLAGTABLE_SORTTRISTATEFLAGTABLE_HIGHLIGHTHOVEREDCOLUMNFLAGTABLE_SIZINGMASK
Direction
DIR_NONEDIR_LEFTDIR_RIGHTDIR_UPDIR_DOWNDIR_COUNT
TreeNodeFlags
FLAGTREENODE_NONEFLAGTREENODE_SELECTEDFLAGTREENODE_FRAMEDFLAGTREENODE_ALLOWOVERLAPFLAGTREENODE_NOTREEPUSHONOPENFLAGTREENODE_NOAUTOOPENONLOGFLAGTREENODE_DEFAULTOPENFLAGTREENODE_OPENONDOUBLECLICKFLAGTREENODE_OPENONARROWFLAGTREENODE_LEAFFLAGTREENODE_BULLETFLAGTREENODE_FRAMEPADDINGFLAGTREENODE_SPANAVAILWIDTHFLAGTREENODE_SPANFULLWIDTHFLAGTREENODE_SPANALLCOLUMNSFLAGTREENODE_NAVLEFTJUMPSBACKHEREFLAGTREENODE_COLLAPSINGHEADER
MasterWindowFlags
FLAGMASTERWINDOW_NOTRESIZABLEFLAGMASTERWINDOW_MAXIMIZEDFLAGMASTERWINDOW_FLOATINGFLAGMASTERWINDOW_FRAMELESSFLAGMASTERWINDOW_TRANSPARENTFLAGMASTERWINDOW_HIDDEN
WindowFlags
FLAGWINDOW_NONEFLAGWINDOW_NOTITLEBARFLAGWINDOW_NORESIZEFLAGWINDOW_NOMOVEFLAGWINDOW_NOSCROLLBARFLAGWINDOW_NOSCROLLWITHMOUSEFLAGWINDOW_NOCOLLAPSEFLAGWINDOW_ALWAYSAUTORESIZEFLAGWINDOW_NOBACKGROUNDFLAGWINDOW_NOSAVEDSETTINGSFLAGWINDOW_NOMOUSEINPUTSFLAGWINDOW_MENUBARFLAGWINDOW_HORIZONTALSCROLLBARFLAGWINDOW_NOFOCUSONAPPEARINGFLAGWINDOW_NOBRINGTOFRONTONFOCUSFLAGWINDOW_ALWAYSVERTICALSCROLLBARFLAGWINDOW_ALWAYSHORIZONTALSCROLLBARFLAGWINDOW_NONAVINPUTSFLAGWINDOW_NONAVFOCUSFLAGWINDOW_UNSAVEDDOCUMENTFLAGWINDOW_NONAVFLAGWINDOW_NODECORATIONFLAGWINDOW_NOINPUTSFLAGWINDOW_NODOCKING
SplitDirection
SPLITDIRECTION_HORIZONTALSPLITDIRECTION_VERTICAL
Alignment
ALIGN_LEFTALIGN_CENTERALIGN_RIGHT
MSGBoxButtons
MSGBOXBUTTONS_YESNOMSGBOXBUTTONS_OKCANCELMSGBOXBUTTONS_OK
StyleColorID
COLID_TEXTCOLID_TEXTDISABLEDCOLID_WINDOWBGCOLID_CHILDBGCOLID_POPUPBGCOLID_BORDERCOLID_BORDERSHADOWCOLID_FRAMEBGCOLID_FRAMEBGHOVEREDCOLID_FRAMEBGACTIVECOLID_TITLEBGCOLID_TITLEBGACTIVECOLID_TITLEBGCOLLAPSEDCOLID_MENUBARBGCOLID_SCROLLBARBGCOLID_SCROLLBARGRABCOLID_SCROLLBARGRABHOVEREDCOLID_SCROLLBARGRABACTIVECOLID_CHECKMARKCOLID_SLIDERGRABCOLID_SLIDERGRABACTIVECOLID_BUTTONCOLID_BUTTONHOVEREDCOLID_BUTTONACTIVECOLID_HEADERCOLID_HEADERHOVEREDCOLID_HEADERACTIVECOLID_SEPARATORCOLID_SEPARATORHOVEREDCOLID_SEPARATORACTIVECOLID_RESIZEGRIPCOLID_RESIZEGRIPHOVEREDCOLID_RESIZEGRIPACTIVECOLID_TABCOLID_TABHOVEREDCOLID_TABACTIVECOLID_TABUNFOCUSEDCOLID_TABUNFOCUSEDACTIVECOLID_DOCKINGPREVIEWCOLID_DOCKINGEMPTYBGCOLID_PLOTLINESCOLID_PLOTLINESHOVEREDCOLID_PLOTHISTOGRAMCOLID_PLOTHISTOGRAMHOVEREDCOLID_TABLEHEADERBGCOLID_TABLEBORDERSTRONGCOLID_TABLEBORDERLIGHTCOLID_TABLEROWBGCOLID_TABLEROWBGALTCOLID_TEXTSELECTEDBGCOLID_DRAGDROPTARGETCOLID_NAVHIGHLIGHTCOLID_NAVWINDOWINGHIGHLIGHTCOLID_NAVWINDOWINGDIMBGCOLID_MODALWINDOWDIMBGCOLID_COUNT
StyleVarID
STYLEVAR_ALPHASTYLEVAR_DISABLEDALPHASTYLEVAR_WINDOWPADDINGSTYLEVAR_WINDOWROUNDINGSTYLEVAR_WINDOWBORDERSIZESTYLEVAR_WINDOWMINSIZESTYLEVAR_WINDOWTITLEALIGNSTYLEVAR_CHILDROUNDINGSTYLEVAR_CHILDBORDERSIZESTYLEVAR_POPUPROUNDINGSTYLEVAR_POPUPBORDERSIZESTYLEVAR_FRAMEPADDINGSTYLEVAR_FRAMEROUNDINGSTYLEVAR_FRAMEBORDERSIZESTYLEVAR_ITEMSPACINGSTYLEVAR_ITEMINNERSPACINGSTYLEVAR_INDENTSPACINGSTYLEVAR_CELLPADDINGSTYLEVAR_SCROLLBARSIZESTYLEVAR_SCROLLBARROUNDINGSTYLEVAR_GRABMINSIZESTYLEVAR_GRABROUNDINGSTYLEVAR_TABROUNDINGSTYLEVAR_TABBARBORDERSIZESTYLEVAR_BUTTONTEXTALIGNSTYLEVAR_SELECTABLETEXTALIGNSTYLEVAR_SEPARATORTEXTBORDERSIZESTYLEVAR_SEPARATORTEXTALIGNSTYLEVAR_SEPARATORTEXTPADDINGSTYLEVAR_DOCKINGSEPARATORSIZESTYLEVAR_COUNT
Key
KEY_NONEKEY_TABKEY_LEFTARROWKEY_RIGHTARROWKEY_UPARROWKEY_DOWNARROWKEY_PAGEUPKEY_PAGEDOWNKEY_HOMEKEY_ENDKEY_INSERTKEY_DELETEKEY_BACKSPACEKEY_SPACEKEY_ENTERKEY_ESCAPEKEY_LEFTCTRLKEY_LEFTSHIFTKEY_LEFTALTKEY_LEFTSUPERKEY_RIGHTCTRLKEY_RIGHTSHIFTKEY_RIGHTALTKEY_RIGHTSUPERKEY_MENUKEY_0KEY_1KEY_2KEY_3KEY_4KEY_5KEY_6KEY_7KEY_8KEY_9KEY_AKEY_BKEY_CKEY_DKEY_EKEY_FKEY_GKEY_HKEY_IKEY_JKEY_KKEY_LKEY_MKEY_NKEY_OKEY_PKEY_QKEY_RKEY_SKEY_TKEY_UKEY_VKEY_WKEY_XKEY_YKEY_ZKEY_F1KEY_F2KEY_F3KEY_F4KEY_F5KEY_F6KEY_F7KEY_F8KEY_F9KEY_F10KEY_F11KEY_F12KEY_F13KEY_F14KEY_F15KEY_F16KEY_F17KEY_F18KEY_F19KEY_F20KEY_F21KEY_F22KEY_F23KEY_F24KEY_APOSTROPHEKEY_COMMAKEY_MINUSKEY_PERIODKEY_SLASHKEY_SEMICOLONKEY_EQUALKEY_LEFTBRACKETKEY_BACKSLASHKEY_RIGHTBRACKETKEY_GRAVEACCENTKEY_CAPSLOCKKEY_SCROLLLOCKKEY_NUMLOCKKEY_PRINTSCREENKEY_PAUSEKEY_KEYPAD0KEY_KEYPAD1KEY_KEYPAD2KEY_KEYPAD3KEY_KEYPAD4KEY_KEYPAD5KEY_KEYPAD6KEY_KEYPAD7KEY_KEYPAD8KEY_KEYPAD9KEY_KEYPADDECIMALKEY_KEYPADDIVIDEKEY_KEYPADMULTIPLYKEY_KEYPADSUBTRACTKEY_KEYPADADDKEY_KEYPADENTERKEY_KEYPADEQUALKEY_APPBACKKEY_APPFORWARDKEY_GAMEPADSTARTKEY_GAMEPADBACKKEY_GAMEPADFACELEFTKEY_GAMEPADFACERIGHTKEY_GAMEPADFACEUPKEY_GAMEPADFACEDOWNKEY_GAMEPADDPADLEFTKEY_GAMEPADDPADRIGHTKEY_GAMEPADDPADUPKEY_GAMEPADDPADDOWNKEY_GAMEPADL1KEY_GAMEPADR1KEY_GAMEPADL2KEY_GAMEPADR2KEY_GAMEPADL3KEY_GAMEPADR3KEY_GAMEPADLSTICKLEFTKEY_GAMEPADLSTICKRIGHTKEY_GAMEPADLSTICKUPKEY_GAMEPADLSTICKDOWNKEY_GAMEPADRSTICKLEFTKEY_GAMEPADRSTICKRIGHTKEY_GAMEPADRSTICKUPKEY_GAMEPADRSTICKDOWNKEY_MOUSELEFTKEY_MOUSERIGHTKEY_MOUSEMIDDLEKEY_MOUSEX1KEY_MOUSEX2KEY_MOUSEWHEELXKEY_MOUSEWHEELYKEY_RESERVEDFORMODCTRLKEY_RESERVEDFORMODSHIFTKEY_RESERVEDFORMODALTKEY_RESERVEDFORMODSUPERKEY_COUNTKEY_MODNONEKEY_MODCTRLKEY_MODSHIFTKEY_MODALTKEY_MODSUPERKEY_MODSHORTCUTKEY_MODMASKKEY_NAMEDKEYBEGINKEY_NAMEDKEYENDKEY_NAMEDKEYCOUNTKEY_KEYSDATASIZEKEY_KEYSDATAOFFSET
Condition
COND_NONECOND_ALWAYSCOND_ONCECOND_FIRSTUSEEVERCOND_APPEARING
DrawFlags
FLAGDRAW_NONEFLAGDRAW_CLOSEDFLAGDRAW_ROUNDCORNERSTOPLEFTFLAGDRAW_ROUNDCORNERSTOPRIGHTFLAGDRAW_ROUNDCORNERSBOTTOMLEFTFLAGDRAW_ROUNDCORNERSBOTTOMRIGHTFLAGDRAW_ROUNDCORNERSNONEFLAGDRAW_ROUNDCORNERSTOPFLAGDRAW_ROUNDCORNERSBOTTOMFLAGDRAW_ROUNDCORNERSLEFTFLAGDRAW_ROUNDCORNERSRIGHTFLAGDRAW_ROUNDCORNERSALLFLAGDRAW_ROUNDCORNERSDEFAULTFLAGDRAW_ROUNDCORNERSMASK
FocusedFlags
FLAGFOCUS_NONEFLAGFOCUS_CHILDWINDOWSFLAGFOCUS_ROOTWINDOWFLAGFOCUS_ANYWINDOWFLAGFOCUS_NOPOPUPHIERARCHYFLAGFOCUS_DOCKHIERARCHYFLAGFOCUS_ROOTANDCHILDWINDOWS
HoveredFlags
FLAGHOVERED_NONEFLAGHOVERED_CHILDWINDOWSFLAGHOVERED_ROOTWINDOWFLAGHOVERED_ANYWINDOWFLAGHOVERED_NOPOPUPHIERARCHYFLAGHOVERED_DOCKHIERARCHYFLAGHOVERED_ALLOWWHENBLOCKEDBYPOPUPFLAGHOVERED_ALLOWWHENBLOCKEDBYACTIVEITEMFLAGHOVERED_ALLOWWHENOVERLAPPEDBYITEMFLAGHOVERED_ALLOWWHENOVERLAPPEDBYWINDOWFLAGHOVERED_ALLOWWHENDISABLEDFLAGHOVERED_NONAVOVERRIDEFLAGHOVERED_ALLOWWHENOVERLAPPEDFLAGHOVERED_RECTONLYFLAGHOVERED_ROOTANDCHILDWINDOWSFLAGHOVERED_FORTOOLTIPFLAGHOVERED_STATIONARYFLAGHOVERED_DELAYNONEFLAGHOVERED_DELAYSHORTFLAGHOVERED_DELAYNORMALFLAGHOVERED_NOSHAREDDELAY
MouseCursor
MOUSECURSOR_NONEMOUSECURSOR_ARROWMOUSECURSOR_TEXTINPUTMOUSECURSOR_RESIZEALLMOUSECURSOR_RESIZENSMOUSECURSOR_RESIZEEWMOUSECURSOR_RESIZENESWMOUSECURSOR_RESIZENWSEMOUSECURSOR_HANDMOUSECURSOR_NOTALLOWEDMOUSECURSOR_COUNT
Action
ACTION_RELEASEACTION_PRESSACTION_REPEAT
WidgetType
WIDGET_LABELWIDGET_MARKDOWNWIDGET_BUTTONWIDGET_DUMMYWIDGET_SEPARATORWIDGET_BULLET_TEXTWIDGET_BULLETWIDGET_CHECKBOXWIDGET_CHILDWIDGET_COLOR_EDITWIDGET_COLUMNWIDGET_ROWWIDGET_COMBO_CUSTOMWIDGET_COMBOWIDGET_CONDITIONWIDGET_CONTEXT_MENUWIDGET_DATE_PICKERWIDGET_DRAG_INTWIDGET_INPUT_FLOATWIDGET_INPUT_INTWIDGET_INPUT_TEXTWIDGET_INPUT_TEXT_MULTILINEWIDGET_PROGRESS_BARWIDGET_PROGRESS_INDICATORWIDGET_SPACINGWIDGET_BUTTON_SMALLWIDGET_BUTTON_RADIOWIDGET_IMAGE_URLWIDGET_IMAGEWIDGET_LIST_BOXWIDGET_LIST_CLIPPERWIDGET_MENU_BAR_MAINWIDGET_MENU_BARWIDGET_MENU_ITEMWIDGET_MENUWIDGET_SELECTABLEWIDGET_SLIDER_FLOATWIDGET_SLIDER_INTWIDGET_VSLIDER_INTWIDGET_TAB_BARWIDGET_TAB_ITEMWIDGET_TOOLTIPWIDGET_TABLE_COLUMNWIDGET_TABLE_ROWWIDGET_TABLEWIDGET_BUTTON_ARROWWIDGET_TREE_NODEWIDGET_TREE_TABLE_ROWWIDGET_TREE_TABLEWIDGET_WINDOW_SINGLEWIDGET_POPUP_MODALWIDGET_POPUPWIDGET_LAYOUT_SPLITWIDGET_SPLITTERWIDGET_STACKWIDGET_ALIGNWIDGET_MSG_BOXWIDGET_MSG_BOX_PREPAREWIDGET_BUTTON_INVISIBLEWIDGET_BUTTON_IMAGEWIDGET_STYLEWIDGET_CUSTOMWIDGET_EVENT_HANDLERWIDGET_PLOTWIDGET_CSS_TAGWIDGET_CODEEDITOR
Structs
Shortcut
- key
int<gui.Key> - mod
int<gui.Key> - callback
function()
WidgetLabel
- type
string<gui.WidgetType> - label
string
wrapped
wrapped(self, bool) -> self
font
font(self, int<ref.FONT>) -> self
WidgetMarkdown
- type
string<gui.WidgetType> - md
string
h1
h1(self, font int<ref.FONT>, separator bool) -> self
h2
h2(self, font int<ref.FONT>, separator bool) -> self
h3
h3(self, font int<ref.FONT>, separator bool) -> self
WidgetButton
- type
string<gui.WidgetType> - label
string
disabled
disabled(self, bool) -> self
size
size(self, width float, height float) -> self
on_click
on_click(self, callback {function()}) -> self
WidgetDummy
- type
string<gui.WidgetType> - width
float - height
float
WidgetSeparator
- type
string<gui.WidgetType>
WidgetBulletText
- type
string<gui.WidgetType> - text
string
WidgetBullet
- type
string<gui.WidgetType>
WidgetCheckbox
- type
string<gui.WidgetType> - text
string - boolref
int<ref.BOOL>
on_change
on_change(self, {function(bool, int<ref.BOOL>)}) -> self
WidgetChild
- type
string<gui.WidgetType>
border
border(self, bool) -> self
size
size(self, width float, height float) -> self
layout
layout(self, widgets []struct<gui.Widget>) -> self
flags
flags(self, flags int<gui.WindowFlags>) -> self
WidgetColorEdit
- type
string<gui.WidgetType> - label
string - colorref
int<ref.RGBA>
size
size(self, width float) -> self
on_change
on_change(self, callback {function(color struct<image.Color>, int<ref.RGBA>)}) -> self
flags
flags(self, flags int<gui.ColorEditFlags>) -> self
WidgetColumn
- type
string<gui.WidgetType> - widgets
[]struct<gui.Widget>
WidgetRow
- type
string<gui.WidgetType> - widgets
[]struct<gui.Widget>
WidgetComboCustom
- type
string<gui.WidgetType> - text
string - preview
string
size
size(self, width float) -> self
layout
layout(self, []struct<gui.Widget>) -> self
flags
flags(self, flags int<gui.ComboFlags>) -> self
WidgetCombo
- type
string<gui.WidgetType> - text
string - preview
string - items
[]string - i32ref
int<ref.INT32>
size
size(self, width float) -> self
on_change
on_change(self, {function(int, int<ref.INT32>)}) -> self
flags
flags(self, flags int<gui.ComboFlags) -> self
WidgetCondition
- type
string<gui.WidgetType> - condition
bool - layoutIf
struct<gui.Widget> - layoutElse
struct<gui.Widget>
WidgetContextMenu
- type
string<gui.WidgetType>
mouse_button
mouse_button(self, button int<gui.MouseButton>) -> self
layout
layout(self, []struct<gui.Widget>) -> self
WidgetDatePicker
- type
string<gui.WidgetType> - id
string - timeref
int<ref.TIME>
on_change
on_change(self, {function(string, int<ref.TIME>)}) -> self
format
format(self, format string) -> self
size
size(self, width float) -> self
start_of_week
start_of_week(self, day int<time.Weekday>) -> self
translation
translation(self, label string<gui.DatePickerLabel>, value string) -> self
WidgetDragInt
- type
string<gui.WidgetType> - text
string - i32ref
int<ref.INT32> - minvalue
int - maxvalue
int
speed
speed(self, speed float) -> self
format
format(self, format string) -> self
WidgetInputFloat
- type
string<gui.WidgetType> - f32ref
int<ref.FLOAT32>
size
size(self, width float) -> self
on_change
on_change(self, {function(float, int<ref.FLOAT32>)}) -> self
format
format(self, format string) -> self
flags
flags(self, flags int<gui.InputFlags>) -> self
label
label(self, label string) -> self
step_size
step_size(self, stepsize float) -> self
step_size_fast
step_size_fast(self, stepsize float) -> self
WidgetInputInt
- type
string<gui.WidgetType> - i32ref
int<ref.INT32>
size
size(self, width float) -> self
on_change
on_change(self, {function(int, int<ref.INT32>)}) -> self
flags
flags(self, flags int<gui.InputFlags>) -> self
label
label(self, label string) -> self
step_size
step_size(self, stepsize int) -> self
step_size_fast
step_size_fast(self, stepsize int) -> self
WidgetInputText
- type
string<gui.WidgetType> - strref
int<ref.STRING>
size
size(self, width float) -> self
flags
flags(self, flags int<gui.InputFlags>) -> self
label
label(self, label strings) -> self
autocomplete
autocomplete(self, []string) -> self
callback
callback(self, {function(string, int<ref.STRING>)}) -> self
hint
hint(self, hint string) -> self
WidgetInputTextMultiline
- type
string<gui.WidgetType> - strref
int<ref.STRING>
size
size(self, width float, height float) -> self
on_change
on_change(self, {function(string, int<ref.STRING>)}) -> self
flags
flags(self, flags int<gui.InputFlags>) -> self
label
label(self, label string) -> self
callback
callback(self, {function(string, int<ref.STRING>)}) -> self
autoscroll_to_bottom
autoscroll_to_bottom(self, bool) -> self
WidgetProgressBar
- type
string<gui.WidgetType> - fraction
float
overlay
overlay(self, label string) -> self
size
size(self, width float, height float) -> self
WidgetProgressIndicator
- type
string<gui.WidgetType> - label
string - width
float - height
float - radius
float
WidgetSpacing
- type
string<gui.WidgetType>
WidgetButtonSmall
- type
string<gui.WidgetType> - label
string
on_click
on_click(self, callback {function()}) -> self
WidgetButtonRadio
- type
string<gui.WidgetType> - label
string - active
bool
on_change
on_change(self, {function()}) -> self
WidgetImageURL
- type
string<gui.WidgetType> - url
string
on_click
on_click(self, {function()}) -> self
size
size(self, width float, height float) -> self
timeout
timeout(self, timeout int) -> self
layout_for_failure
layout_for_failure(self, []struct<gui.Widget>) -> self
layout_for_loading
layout_for_loading(self, []struct<gui.Widget>) -> self
on_failure
on_failure(self, {function()}) -> self
on_ready
on_ready(self, {function()}) -> self
WidgetImage
- type
string<gui.WidgetType> - image
int<collection.IMAGE> - imagecached
int<collection.CRATE_CACHEDIMAGE> - sync
bool - cached
bool
on_click
on_click(self, {function()}) -> self
size
size(self, width float, height float) -> self
WidgetListBox
- type
string<gui.WidgetType> - items
[]string
on_change
on_change(self, {function(int)}) -> self
border
border(self, bool) -> self
context_menu
context_menu(self, []struct<gui.Widget>) -> self
on_double_click
on_double_click(self, {function(int)}) -> self
on_menu
on_menu(self, {function(int, string)}) -> self
selected_index
selected_index(self, int) -> self
size
size(self, width float, height float) -> self
WidgetListClipper
- type
string<gui.WidgetType>
layout
layout(self, []struct<gui.Widget>) -> self
WidgetMainMenuBar
- type
string<gui.WidgetType>
layout
layout(self, []struct<gui.Widget>) -> self
WidgetMenuBar
- type
string<gui.WidgetType>
layout
layout(self, []struct<gui.Widget>) -> self
WidgetMenuItem
- type
string<gui.WidgetType> - label
string
enabled
enabled(self, bool) -> self
on_click
on_click(self, {function()}) -> self
selected
selected(self, bool) -> self
shortcut
shortcut(self, string) -> self
WidgetMenu
- type
string<gui.WidgetType> - label
string
enabled
enabled(self, bool) -> self
layout
layout(self, []struct<gui.Widget>) -> self
WidgetSelectable
- type
string<gui.WidgetType> - label
string
on_click
on_click(self, {function()}) -> self
on_double_click
on_double_click(self, {function()}) -> self
selected
selected(self, bool) -> self
size
size(self, width float, height float) -> self
flags
flags(self, flags int<gui.SelectableFlags>) -> self
WidgetSliderFloat
- type
string<gui.WidgetType> - f32ref
int<ref.FLOAT32> - min
float - max
float
on_change
on_change(self, {function(float, int<ref.FLOAT32>)}) -> self
label
label(self, string) -> self
format
format(self, string) -> self
size
size(self, width float) -> self
WidgetSliderInt
- type
string<gui.WidgetType> - i32ref
int<ref.INT32> - min
int - max
int
on_change
on_change(self, {function(int, int<ref.INT32>)}) -> self
label
label(self, string) -> self
format
format(self, string) -> self
size
size(self, width float) -> self
WidgetVSliderInt
- type
string<gui.WidgetType> - i32ref
int<ref.INT32> - min
int - max
int
on_change
on_change(self, {function(int, int<ref.INT32>)}) -> self
label
label(self, string) -> self
format
format(self, string) -> self
size
size(self, width float, height float) -> self
flags
flags(self, flags int<gui.SliderFlags>) -> self
WidgetTabBar
- type
string<gui.WidgetType>
flags
flags(self, flags int<gui.TabBarFlags>) -> self
tab_items
tab_items(self, []struct<gui.TabItem>) -> self
TabItem
- type
string<gui.WidgetType> - label
string
flags
flags(self, flags int<gui.TabItemFlags>) -> self
is_open
is_open(self, bool) -> self
layout
layout(self, []struct<gui.Widget>) -> self
WidgetTooltip
- type
string<gui.WidgetType> - tip
string
layout
layout(self, []struct<gui.Widget>) -> self
to
to(self, []struct<gui.Widget>) -> self
TableColumn
Only used in table widget columns.
- type
string<gui.WidgetType> - label
string
flags
flags(self, flags int<gui.TableColumnFlags>) -> self
inner_width_or_weight
inner_width_or_weight(self, width float) -> self
TableRow
Only used in table widget rows.
- type
string<gui.WidgetType> - widgets
[]struct<gui.Widget>
flags
flags(self, flags int<gui.TableRowFlags>) -> self
bg_color
bg_color(self, color struct<image.Color>) -> self
min_height
min_height(self, height float) -> self
WidgetTable
- type
string<gui.WidgetType>
flags
flags(self, flags int<gui.TableFlags>) -> self
fast_mode
fast_mode(self, bool) -> self
no_header
no_header(self, bool) -> self
size
size(self, width float, height float) -> self
columns
columns(self, []struct<gui.TableColumn>) -> self
rows
rows(self, []struct<gui.TableRow>) -> self
inner_width
inner_width(self, width float) -> self
freeze
freeze(self, col int, row int) -> self
Can be called multiple times.
WidgetButtonArrow
- type
string<gui.WidgetType> - dir
int<gui.Direction>
on_click
on_click(self, {function()}) -> self
WidgetTreeNode
- type
string<gui.WidgetType> - label
string
flags
flags(self, flags int<gui.TreeNodeFlags>) -> self
layout
layout(self, []struct<gui.Widget>) -> self
TreeTableRow
Only used in tree table widget rows.
- type
string<gui.WidgetType> - label
string - widgets
[]struct<gui.Widget>
flags
flags(self, flags int<gui.TreeNodeFlags>) -> self
children
children(self, []struct<gui.TreeTableRow>) -> self
WidgetTreeTable
- type
string<gui.WidgetType>
flags
flags(self, flags int<gui.TableFlags>) -> self
size
size(self, width float, height float) -> self
columns
columns(self, []struct<TableColumn>) -> self
rows
rows(self, []struct<TreeTableRow>) -> self
freeze
freeze(self, col int, row int) -> self
Can be called multiple times.
WidgetWindow
- type
string<gui.WidgetType> - single
bool - menubar
bool - label
string
flags
flags(self, flags int<gui.WindowFlags>) -> self
size
size(self, width float, height float) -> self
pos
pos(self, x float, y float) -> self
is_open
is_open(self, bool) -> self
bring_to_front
bring_to_front(self) -> self
ready
ready(self, {function(struct<gui.StateWindow>)}) -> self
register_keyboard_shortcuts
register_keyboard_shortcuts(self, []struct<gui.Shortcut>) -> self
layout
layout(self, []struct<gui.Widget>) -> self
StateWindow
current_position
current_position() -> float, float
current_size
current_size() -> float, float
has_focus
has_focus() -> bool
WidgetPopupModel
- type
string<gui.WidgetType> - label
string
flags
flags(self, flags int<gui.WindowFlags>) -> self
is_open
is_open(self, bool) -> self
layout
layout(self, []struct<gui.Widget>) -> self
WidgetPopup
- type
string<gui.WidgetType> - label
string
flags
flags(self, flags int<gui.WindowFlags>) -> self
layout
layout(self, []struct<gui.Widget>) -> self
WidgetSplitLayout
- type
string<gui.WidgetType> - direction
int<gui.SplitDirection> - floatref
int<ref.FLOAT32> - layout1
[]struct<gui.Widget> - layout2
[]struct<gui.Widget>
border
border(self, bool) -> self
WidgetSplitter
- type
string<gui.WidgetType> - direction
int<gui.SplitDirection> - floatref
int<ref.FLOAT32>
size
size(self, width float, height float) -> self
WidgetStack
- type
string<gui.WidgetType> - visible
int - widgets
[]struct<gui.Widget>
WidgetAlign
- type
string<gui.WidgetType> - at
int<gui.Alignment>
to
to(self, []struct<gui.Widget>) -> self
WidgetMSGBox
- type
string<gui.WidgetType> - title
string - content
string
buttons
buttons(self, int<gui.MSGBoxButtons>) -> self
result_callback
result_callback(self, {function(bool)}) -> self
WidgetMSGBoxPrepare
This is used internally with gui.prepare_msg_box().
- type
string<gui.WidgetType>
WidgetButtonInvisible
- type
string<gui.WidgetType>
size
size(self, width float, height float) -> self
on_click
on_click(self, {function()}) -> self
WidgetButtonImage
- type
string<gui.WidgetType> - id
int<collection.IMAGE> - cachedid
int<collection.CRATE_CACHEDIMAGE> - sync
bool - cached
bool
size
size(self, width float, height float) -> self
on_click
on_click(self, {function()}) -> self
bg_color
bg_color(self, struct<image.Color>) -> self
tint_color
tint_color(self, struct<image.Color>) -> self
frame_padding
frame_padding(self, padding float) -> self
uv
uv(self, uv0 struct<image.Point>, uv1 struct<image.Point>) -> self
WidgetStyle
- type
string<gui.WidgetType>
set_disabled
set_disabled(self, bool) -> self
to
to(self, []struct<gui.Widget>) -> self
plots
plots(self, []struct<guiplot.Plot>) -> self
set_font_size
set_font_size(self, float) -> self
set_color
set_color(self, int<gui.StyleColorID>, struct<image.Color>) -> self
set_style
set_style(self, int<gui.StyleVarID>, width float, height float) -> self
set_style_float
set_style_float(self, int<gui.StyleVarID>, float) -> self
set_plot_color
set_plot_color(self, int<guiplot.StylePlotColorID>, struct<image.Color>) -> self
set_plot_style
set_plot_style(self, int<guiplot.StylePlotVar>, width float, height float) -> self
set_plot_style_float
set_plot_style_float(self, int<guiplot.StylePlotVar>, float) -> self
font
font(self, int<ref.FONT>) -> self
WidgetCustom
- type
string<gui.WidgetType> - builder
function()
WidgetEvent
- type
string<gui.WidgetType>
on_activate
on_activate(self, {function()}) -> self
on_active
on_active(self, {function()}) -> self
on_deactivate
on_deactivate(self, {function()}) -> self
on_hover
on_hover(self, {function()}) -> self
on_click
on_click(self, int<gui.MouseButton>, {function()}) -> self
on_dclick
on_dclick(self, int<gui.MouseButton>, {function()}) -> self
on_key_down
on_key_down(self, int<gui.Key>, {function()}) -> self
on_key_pressed
on_key_pressed(self, int<gui.Key>, {function()}) -> self
on_key_released
on_key_released(self, int<gui.Key>, {function()}) -> self
on_mouse_down
on_mouse_down(self, int<gui.MouseButton>, {function()}) -> self
on_mouse_released
on_mouse_released(self, int<gui.MouseButton>, {function()}) -> self
WidgetCSSTag
- type
string<gui.WidgetType> - tag
string
to
to(self, []struct<gui.Widget>) -> self
Interfaces
Widget
- type
string<gui.WidgetType>