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
float
X padding.float
Y 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_NONE
FLAGCOLOREDIT_NOALPHA
FLAGCOLOREDIT_NOPICKER
FLAGCOLOREDIT_NOOPTIONS
FLAGCOLOREDIT_NOSMALLPREVIEW
FLAGCOLOREDIT_NOINPUTS
FLAGCOLOREDIT_NOTOOLTIP
FLAGCOLOREDIT_NOLABEL
FLAGCOLOREDIT_NOSIDEPREVIEW
FLAGCOLOREDIT_NODRAGDROP
FLAGCOLOREDIT_NOBORDER
FLAGCOLOREDIT_ALPHABAR
FLAGCOLOREDIT_ALPHAPREVIEW
FLAGCOLOREDIT_ALPHAPREVIEWHALF
FLAGCOLOREDIT_HDR
FLAGCOLOREDIT_DISPLAYRGB
FLAGCOLOREDIT_DISPLAYHSV
FLAGCOLOREDIT_DISPLAYHEX
FLAGCOLOREDIT_UINT8
FLAGCOLOREDIT_FLOAT
FLAGCOLOREDIT_HUEBAR
FLAGCOLOREDIT_HUEWHEEL
FLAGCOLOREDIT_INPUTRGB
FLAGCOLOREDIT_INPUTHSV
FLAGCOLOREDIT_DEFAULTOPTIONS
FLAGCOLOREDIT_DISPLAYMASK
FLAGCOLOREDIT_DATATYPEMASK
FLAGCOLOREDIT_PICKERMASK
FLAGCOLOREDIT_INPUTMASK
ComboFlags
FLAGCOMBO_NONE
FLAGCOMBO_POPUPALIGNLEFT
FLAGCOMBO_HEIGHTSMALL
FLAGCOMBO_HEIGHTREGULAR
FLAGCOMBO_HEIGHTLARGE
FLAGCOMBO_HEIGHTLARGEST
FLAGCOMBO_NOARROWBUTTON
FLAGCOMBO_NOPREVIEW
FLAGCOMBO_WIDTHFITPREVIEW
FLAGCOMBO_HEIGHTMASK
MouseButton
MOUSEBUTTON_LEFT
MOUSEBUTTON_RIGHT
MOUSEBUTTON_MIDDLE
DatePickerLabel
DATEPICKERLABEL_MONTH
DATEPICKERLABEL_YEAR
InputFlag
FLAGINPUTTEXT_NONE
FLAGINPUTTEXT_CHARSDECIMAL
FLAGINPUTTEXT_CHARSHEXADECIMAL
FLAGINPUTTEXT_CHARSUPPERCASE
FLAGINPUTTEXT_CHARSNOBLANK
FLAGINPUTTEXT_AUTOSELECTALL
FLAGINPUTTEXT_ENTERRETURNSTRUE
FLAGINPUTTEXT_CALLBACKCOMPLETION
FLAGINPUTTEXT_CALLBACKHISTORY
FLAGINPUTTEXT_CALLBACKALWAYS
FLAGINPUTTEXT_CALLBACKCHARFILTER
FLAGINPUTTEXT_ALLOWTABINPUT
FLAGINPUTTEXT_CTRLENTERFORNEWLINE
FLAGINPUTTEXT_NOHORIZONTALSCROLL
FLAGINPUTTEXT_ALWAYSOVERWRITE
FLAGINPUTTEXT_READONLY
FLAGINPUTTEXT_PASSWORD
FLAGINPUTTEXT_NOUNDOREDO
FLAGINPUTTEXT_CHARSSCIENTIFIC
FLAGINPUTTEXT_CALLBACKRESIZE
FLAGINPUTTEXT_CALLBACKEDIT
FLAGINPUTTEXT_ESCAPECLEARSALL
SelectableFlags
FLAGSELECTABLE_NONE
FLAGSELECTABLE_DONTCLOSEPOPUPS
FLAGSELECTABLE_SPANALLCOLUMNS
FLAGSELECTABLE_ALLOWDOUBLECLICK
FLAGSELECTABLE_DISABLED
FLAGSELECTABLE_ALLOWOVERLAP
SliderFlags
FLAGSLIDER_NONE
FLAGSLIDER_ALWAYSCLAMP
FLAGSLIDER_LOGARITHMIC
FLAGSLIDER_NOROUNDTOFORMAT
FLAGSLIDER_NOINPUT
FLAGSLIDER_INVALIDMASK
TabBarFlags
FLAGTABBAR_NONE
FLAGTABBAR_REORDERABLE
FLAGTABBAR_AUTOSELECTNEWTABS
FLAGTABBAR_TABLLISTPOPUPBUTTON
FLAGTABBAR_NOCLOSEWITHMIDDLEMOUSEBUTTON
FLAGTABBAR_NOTABLISTSCROLLINGBUTTONS
FLAGTABBAR_NOTOOLTIP
FLAGTABBAR_FITTINGPOLICYRESIZEDOWN
FLAGTABBAR_FITTINGPOLICYSCROLL
FLAGTABBAR_FITTINGPOLICYMASK
FLAGTABBAR_FITTINGPOLICYDEFAULT
TabItemFlags
FLAGTABITEM_NONE
FLAGTABITEM_UNSAVEDOCUMENT
FLAGTABITEM_SETSELECTED
FLAGTABITEM_NOCLOSEWITHMIDDLEMOUSEBUTTON
FLAGTABITEM_NOPUSHID
FLAGTABITEM_NOTOOLTIP
FLAGTABITEM_NOREORDER
FLAGTABITEM_LEADING
FLAGTABITEM_TRAILING
FLAGTABITEM_NOASSUMEDCLOSURE
TableColumnFlags
FLAGTABLECOLUMN_NONE
FLAGTABLECOLUMN_DEFAULTHIDE
FLAGTABLECOLUMN_DEFAULTSORT
FLAGTABLECOLUMN_WIDTHSTRETCH
FLAGTABLECOLUMN_WIDTHFIXED
FLAGTABLECOLUMN_NORESIZE
FLAGTABLECOLUMN_NOREORDER
FLAGTABLECOLUMN_NOHIDE
FLAGTABLECOLUMN_NOCLIP
FLAGTABLECOLUMN_NOSORT
FLAGTABLECOLUMN_NOSORTASCENDING
FLAGTABLECOLUMN_NOSORTDESCENDING
FLAGTABLECOLUMN_NOHEADERWIDTH
FLAGTABLECOLUMN_PREFERSORTASCENDING
FLAGTABLECOLUMN_PREFERSORTDESCENDING
FLAGTABLECOLUMN_INDENTENABLE
FLAGTABLECOLUMN_INDENTDISABLE
FLAGTABLECOLUMN_ISENABLED
FLAGTABLECOLUMN_ISVISIBLE
FLAGTABLECOLUMN_ISSORTED
FLAGTABLECOLUMN_ISHOVERED
FLAGTABLECOLUMN_WIDTHMASK
FLAGTABLECOLUMN_INDENTMASK
FLAGTABLECOLUMN_STATUSMASK
FLAGTABLECOLUMN_NODIRECTRESIZE
TableRowFlags
FLAGTABLEROW_NONE
FLAGTABLEROW_HEADERS
TableFlags
FLAGTABLE_NONE
FLAGTABLE_RESIZEABLE
FLAGTABLE_REORDERABLE
FLAGTABLE_HIDEABLE
FLAGTABLE_SORTABLE
FLAGTABLE_NOSAVEDSETTINGS
FLAGTABLE_CONTEXTMENUINBODY
FLAGTABLE_ROWBG
FLAGTABLE_BORDERSINNERH
FLAGTABLE_BORDERSOUTERH
FLAGTABLE_BORDERSINNERV
FLAGTABLE_BORDERSOUTERV
FLAGTABLE_BORDERSH
FLAGTABLE_BORDERSV
FLAGTABLE_BORDERSINNER
FLAGTABLE_BORDERSOUTER
FLAGTABLE_BORDERS
FLAGTABLE_NOBORDERSINBODY
FLAGTABLE_NOBORDERSINBODYUNTILRESIZE
FLAGTABLE_SIZINGFIXEDFIT
FLAGTABLE_SIZINGFIXEDSAME
FLAGTABLE_SIZINGSTRETCHPROP
FLAGTABLE_SIZINGSTRETCHSAME
FLAGTABLE_NOHOSTEXTENDX
FLAGTABLE_NOHOSTEXTENDY
FLAGTABLE_NOKEEPCOLUMNSVISIBLE
FLAGTABLE_PRECISEWIDTHS
FLAGTABLE_NOCLIP
FLAGTABLE_PADOUTERX
FLAGTABLE_NOPADOUTERX
FLAGTABLE_NOPADINNERX
FLAGTABLE_SCROLLX
FLAGTABLE_SCROLLY
FLAGTABLE_SORTMULTI
FLAGTABLE_SORTTRISTATE
FLAGTABLE_HIGHLIGHTHOVEREDCOLUMN
FLAGTABLE_SIZINGMASK
Direction
DIR_NONE
DIR_LEFT
DIR_RIGHT
DIR_UP
DIR_DOWN
DIR_COUNT
TreeNodeFlags
FLAGTREENODE_NONE
FLAGTREENODE_SELECTED
FLAGTREENODE_FRAMED
FLAGTREENODE_ALLOWOVERLAP
FLAGTREENODE_NOTREEPUSHONOPEN
FLAGTREENODE_NOAUTOOPENONLOG
FLAGTREENODE_DEFAULTOPEN
FLAGTREENODE_OPENONDOUBLECLICK
FLAGTREENODE_OPENONARROW
FLAGTREENODE_LEAF
FLAGTREENODE_BULLET
FLAGTREENODE_FRAMEPADDING
FLAGTREENODE_SPANAVAILWIDTH
FLAGTREENODE_SPANFULLWIDTH
FLAGTREENODE_SPANALLCOLUMNS
FLAGTREENODE_NAVLEFTJUMPSBACKHERE
FLAGTREENODE_COLLAPSINGHEADER
MasterWindowFlags
FLAGMASTERWINDOW_NOTRESIZABLE
FLAGMASTERWINDOW_MAXIMIZED
FLAGMASTERWINDOW_FLOATING
FLAGMASTERWINDOW_FRAMELESS
FLAGMASTERWINDOW_TRANSPARENT
FLAGMASTERWINDOW_HIDDEN
WindowFlags
FLAGWINDOW_NONE
FLAGWINDOW_NOTITLEBAR
FLAGWINDOW_NORESIZE
FLAGWINDOW_NOMOVE
FLAGWINDOW_NOSCROLLBAR
FLAGWINDOW_NOSCROLLWITHMOUSE
FLAGWINDOW_NOCOLLAPSE
FLAGWINDOW_ALWAYSAUTORESIZE
FLAGWINDOW_NOBACKGROUND
FLAGWINDOW_NOSAVEDSETTINGS
FLAGWINDOW_NOMOUSEINPUTS
FLAGWINDOW_MENUBAR
FLAGWINDOW_HORIZONTALSCROLLBAR
FLAGWINDOW_NOFOCUSONAPPEARING
FLAGWINDOW_NOBRINGTOFRONTONFOCUS
FLAGWINDOW_ALWAYSVERTICALSCROLLBAR
FLAGWINDOW_ALWAYSHORIZONTALSCROLLBAR
FLAGWINDOW_NONAVINPUTS
FLAGWINDOW_NONAVFOCUS
FLAGWINDOW_UNSAVEDDOCUMENT
FLAGWINDOW_NONAV
FLAGWINDOW_NODECORATION
FLAGWINDOW_NOINPUTS
FLAGWINDOW_NODOCKING
SplitDirection
SPLITDIRECTION_HORIZONTAL
SPLITDIRECTION_VERTICAL
Alignment
ALIGN_LEFT
ALIGN_CENTER
ALIGN_RIGHT
MSGBoxButtons
MSGBOXBUTTONS_YESNO
MSGBOXBUTTONS_OKCANCEL
MSGBOXBUTTONS_OK
StyleColorID
COLID_TEXT
COLID_TEXTDISABLED
COLID_WINDOWBG
COLID_CHILDBG
COLID_POPUPBG
COLID_BORDER
COLID_BORDERSHADOW
COLID_FRAMEBG
COLID_FRAMEBGHOVERED
COLID_FRAMEBGACTIVE
COLID_TITLEBG
COLID_TITLEBGACTIVE
COLID_TITLEBGCOLLAPSED
COLID_MENUBARBG
COLID_SCROLLBARBG
COLID_SCROLLBARGRAB
COLID_SCROLLBARGRABHOVERED
COLID_SCROLLBARGRABACTIVE
COLID_CHECKMARK
COLID_SLIDERGRAB
COLID_SLIDERGRABACTIVE
COLID_BUTTON
COLID_BUTTONHOVERED
COLID_BUTTONACTIVE
COLID_HEADER
COLID_HEADERHOVERED
COLID_HEADERACTIVE
COLID_SEPARATOR
COLID_SEPARATORHOVERED
COLID_SEPARATORACTIVE
COLID_RESIZEGRIP
COLID_RESIZEGRIPHOVERED
COLID_RESIZEGRIPACTIVE
COLID_TAB
COLID_TABHOVERED
COLID_TABACTIVE
COLID_TABUNFOCUSED
COLID_TABUNFOCUSEDACTIVE
COLID_DOCKINGPREVIEW
COLID_DOCKINGEMPTYBG
COLID_PLOTLINES
COLID_PLOTLINESHOVERED
COLID_PLOTHISTOGRAM
COLID_PLOTHISTOGRAMHOVERED
COLID_TABLEHEADERBG
COLID_TABLEBORDERSTRONG
COLID_TABLEBORDERLIGHT
COLID_TABLEROWBG
COLID_TABLEROWBGALT
COLID_TEXTSELECTEDBG
COLID_DRAGDROPTARGET
COLID_NAVHIGHLIGHT
COLID_NAVWINDOWINGHIGHLIGHT
COLID_NAVWINDOWINGDIMBG
COLID_MODALWINDOWDIMBG
COLID_COUNT
StyleVarID
STYLEVAR_ALPHA
STYLEVAR_DISABLEDALPHA
STYLEVAR_WINDOWPADDING
STYLEVAR_WINDOWROUNDING
STYLEVAR_WINDOWBORDERSIZE
STYLEVAR_WINDOWMINSIZE
STYLEVAR_WINDOWTITLEALIGN
STYLEVAR_CHILDROUNDING
STYLEVAR_CHILDBORDERSIZE
STYLEVAR_POPUPROUNDING
STYLEVAR_POPUPBORDERSIZE
STYLEVAR_FRAMEPADDING
STYLEVAR_FRAMEROUNDING
STYLEVAR_FRAMEBORDERSIZE
STYLEVAR_ITEMSPACING
STYLEVAR_ITEMINNERSPACING
STYLEVAR_INDENTSPACING
STYLEVAR_CELLPADDING
STYLEVAR_SCROLLBARSIZE
STYLEVAR_SCROLLBARROUNDING
STYLEVAR_GRABMINSIZE
STYLEVAR_GRABROUNDING
STYLEVAR_TABROUNDING
STYLEVAR_TABBARBORDERSIZE
STYLEVAR_BUTTONTEXTALIGN
STYLEVAR_SELECTABLETEXTALIGN
STYLEVAR_SEPARATORTEXTBORDERSIZE
STYLEVAR_SEPARATORTEXTALIGN
STYLEVAR_SEPARATORTEXTPADDING
STYLEVAR_DOCKINGSEPARATORSIZE
STYLEVAR_COUNT
Key
KEY_NONE
KEY_TAB
KEY_LEFTARROW
KEY_RIGHTARROW
KEY_UPARROW
KEY_DOWNARROW
KEY_PAGEUP
KEY_PAGEDOWN
KEY_HOME
KEY_END
KEY_INSERT
KEY_DELETE
KEY_BACKSPACE
KEY_SPACE
KEY_ENTER
KEY_ESCAPE
KEY_LEFTCTRL
KEY_LEFTSHIFT
KEY_LEFTALT
KEY_LEFTSUPER
KEY_RIGHTCTRL
KEY_RIGHTSHIFT
KEY_RIGHTALT
KEY_RIGHTSUPER
KEY_MENU
KEY_0
KEY_1
KEY_2
KEY_3
KEY_4
KEY_5
KEY_6
KEY_7
KEY_8
KEY_9
KEY_A
KEY_B
KEY_C
KEY_D
KEY_E
KEY_F
KEY_G
KEY_H
KEY_I
KEY_J
KEY_K
KEY_L
KEY_M
KEY_N
KEY_O
KEY_P
KEY_Q
KEY_R
KEY_S
KEY_T
KEY_U
KEY_V
KEY_W
KEY_X
KEY_Y
KEY_Z
KEY_F1
KEY_F2
KEY_F3
KEY_F4
KEY_F5
KEY_F6
KEY_F7
KEY_F8
KEY_F9
KEY_F10
KEY_F11
KEY_F12
KEY_F13
KEY_F14
KEY_F15
KEY_F16
KEY_F17
KEY_F18
KEY_F19
KEY_F20
KEY_F21
KEY_F22
KEY_F23
KEY_F24
KEY_APOSTROPHE
KEY_COMMA
KEY_MINUS
KEY_PERIOD
KEY_SLASH
KEY_SEMICOLON
KEY_EQUAL
KEY_LEFTBRACKET
KEY_BACKSLASH
KEY_RIGHTBRACKET
KEY_GRAVEACCENT
KEY_CAPSLOCK
KEY_SCROLLLOCK
KEY_NUMLOCK
KEY_PRINTSCREEN
KEY_PAUSE
KEY_KEYPAD0
KEY_KEYPAD1
KEY_KEYPAD2
KEY_KEYPAD3
KEY_KEYPAD4
KEY_KEYPAD5
KEY_KEYPAD6
KEY_KEYPAD7
KEY_KEYPAD8
KEY_KEYPAD9
KEY_KEYPADDECIMAL
KEY_KEYPADDIVIDE
KEY_KEYPADMULTIPLY
KEY_KEYPADSUBTRACT
KEY_KEYPADADD
KEY_KEYPADENTER
KEY_KEYPADEQUAL
KEY_APPBACK
KEY_APPFORWARD
KEY_GAMEPADSTART
KEY_GAMEPADBACK
KEY_GAMEPADFACELEFT
KEY_GAMEPADFACERIGHT
KEY_GAMEPADFACEUP
KEY_GAMEPADFACEDOWN
KEY_GAMEPADDPADLEFT
KEY_GAMEPADDPADRIGHT
KEY_GAMEPADDPADUP
KEY_GAMEPADDPADDOWN
KEY_GAMEPADL1
KEY_GAMEPADR1
KEY_GAMEPADL2
KEY_GAMEPADR2
KEY_GAMEPADL3
KEY_GAMEPADR3
KEY_GAMEPADLSTICKLEFT
KEY_GAMEPADLSTICKRIGHT
KEY_GAMEPADLSTICKUP
KEY_GAMEPADLSTICKDOWN
KEY_GAMEPADRSTICKLEFT
KEY_GAMEPADRSTICKRIGHT
KEY_GAMEPADRSTICKUP
KEY_GAMEPADRSTICKDOWN
KEY_MOUSELEFT
KEY_MOUSERIGHT
KEY_MOUSEMIDDLE
KEY_MOUSEX1
KEY_MOUSEX2
KEY_MOUSEWHEELX
KEY_MOUSEWHEELY
KEY_RESERVEDFORMODCTRL
KEY_RESERVEDFORMODSHIFT
KEY_RESERVEDFORMODALT
KEY_RESERVEDFORMODSUPER
KEY_COUNT
KEY_MODNONE
KEY_MODCTRL
KEY_MODSHIFT
KEY_MODALT
KEY_MODSUPER
KEY_MODSHORTCUT
KEY_MODMASK
KEY_NAMEDKEYBEGIN
KEY_NAMEDKEYEND
KEY_NAMEDKEYCOUNT
KEY_KEYSDATASIZE
KEY_KEYSDATAOFFSET
Condition
COND_NONE
COND_ALWAYS
COND_ONCE
COND_FIRSTUSEEVER
COND_APPEARING
DrawFlags
FLAGDRAW_NONE
FLAGDRAW_CLOSED
FLAGDRAW_ROUNDCORNERSTOPLEFT
FLAGDRAW_ROUNDCORNERSTOPRIGHT
FLAGDRAW_ROUNDCORNERSBOTTOMLEFT
FLAGDRAW_ROUNDCORNERSBOTTOMRIGHT
FLAGDRAW_ROUNDCORNERSNONE
FLAGDRAW_ROUNDCORNERSTOP
FLAGDRAW_ROUNDCORNERSBOTTOM
FLAGDRAW_ROUNDCORNERSLEFT
FLAGDRAW_ROUNDCORNERSRIGHT
FLAGDRAW_ROUNDCORNERSALL
FLAGDRAW_ROUNDCORNERSDEFAULT
FLAGDRAW_ROUNDCORNERSMASK
FocusedFlags
FLAGFOCUS_NONE
FLAGFOCUS_CHILDWINDOWS
FLAGFOCUS_ROOTWINDOW
FLAGFOCUS_ANYWINDOW
FLAGFOCUS_NOPOPUPHIERARCHY
FLAGFOCUS_DOCKHIERARCHY
FLAGFOCUS_ROOTANDCHILDWINDOWS
HoveredFlags
FLAGHOVERED_NONE
FLAGHOVERED_CHILDWINDOWS
FLAGHOVERED_ROOTWINDOW
FLAGHOVERED_ANYWINDOW
FLAGHOVERED_NOPOPUPHIERARCHY
FLAGHOVERED_DOCKHIERARCHY
FLAGHOVERED_ALLOWWHENBLOCKEDBYPOPUP
FLAGHOVERED_ALLOWWHENBLOCKEDBYACTIVEITEM
FLAGHOVERED_ALLOWWHENOVERLAPPEDBYITEM
FLAGHOVERED_ALLOWWHENOVERLAPPEDBYWINDOW
FLAGHOVERED_ALLOWWHENDISABLED
FLAGHOVERED_NONAVOVERRIDE
FLAGHOVERED_ALLOWWHENOVERLAPPED
FLAGHOVERED_RECTONLY
FLAGHOVERED_ROOTANDCHILDWINDOWS
FLAGHOVERED_FORTOOLTIP
FLAGHOVERED_STATIONARY
FLAGHOVERED_DELAYNONE
FLAGHOVERED_DELAYSHORT
FLAGHOVERED_DELAYNORMAL
FLAGHOVERED_NOSHAREDDELAY
MouseCursor
MOUSECURSOR_NONE
MOUSECURSOR_ARROW
MOUSECURSOR_TEXTINPUT
MOUSECURSOR_RESIZEALL
MOUSECURSOR_RESIZENS
MOUSECURSOR_RESIZEEW
MOUSECURSOR_RESIZENESW
MOUSECURSOR_RESIZENWSE
MOUSECURSOR_HAND
MOUSECURSOR_NOTALLOWED
MOUSECURSOR_COUNT
Action
ACTION_RELEASE
ACTION_PRESS
ACTION_REPEAT
WidgetType
WIDGET_LABEL
WIDGET_MARKDOWN
WIDGET_BUTTON
WIDGET_DUMMY
WIDGET_SEPARATOR
WIDGET_BULLET_TEXT
WIDGET_BULLET
WIDGET_CHECKBOX
WIDGET_CHILD
WIDGET_COLOR_EDIT
WIDGET_COLUMN
WIDGET_ROW
WIDGET_COMBO_CUSTOM
WIDGET_COMBO
WIDGET_CONDITION
WIDGET_CONTEXT_MENU
WIDGET_DATE_PICKER
WIDGET_DRAG_INT
WIDGET_INPUT_FLOAT
WIDGET_INPUT_INT
WIDGET_INPUT_TEXT
WIDGET_INPUT_TEXT_MULTILINE
WIDGET_PROGRESS_BAR
WIDGET_PROGRESS_INDICATOR
WIDGET_SPACING
WIDGET_BUTTON_SMALL
WIDGET_BUTTON_RADIO
WIDGET_IMAGE_URL
WIDGET_IMAGE
WIDGET_LIST_BOX
WIDGET_LIST_CLIPPER
WIDGET_MENU_BAR_MAIN
WIDGET_MENU_BAR
WIDGET_MENU_ITEM
WIDGET_MENU
WIDGET_SELECTABLE
WIDGET_SLIDER_FLOAT
WIDGET_SLIDER_INT
WIDGET_VSLIDER_INT
WIDGET_TAB_BAR
WIDGET_TAB_ITEM
WIDGET_TOOLTIP
WIDGET_TABLE_COLUMN
WIDGET_TABLE_ROW
WIDGET_TABLE
WIDGET_BUTTON_ARROW
WIDGET_TREE_NODE
WIDGET_TREE_TABLE_ROW
WIDGET_TREE_TABLE
WIDGET_WINDOW_SINGLE
WIDGET_POPUP_MODAL
WIDGET_POPUP
WIDGET_LAYOUT_SPLIT
WIDGET_SPLITTER
WIDGET_STACK
WIDGET_ALIGN
WIDGET_MSG_BOX
WIDGET_MSG_BOX_PREPARE
WIDGET_BUTTON_INVISIBLE
WIDGET_BUTTON_IMAGE
WIDGET_STYLE
WIDGET_CUSTOM
WIDGET_EVENT_HANDLER
WIDGET_PLOT
WIDGET_CSS_TAG
WIDGET_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({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>