< GeeXLab Reference Guide />
> Back to Reference Guide Index
gh_imgui library
Description
gh_imgui is the module that manages the ImGui library and allows to draw widgets. Available in GeeXLab 0.17+. All possible constants are defined in {GeeXLab folder}/libs/lua/imgui.lua or in {GeeXLab folder}/libs/python/imgui.py
Number of functions: 335
- gh_imgui.select_draw_list ()
- gh_imgui.add_bezier_curve_to_drawlist ()
- gh_imgui.add_circle_to_drawlist ()
- gh_imgui.add_line_to_drawlist ()
- gh_imgui.add_quad_to_drawlist ()
- gh_imgui.add_rect_to_drawlist ()
- gh_imgui.add_rect_filled_multicolor_to_drawlist ()
- gh_imgui.add_triangle_to_drawlist ()
- gh_imgui.add_font_from_buffer ()
- gh_imgui.add_font_from_file ()
- gh_imgui.add_font_from_zip_file ()
- gh_imgui.begin_child ()
- gh_imgui.button ()
- gh_imgui.button_arrow ()
- gh_imgui.calc_text_size ()
- gh_imgui.checkbox ()
- gh_imgui.collapsing_header ()
- gh_imgui.color_edit_rgba ()
- gh_imgui.color_edit_rgba_v2 ()
- gh_imgui.color_picker_rgba ()
- gh_imgui.color_picker_rgba_v2 ()
- gh_imgui.column_get_offset ()
- gh_imgui.column_get_width ()
- gh_imgui.column_next ()
- gh_imgui.column_set_offset ()
- gh_imgui.column_set_width ()
- gh_imgui.columns ()
- gh_imgui.combo_box_add_item ()
- gh_imgui.combo_box_create ()
- gh_imgui.combo_box_draw ()
- gh_imgui.combo_box_draw_v2 ()
- gh_imgui.dummy ()
- gh_imgui.end_child ()
- gh_imgui.frame_begin ()
- gh_imgui.frame_begin_v2 ()
- gh_imgui.frame_end ()
- gh_imgui.get_color ()
- gh_imgui.get_content_region_available_width ()
- gh_imgui.get_cur_font_display_offset ()
- gh_imgui.get_cursor_pos ()
- gh_imgui.get_cursor_screen_pos ()
- gh_imgui.get_cursor_start_pos ()
- gh_imgui.get_font_size ()
- gh_imgui.get_item_rect ()
- gh_imgui.get_scroll ()
- gh_imgui.get_scroll_max ()
- gh_imgui.get_text_line_heigh_with_spacing ()
- gh_imgui.get_version ()
- gh_imgui.get_window_pos ()
- gh_imgui.get_window_pos_size ()
- gh_imgui.get_window_size ()
- gh_imgui.gizmo_begin_frame ()
- gh_imgui.gizmo_decompose_matrix_to_components ()
- gh_imgui.gizmo_enable ()
- gh_imgui.gizmo_is_over ()
- gh_imgui.gizmo_is_using ()
- gh_imgui.gizmo_manipulate ()
- gh_imgui.gizmo_set_rect ()
- gh_imgui.group_begin ()
- gh_imgui.group_end ()
- gh_imgui.image ()
- gh_imgui.image_button ()
- gh_imgui.indent ()
- gh_imgui.init ()
- gh_imgui.input_text ()
- gh_imgui.is_any_item_hovered ()
- gh_imgui.is_any_window_hovered ()
- gh_imgui.is_item_clicked ()
- gh_imgui.is_item_hovered ()
- gh_imgui.is_mouse_clicked ()
- gh_imgui.is_window_hovered ()
- gh_imgui.list_box_begin ()
- gh_imgui.list_box_draw ()
- gh_imgui.list_box_draw_v2 ()
- gh_imgui.list_box_end ()
- gh_imgui.list_clipping_begin ()
- gh_imgui.list_clipping_end ()
- gh_imgui.menu_begin ()
- gh_imgui.menu_begin_bar ()
- gh_imgui.menu_begin_main_bar ()
- gh_imgui.menu_end ()
- gh_imgui.menu_end_bar ()
- gh_imgui.menu_end_main_bar ()
- gh_imgui.menu_item ()
- gh_imgui.plotline_create ()
- gh_imgui.plotline_draw ()
- gh_imgui.plotline_draw_v2 ()
- gh_imgui.plotline_get_value1f ()
- gh_imgui.plotline_set_value1f ()
- gh_imgui.pop_font ()
- gh_imgui.pop_item_width ()
- gh_imgui.pop_style_color ()
- gh_imgui.popup_begin ()
- gh_imgui.popup_begin_context ()
- gh_imgui.popup_end ()
- gh_imgui.popup_open ()
- gh_imgui.progress_bar ()
- gh_imgui.set_font_glyph_offset ()
- gh_imgui.push_font ()
- gh_imgui.push_item_width ()
- gh_imgui.push_style_color ()
- gh_imgui.radio_button ()
- gh_imgui.rebuild_all_fonts ()
- gh_imgui.reset_default_font ()
- gh_imgui.same_line ()
- gh_imgui.selectable ()
- gh_imgui.separator ()
- gh_imgui.set_color ()
- gh_imgui.set_cur_font_display_offset ()
- gh_imgui.set_default_font ()
- gh_imgui.set_frame_border_size ()
- gh_imgui.set_rounding ()
- gh_imgui.set_indent_spacing ()
- gh_imgui.set_item_default_focus ()
- gh_imgui.set_keyboard_focus_here ()
- gh_imgui.set_next_item_width ()
- gh_imgui.set_next_window_content_size ()
- gh_imgui.set_scroll ()
- gh_imgui.set_scroll_from_pos_y ()
- gh_imgui.set_scroll_here_y ()
- gh_imgui.set_style_colors ()
- gh_imgui.set_tooltip ()
- gh_imgui.set_window_border_size ()
- gh_imgui.set_window_focus ()
- gh_imgui.set_window_rounding ()
- gh_imgui.show_demo_window ()
- gh_imgui.show_metrics_window ()
- gh_imgui.show_stack_tool_window ()
- gh_imgui.show_test_window ()
- gh_imgui.slider_1i ()
- gh_imgui.slider_1i_v2 ()
- gh_imgui.slider_1f ()
- gh_imgui.slider_2f ()
- gh_imgui.slider_3f ()
- gh_imgui.slider_4f ()
- gh_imgui.spacing ()
- gh_imgui.bullet ()
- gh_imgui.tab_bar_begin ()
- gh_imgui.tab_bar_begin_v2 ()
- gh_imgui.tab_bar_end ()
- gh_imgui.tab_item_begin ()
- gh_imgui.tab_item_begin_v2 ()
- gh_imgui.tab_item_end ()
- gh_imgui.terminate ()
- gh_imgui.text ()
- gh_imgui.text_rgba ()
- gh_imgui.text_unformatted_v1 ()
- gh_imgui.text_unformatted_v2 ()
- gh_imgui.text_wrapped ()
- gh_imgui.tree_node ()
- gh_imgui.tree_node_ex ()
- gh_imgui.tree_node_leaf ()
- gh_imgui.tree_node_leaf_v2 ()
- gh_imgui.tree_pop ()
- gh_imgui.underline ()
- gh_imgui.unindent ()
- gh_imgui.url ()
- gh_imgui.vslider_1f ()
- gh_imgui.vslider_1i ()
- gh_imgui.vslider_1i_v2 ()
- gh_imgui.widget ()
- gh_imgui.window_begin ()
- gh_imgui.window_begin_v2 ()
- gh_imgui.window_end ()
- gh_imgui.imguizmoquat_gizmo3d_v1 ()
- gh_imgui.imguizmoquat_gizmo3d_v2 ()
- gh_imgui.imguizmoquat_gizmo3d_v3 ()
- gh_imgui.set_item_spacing ()
- gh_imgui.get_item_spacing ()
- gh_imgui.imgui_plot_create ()
- gh_imgui.plot_kill ()
- gh_imgui.plot_draw ()
- gh_imgui.plot_set_title ()
- gh_imgui.plot_set_color ()
- gh_imgui.plot_set_state ()
- gh_imgui.plot_set_axis_param_bool ()
- gh_imgui.plot_set_axis_param_int ()
- gh_imgui.plot_set_axis_param_float ()
- gh_imgui.plot_set_axis_label ()
- gh_imgui.plot_set_axis_color ()
- gh_imgui.plot_add_item ()
- gh_imgui.plot_item_set_label ()
- gh_imgui.plot_item_set_color ()
- gh_imgui.plot_item_set_type ()
- gh_imgui.plot_item_set_size ()
- gh_imgui.plot_item_set_data_begin ()
- gh_imgui.plot_item_add_data ()
- gh_imgui.plot_item_get_data_size ()
- gh_imgui.plot_item_clear_data ()
- gh_imgui.plot_item_clear_data ()
- gh_imgui.plot_item_set_data ()
- gh_imgui.plot_item_roll_point ()
- gh_imgui.plot_item_buffer_point ()
- gh_imgui.plot_axis_scroll ()
- gh_imgui.plot_is_hovered ()
- gh_imgui.plot_get_mouse_position ()
- gh_imgui.get_text_line_height ()
- gh_imgui.get_text_line_height_with_spacing ()
- gh_imgui.color_text_editor_create ()
- gh_imgui.color_text_editor_kill ()
- gh_imgui.color_text_editor_render ()
- gh_imgui.color_text_editor_get_text ()
- gh_imgui.color_text_editor_set_text ()
- gh_imgui.color_text_editor_set_language ()
- gh_imgui.color_text_editor_set_palette ()
- gh_imgui.color_text_editor_set_property_bool ()
- gh_imgui.color_text_editor_set_property_int ()
- gh_imgui.color_text_editor_get_total_lines ()
- gh_imgui.color_text_editor_get_selected_text ()
- gh_imgui.color_text_editor_get_current_line_text ()
- gh_imgui.color_text_editor_get_cursor_position ()
- gh_imgui.color_text_editor_palette_set_color ()
- gh_imgui.color_text_editor_palette_get_color ()
- gh_imgui.color_text_editor_copy_paste_cut ()
- gh_imgui.color_text_editor_selection ()
- gh_imgui.color_text_editor_is_text_changed ()
- gh_imgui.implot_create_dataplot ()
- gh_imgui.implot_kill_dataplot ()
- gh_imgui.implot_show_demo_window ()
- gh_imgui.implot_begin_plot ()
- gh_imgui.implot_end_plot ()
- gh_imgui.implot_add_data ()
- gh_imgui.implot_draw_plotline ()
- gh_imgui.implot_draw_plotscatter ()
- gh_imgui.implot_draw_plotshaded ()
- gh_imgui.implot_draw_plotbars ()
- gh_imgui.implot_set_next_plot_limits ()
- gh_imgui.implot_push_style_color ()
- gh_imgui.implot_pop_style_color ()
- gh_imgui.implot_push_style_var_1f ()
- gh_imgui.implot_push_style_var_1i ()
- gh_imgui.implot_is_hovered ()
- gh_imgui.implot_get_mouse_pos ()
- gh_imgui.implot_push_colormap ()
- gh_imgui.implot_pop_colormap ()
- gh_imgui.implot_plottext ()
- gh_imgui.get_item_rect_min ()
- gh_imgui.get_item_rect_max ()
- gh_imgui.push_clip_rect ()
- gh_imgui.pop_clip_rect ()
- gh_imgui.invisible_button ()
- gh_imgui.fx_drawlist_coding_party_demo ()
- gh_imgui.file_browser_init ()
- gh_imgui.file_browser_set_title ()
- gh_imgui.file_browser_set_current_directory ()
- gh_imgui.file_browser_clear_type_filters ()
- gh_imgui.file_browser_add_type_filter ()
- gh_imgui.file_browser_open ()
- gh_imgui.file_browser_close ()
- gh_imgui.file_browser_display ()
- gh_imgui.file_browser_has_selected ()
- gh_imgui.file_browser_get_selected ()
- gh_imgui.memory_editor_create ()
- gh_imgui.memory_editor_kill ()
- gh_imgui.memory_editor_resize ()
- gh_imgui.memory_editor_draw_window ()
- gh_imgui.memory_editor_draw_window ()
- gh_imgui.memory_editor_set_value_1u8 ()
- gh_imgui.memory_editor_set_data_from_texture ()
- gh_imgui.memory_editor_read_data_from_file ()
- gh_imgui.memory_editor_write_data_to_file ()
- gh_imgui.memory_editor_read_data_from_buffer ()
- gh_imgui.memory_editor_write_data_to_buffer ()
- gh_imgui.set_next_window_size ()
- gh_imgui.set_window_size ()
- gh_imgui.set_next_window_size_constraints ()
- gh_imgui.table_begin ()
- gh_imgui.table_end ()
- gh_imgui.table_set_column_enabled ()
- gh_imgui.table_next_row ()
- gh_imgui.table_next_row ()
- gh_imgui.table_next_column ()
- gh_imgui.table_set_column_index ()
- gh_imgui.table_setup_column ()
- gh_imgui.table_setup_scroll_freeze ()
- gh_imgui.table_headers_row ()
- gh_imgui.table_header ()
- gh_imgui.table_get_column_count ()
- gh_imgui.table_get_column_index ()
- gh_imgui.table_get_row_index ()
- gh_imgui.table_get_column_name ()
- gh_imgui.table_get_column_flags ()
- gh_imgui.table_set_bg_color ()
- gh_imgui.begin_disabled ()
- gh_imgui.end_disabled ()
- gh_imgui.get_mouse_pos ()
- gh_imgui.get_mouse_pos_on_opening_current_popup ()
- gh_imgui.imnodes_begin_node_editor ()
- gh_imgui.imnodes_end_node_editor ()
- gh_imgui.imnodes_begin_node ()
- gh_imgui.imnodes_end_node ()
- gh_imgui.imnodes_begin_output_attribute ()
- gh_imgui.imnodes_end_output_attribute ()
- gh_imgui.imnodes_begin_input_attribute ()
- gh_imgui.imnodes_end_output_attribute ()
- gh_imgui.imnodes_begin_node_title_bar ()
- gh_imgui.imnodes_end_node_title_bar ()
- gh_imgui.imnodes_link ()
- gh_imgui.imnodes_set_node_screen_space_pos ()
- gh_imgui.imnodes_set_node_editor_space_pos ()
- gh_imgui.imnodes_set_node_grid_space_pos ()
- gh_imgui.imnodes_get_node_screen_space_pos ()
- gh_imgui.imnodes_get_node_editor_space_pos ()
- gh_imgui.imnodes_get_node_grid_space_pos ()
- gh_imgui.imnodes_set_node_draggable ()
- gh_imgui.imnodes_is_editor_hovered ()
- gh_imgui.imnodes_is_node_hovered ()
- gh_imgui.imnodes_is_link_hovered ()
- gh_imgui.imnodes_is_pin_hovered ()
- gh_imgui.imnodes_num_selected_nodes ()
- gh_imgui.imnodes_read_selected_nodes ()
- gh_imgui.imnodes_get_selected_node ()
- gh_imgui.imnodes_num_selected_links ()
- gh_imgui.imnodes_read_selected_links ()
- gh_imgui.imnodes_get_selected_link ()
- gh_imgui.imnodes_clear_nodes_selection ()
- gh_imgui.imnodes_clear_links_selection ()
- gh_imgui.imnodes_is_link_started ()
- gh_imgui.imnodes_is_link_dropped ()
- gh_imgui.imnodes_is_link_created ()
- gh_imgui.imnodes_is_link_created_v2 ()
- gh_imgui.imnodes_is_link_destroyed ()
- gh_imgui.imnodes_push_color_style ()
- gh_imgui.imnodes_pop_color_style ()
- gh_imgui.imnodes_push_style_var ()
- gh_imgui.imnodes_pop_style_var ()
- gh_imgui.imnodes_select_node ()
- gh_imgui.imnodes_clear_node_selection ()
- gh_imgui.imnodes_is_node_selected ()
- gh_imgui.imnodes_select_link ()
- gh_imgui.imnodes_clear_link_selection ()
- gh_imgui.imnodes_is_link_selected ()
- gh_imgui.imnodes_minimap ()
- gh_imgui.knob ()
- gh_imgui.toggle ()
select_draw_list
Description
Select the draw list that will receive all draw commands. Default is DRAWLIST_WINDOW.
Syntax
gh_imgui.select_draw_list(
draw_list
)
Languages
Parameters
- draw_list [ENUM]: draw list type
Return Values
This function has no return value(s).
Code sample
IMGUI_DRAWLIST_WINDOW = 0
IMGUI_DRAWLIST_BACKGROUND = 1
IMGUI_DRAWLIST_FOREGROUND = 2
draw_list = IMGUI_DRAWLIST_WINDOW
gh_imgui.select_draw_list(draw_list)
add_bezier_curve_to_drawlist
Description
Adds a Bezier curve to the current drawlist.
Syntax
gh_imgui.add_bezier_curve_to_drawlist(
x0, y0,
cp0x, cp0y,
cp1x, cp1y,
x1, y1,
r, g, b, a
)
Languages
Parameters
- x0, y0 [REAL]: start position
- cp0x, cp0y [REAL]: control point 0
- cp1x, cp1y [REAL]: control point 1
- x1, y1 [REAL]: end position
- r, g, b, a [REAL]: RGBA color
Return Values
This function has no return value(s).
Code sample
gh_imgui.add_bezier_curve_to_drawlist(p0_x, p0_y, ctrl0_x, ctrl0_y, ctrl1_x, ctrl1_y, p1_x, p1_y, r, g, b, a)
add_circle_to_drawlist
Description
Adds a circle to the current drawlist.
Syntax
gh_imgui.add_circle_to_drawlist(
center_x, center_y,
radius,
r, g, b, a,
line_thickness,
num_segments,
filled
)
Languages
Parameters
- center_x, center_y [REAL]: position of the circle center
- radius [REAL]: radius of the circle
- r, g, b, a [REAL]: RGBA color
- line_thickness [REAL]: line thickness
- num_segments [INTEGER]: number of segments of the circle
- filled [INTEGER]: solid (1) or wireframe (0)
Return Values
This function has no return value(s).
Code sample
thickness = 2
num_segments = 20
filled = 1
gh_imgui.add_circle_to_drawlist(center_x, center_y, radius, r, g, b, a, thickness, num_segments, filled)
add_line_to_drawlist
Description
Adds a line to the current drawlist.
Syntax
gh_imgui.add_line_to_drawlist(
x0, y0,
x1, y1,
r, g, b, a
)
Languages
Parameters
- x0, y0 [REAL]: start position
- x1, y1 [REAL]: end position
- r, g, b, a [REAL]: RGBA color
Return Values
This function has no return value(s).
Code sample
gh_imgui.add_line_to_drawlist(start_x, start_y, end_x, end_y, r, g, b, a)
add_quad_to_drawlist
Description
Adds a quad to the current drawlist.
Syntax
gh_imgui.add_quad_to_drawlist(
ax, ay,
bx, by,
cx, cy,
dx, dy,
r, g, b, a,
thickness,
filled
)
Languages
Parameters
- ax, ay [REAL]: position of the 1st point
- bx, by [REAL]: position of the 2nd point
- cx, cy [REAL]: position of the 3rd point
- dx, dy [REAL]: position of the 4th point
- r, g, b, a [REAL]: RGBA color
- thickness [REAL]: line thickness
- filled [INTEGER]: solid (1) or wireframe (0)
Return Values
This function has no return value(s).
Code sample
thickness = 2
filled = 1
gh_imgui.add_quad_to_drawlist(ax, ay, bx, by, cx, cy, dx, dy, r, g, b, a, thickness, filled)
add_rect_to_drawlist
Description
Adds a rectangle to the current drawlist.
Syntax
gh_imgui.add_rect_to_drawlist(
p_min_x, p_min_y,
p_max_x, p_max_y,
r, g, b, a,
rounding,
thickness,
filled
)
Languages
Parameters
- p_min_x, p_min_y [REAL]: position of the bottom_left corner
- p_max_x, p_max_y [REAL]: position of the top right corner
- r, g, b, a [REAL]: RGBA color
- rounding [REAL]: corner rounding
- thickness [REAL]: line thickness
- filled [INTEGER]: solid (1) or wireframe (0)
Return Values
This function has no return value(s).
Code sample
rounding = 0
thickness = 2
filled = 1
gh_imgui.add_rect_to_drawlist(p_min_x, p_min_y, p_max_x, p_max_y, r, g, b, a, rounding, thickness, filled)
add_rect_filled_multicolor_to_drawlist
Description
Adds a multi-colored rectangle to the current drawlist.
Syntax
gh_imgui.add_rect_filled_multicolor_to_drawlist(
p_min_x, p_min_y,
p_max_x, p_max_y,
r0, g0, b0, a0,
r1, g1, b1, a1,
r2, g2, b2, a2,
r3, g3, b3, a3
)
Languages
Parameters
- p_min_x, p_min_y [REAL]: position of the bottom_left corner
- p_max_x, p_max_y [REAL]: position of the top right corner
- r0, g0, b0, a0 [REAL]: RGBA up-left
- r1, g1, b1, a1 [REAL]: RGBA up-right
- r2, g2, b2, a2 [REAL]: RGBA bottom-right
- r3, g3, b3, a3 [REAL]: RGBA bottom-left
Return Values
This function has no return value(s).
Code sample
gh_imgui.add_rect_filled_multicolor_to_drawlist(p_min_x, p_min_y, p_max_x, p_max_y,
r0, g0, b0, a0,
r1, g1, b1, a1,
r2, g2, b2, a2,
r3, g3, b3, a3)
add_triangle_to_drawlist
Description
Adds a triangle to the current drawlist.
Syntax
gh_imgui.add_triangle_to_drawlist(
p1x, p1y,
p2x, p2y,
p3x, p3y,
r, g, b, a,
thickness,
filled
)
Languages
Parameters
- p1x, p1y [REAL]: position of the first vertex
- p2x, p2y [REAL]: position of the second vertex
- p3x, p3y [REAL]: position of the third vertex
- r, g, b, a [REAL]: RGBA color
- thickness [REAL]: line thickness
- filled [INTEGER]: solid (1) or wireframe (0)
Return Values
This function has no return value(s).
Code sample
thickness = 2
filled = 1
gh_imgui.add_triangle_to_drawlist(p1x, p1y, p2x, p2y, p3x, p3y, r, g, b, a, thickness, filled)
add_font_from_buffer
Description
Adds a new font from a memory buffer.
Syntax
font_id = gh_imgui.add_font_from_buffer(
buff_ptr,
buff_size,
font_size
)
Languages
Parameters
- buff_ptr [POINTER]: pointer to the buffer
- buff_size [INTEGER]: size of the buffer in bytes
- font_size [INTEGER]: size of the font
Return Values
- font_id [ID]: font identifier
Code sample
filename = demo_dir .. "assets/arial.ttf"
buffer, buffer_size = gh_utils.file_buffer_create(filename)
font_id = gh_imgui.add_font_from_buffer(buffer, buffer_size, 24)
gh_utils.file_buffer_kill(buffer)
add_font_from_file
Description
Adds a new font to the ImGui engine.
Syntax
font_id = gh_imgui.add_font_from_file(
font_filename,
font_size
)
Languages
Parameters
- font_filename [STRING]: absolute path of the font file
- font_size [INTEGER]: size of the font
Return Values
- font_id [ID]: font identifier
Code sample
font_id = gh_imgui.add_font_from_file(font_filename, 24)
add_font_from_zip_file
Description
Adds a new font from a zip file to the ImGui engine.
Syntax
font_id = gh_imgui.add_font_from_zip_file(
zip_filename,
font_filename,
font_size
)
Languages
Parameters
- zip_filename [STRING]: absolute path of the zip file
- font_filename [STRING]: absolute path of the font file
- font_size [INTEGER]: size of the font
Return Values
- font_id [ID]: font identifier
Code sample
font_id = gh_imgui.add_font_from_zip_file(zip_filename, font_filename, 24)
begin_child
Description
Begins a scrolling region.
Syntax
gh_imgui.begin_child(
label,
width, height,
border,
flags
)
Languages
Parameters
- label [STRING]: name of the button
- width, height [REAL]: size of the region
- border [BOOLEAN]: border: 1 (enabled) or 0 (disabled)
- flags [ENUM]: see window flags (ImGuiWindowFlags_xxx) in imgui.lua
Return Values
This function has no return value(s).
Code sample
gh_imgui.begin_child(label, w, h, border, flags)
button
Description
Create a button.
Syntax
pressed = gh_imgui.button(
label,
width, height
)
Languages
Parameters
- label [STRING]: name of the button
- width, height [INTEGER]: width and height of the button
Return Values
- pressed [BOOLEAN]: pressed: 1 (true) or 0 (false)
Code sample
pressed = gh_imgui.button("Fire", 200, 20)
button_arrow
Description
Create a arrow shaped button.
Syntax
pressed = gh_imgui.button_arrow(
label,
direction
)
Languages
Parameters
- label [STRING]: name of the button
- direction [ENUM]: arrow direction: 0 (left), 1 (right), 2(up) and 3(down)
Return Values
- pressed [BOOLEAN]: pressed: 1 (true) or 0 (false)
Code sample
pressed = gh_imgui.button_arrow("Fire", 1)
calc_text_size
Description
Returns the size (width and height) of a string.
Syntax
x, y = gh_imgui.calc_text_size(
text
)
Languages
Parameters
Return Values
- x, y [REAL]: size of the text
Code sample
x, y = gh_imgui.calc_text_size("Hello")
checkbox
Description
Create a checkbox.
Syntax
checked = gh_imgui.checkbox(
label,
current_state
)
Languages
Parameters
- label [STRING]: name of the button
- current_state [BOOLEAN]: checked: 1 (true) or 0 (false)
Return Values
- checked [BOOLEAN]: checked: 1 (true) or 0 (false)
Code sample
checked = gh_imgui.checkbox("Wireframe", checked)
collapsing_header
Description
Creates an header that can be opened or closed.
Syntax
opened = gh_imgui.collapsing_header(
label,
flags
)
Languages
Parameters
- label [STRING]: name of the button
- flags [ENUM]: see ImGuiTreeNodeFlags_xxx flags in imgui.lua (GeeXLab lua libs)
Return Values
- opened [BOOLEAN]: 1 (opened) or 0 (closed)
Code sample
local flags = 0 -- default
if (gh_imgui.collapsing_header(label, flags) == 1) then
...
end
color_edit_rgba
Description
Displays a 4D slider with color picker.
Syntax
r, g, b, a = gh_imgui.color_edit_rgba(
label,
r0, b0, g0, a0
)
Languages
Parameters
- label [STRING]: name of the slider
- r0, b0, g0, a0 [REAL]: initial 4D value
Return Values
- r, g, b, a [REAL]: RGBA color value
Code sample
r, g, b, a = gh_imgui.color_edit_rgba("coloredit01", r0, b0, g0, a0)
color_edit_rgba_v2
Description
Displays a 4D slider with color picker.
Syntax
r, g, b, a = gh_imgui.color_edit_rgba_v2(
label,
r0, b0, g0, a0,
flags
)
Languages
Parameters
- label [STRING]: name of the slider
- r0, b0, g0, a0 [REAL]: initial 4D value
- flags [ENUM]: ImGuiColorEditFlags_xxx options
Return Values
- r, g, b, a [REAL]: RGBA color value
Code sample
flags = ImGuiColorEditFlags_None
r, g, b, a = gh_imgui.color_edit_rgba_v2("coloredit01", r0, b0, g0, a0, flags)
color_picker_rgba
Description
Displays a color picker.
Syntax
r, g, b, a = gh_imgui.color_picker_rgba(
label,
r0, b0, g0, a0
)
Languages
Parameters
- label [STRING]: name of the color picker
- r0, b0, g0, a0 [REAL]: initial 4D value
Return Values
- r, g, b, a [REAL]: RGBA color value
Code sample
r, g, b, a = gh_imgui.color_picker_rgba("coloredit01", r0, b0, g0, a0)
color_picker_rgba_v2
Description
Displays a color picker.
Syntax
r, g, b, a = gh_imgui.color_picker_rgba_v2(
label,
r0, b0, g0, a0,
flags
)
Languages
Parameters
- label [STRING]: name of the color picker
- r0, b0, g0, a0 [REAL]: initial 4D value
- flags [ENUM]: ImGuiColorEditFlags_xxx options
Return Values
- r, g, b, a [REAL]: RGBA color value
Code sample
flags = ImGuiColorEditFlags_None
r, g, b, a = gh_imgui.color_picker_rgba_v2("coloredit01", r0, b0, g0, a0, flags)
column_get_offset
Description
Gets the offset of a particular column.
Syntax
offset = gh_imgui.column_get_offset(
index
)
Languages
Parameters
- index [INTEGER]: column index
Return Values
Code sample
offset = gh_imgui.column_get_offset(index)
column_get_width
Description
Gets the width of a particular column.
Syntax
width = gh_imgui.column_get_width(
index
)
Languages
Parameters
- index [INTEGER]: column index
Return Values
Code sample
width = gh_imgui.column_get_width(index)
column_next
Description
Starts a new column.
Syntax
gh_imgui.column_next()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.columns(2, 1)
-- display widgets
...
-- next column
gh_imgui.column_next()
-- display widgets
...
-- reset to default layout (one column)
gh_imgui.columns(1, 0)
column_set_offset
Description
Sets the offset of a particular column.
Syntax
gh_imgui.column_set_offset(
index,
offset
)
Languages
Parameters
- index [INTEGER]: column index
- offset [REAL]: offset
Return Values
This function has no return value(s).
Code sample
gh_imgui.column_set_offset(index, width)
column_set_width
Description
Sets the width of a particular column.
Syntax
gh_imgui.column_set_width(
index,
width
)
Languages
Parameters
- index [INTEGER]: column index
- width [REAL]: width
Return Values
This function has no return value(s).
Code sample
gh_imgui.column_set_width(index, width)
columns
Description
Starts/ends a column layout.
Syntax
gh_imgui.columns(
num_columns,
border
)
Languages
Parameters
- num_columns [INTEGER]: number of columns
- border [INTEGER]: display column border ot not
Return Values
This function has no return value(s).
Code sample
gh_imgui.columns(2, 1)
-- display widgets
...
-- next column
gh_imgui.column_next()
-- display widgets
...
-- reset to default layout (one column)
gh_imgui.columns(1, 0)
combo_box_add_item
Description
Adds an item to a combo box.
Syntax
gh_imgui.combo_box_add_item(
cb_id,
item_label
)
Languages
Parameters
- cb_id [ID]: combo box identifier
- item_label [STRING]: label of the item
Return Values
This function has no return value(s).
Code sample
gh_imgui.combo_box_add_item(cb_id, "Item1")
combo_box_create
Description
Creates a combo box. Must be called once (usually in an INIT script).
Syntax
cb_id = gh_imgui.combo_box_create(
label
)
Languages
Parameters
- label [STRING]: combo box label
Return Values
- cb_id [ID]: combo box identifier
Code sample
cb_id = gh_imgui.combo_box_create(label)
combo_box_draw
Description
Draws the combo box.
Syntax
selected_item = gh_imgui.combo_box_draw(
cb_id,
initial_selected_item
)
Languages
Parameters
- cb_id [ID]: combo box identifier
- initial_selected_item [INTEGER]: index of the initial selected item
Return Values
- selected_item [INTEGER]: index of the current selected item
Code sample
selected_item = gh_imgui.combo_box_draw(cb_id, 0)
combo_box_draw_v2
Description
Draws the combo box.
Syntax
selected_item = gh_imgui.combo_box_draw_v2(
cb_id,
initial_selected_item,
height_in_items
)
Languages
Parameters
- cb_id [ID]: combo box identifier
- initial_selected_item [INTEGER]: index of the initial selected item
- height_in_items [INTEGER]: height of the combo box in items
Return Values
- selected_item [INTEGER]: index of the current selected item
Code sample
selected_item = gh_imgui.combo_box_draw_v2(cb_id, 0, 10)
dummy
Description
Places an invisible widget (box). Useful for layout management.
Syntax
gh_imgui.dummy(
width, height
)
Languages
Parameters
- width, height [INTEGER]: dimensions of the box in pixels
Return Values
This function has no return value(s).
Code sample
gh_imgui.dummy(10, 5)
end_child
Description
End a scrolling region.
Syntax
gh_imgui.end_child()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.end_child()
frame_begin
Description
Begins ImGui rendering. This is the first function to call in a FRAME script before any other gh_imgui functions.
Syntax
gh_imgui.frame_begin(
width, height,
mouse_x, mouse_y,
mouse_left_button, mouse_right_button,
dt
)
Languages
Parameters
- width, height [INTEGER]: size of the main 3D window (gh_window.getsize(0))
- mouse_x, mouse_y [INTEGER]: position of the mouse (gh_input.mouse_get_position())
- mouse_left_button, mouse_right_button [BOOLEAN]: state of mouse left and right buttons (gh_input.mouse_get_button_state())
- dt [REAL]: time step
Return Values
This function has no return value(s).
Code sample
gh_imgui.frame_begin(winW, winH, mouse_x, mouse_y, mouse_left_button, mouse_right_button, dt)
frame_begin_v2
Description
Begins ImGui rendering. This is the first function to call in a FRAME script before any other gh_imgui functions.
Syntax
gh_imgui.frame_begin_v2(
width, height,
mouse_x, mouse_y,
mouse_left_button, mouse_right_button,
mouse_wheel,
dt
)
Languages
Parameters
- width, height [INTEGER]: size of the main 3D window (gh_window.getsize(0))
- mouse_x, mouse_y [INTEGER]: position of the mouse (gh_input.mouse_get_position())
- mouse_left_button, mouse_right_button [BOOLEAN]: state of mouse left and right buttons (gh_input.mouse_get_button_state())
- mouse_wheel [INTEGER]: mouse wheel delta
- dt [REAL]: time step
Return Values
This function has no return value(s).
Code sample
gh_imgui.frame_begin_v2(winW, winH, mouse_x, mouse_y, mouse_left_button, mouse_right_button, mouse_wheel, dt)
frame_end
Description
Ends ImGui rendering. This is the last function to call in a FRAME script after other gh_imgui functions.
Syntax
gh_imgui.frame_end()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.frame_end()
get_color
Description
Gets the current color value.
Syntax
r, g, b, a = gh_imgui.get_color(
item_type
)
Languages
Parameters
- item_type [ENUM]: type of the widget (see values in the code sample)
Return Values
- r, g, b, a [REAL]: RGBA color value
Code sample
widget_type = IMGUI_BUTTON_COLOR
r, g, b, a = gh_imgui.get_color(widget_type)
get_content_region_available_width
Description
Returns the available width inside a window.
Syntax
width = gh_imgui.get_content_region_available_width()
Languages
Parameters
This function has no input parameter(s).
Return Values
- width [REAL]: available width
Code sample
width = gh_imgui.get_content_region_available_width()
get_cur_font_display_offset
Description
Gets the x and y offset of the current font.
Syntax
x, y = gh_imgui.get_cur_font_display_offset()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
x, y = gh_imgui.get_cur_font_display_offset()
get_cursor_pos
Description
Returns the position of the mouse cursor (cursor position in window coordinates, relative to window position).
Syntax
x, y = gh_imgui.get_cursor_pos()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
x, y = gh_imgui.get_cursor_pos()
get_cursor_screen_pos
Description
Returns the position of the mouse cursor (cursor position in absolute screen coordinates [0 ; DisplaySize], useful for working with DrawList API).
Syntax
x, y = gh_imgui.get_cursor_screen_pos()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
x, y = gh_imgui.get_cursor_screen_pos()
get_cursor_start_pos
Description
Gets the initial cursor position in window coordinates.
Syntax
x, y = gh_imgui.get_cursor_start_pos()
Languages
Parameters
This function has no input parameter(s).
Return Values
- x, y [REAL]: cursor position
Code sample
x, y = gh_imgui.get_cursor_start_pos()
get_font_size
Description
Returns the size (height) of the font.
Syntax
size = gh_imgui.get_font_size()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
size = gh_imgui.get_font_size()
get_item_rect
Description
Gets the size (bounding rectangle) of the current item.
Syntax
x, y, z, w = gh_imgui.get_item_rect()
Languages
Parameters
This function has no input parameter(s).
Return Values
- x, y, z, w [INTEGER]: size of the current item
Code sample
x, y, z, w = gh_imgui.get_item_rect()
get_scroll
Description
Gets the scrolling amount in X and Y [0..get_scroll_max()].
Syntax
scroll_x, scroll_y = gh_imgui.get_scroll()
Languages
Parameters
This function has no input parameter(s).
Return Values
- scroll_x, scroll_y [REAL]: scrolling values in X and Y
Code sample
scroll_x, scroll_y = gh_imgui.get_scroll()
get_scroll_max
Description
Gets the maximum scrolling amount in X and Y - X => ContentSize.X - WindowSize.X, Y => ContentSize.Y - WindowSize.Y
Syntax
scroll_x, scroll_y = gh_imgui.get_scroll_max()
Languages
Parameters
This function has no input parameter(s).
Return Values
- scroll_x, scroll_y [REAL]: scrolling values in X and Y
Code sample
scroll_x, scroll_y = gh_imgui.get_scroll_max()
get_text_line_heigh_with_spacing
Description
Distance in pixels between 2 consecutive lines of text
Syntax
h = gh_imgui.get_text_line_heigh_with_spacing()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
h = gh_imgui.get_text_line_heigh_with_spacing()
get_version
Description
Returns the version of ImGui.
Syntax
version = gh_imgui.get_version()
Languages
Parameters
This function has no input parameter(s).
Return Values
- version [STRING]: ImGui version
Code sample
version_str = gh_imgui.get_version()
get_window_pos
Description
Returns the position of the current window.
Syntax
x, y = gh_imgui.get_window_pos()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
x, y = gh_imgui.get_window_pos()
get_window_pos_size
Description
Returns the position and size of the current window.
Syntax
x, y, width, height = gh_imgui.get_window_pos_size()
Languages
Parameters
This function has no input parameter(s).
Return Values
- x, y, width, height [REAL]: position and size
Code sample
x, y, width, height = gh_imgui.get_window_pos_size()
get_window_size
Description
Returns the size of the current window.
Syntax
width, height = gh_imgui.get_window_size()
Languages
Parameters
This function has no input parameter(s).
Return Values
- width, height [REAL]: size
Code sample
width, height = gh_imgui.get_window_size()
gizmo_begin_frame
Description
Begins the gizmo rendering. Must be called right after frame_begin().
Syntax
gh_imgui.gizmo_begin_frame()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.frame_begin(...)
gh_imgui.gizmo_begin_frame()
...
gizmo_decompose_matrix_to_components
Description
Gets the transformation matrix.
Syntax
tx,ty,tz, rx,ry,rz, sx,sy,sz = gh_imgui.gizmo_decompose_matrix_to_components(
obj_id
)
Languages
Parameters
- obj_id [ID]: object identifier
Return Values
- tx,ty,tz, rx,ry,rz, sx,sy,sz [REAL]: translation vector, rotation vector and scale vector
Code sample
tx,ty,tz, rx,ry,rz, sx,sy,sz = gh_imgui.gizmo_decompose_matrix_to_components(obj_id)
gizmo_enable
Description
Enables or disables the gizmo.
Syntax
gh_imgui.gizmo_enable(
state
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.gizmo_enable(1)
gizmo_is_over
Description
Is the mouse over the gizmo?
Syntax
state = gh_imgui.gizmo_is_over()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]: 1 (yes) or 0 (no)
Code sample
is_over = gh_imgui.gizmo_is_over()
gizmo_is_using
Description
Is the mouse over the gizmo or is the gizmo in moving state?
Syntax
state = gh_imgui.gizmo_is_using()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]: 1 (yes) or 0 (no)
Code sample
is_using = gh_imgui.gizmo_is_using()
gizmo_manipulate
Description
Applies the gizmo transformation to an object.
Syntax
gh_imgui.gizmo_manipulate(
cam_id,
obj_id,
oper_type,
trans_mode
)
Languages
Parameters
- cam_id [ID]: camera identifier
- obj_id [ID]: object identifier
- oper_type [ENUM]: operation type: 'translate', 'rotate' or 'scale'
- trans_mode [ENUM]: transformation mode: 'local' or 'world'
Return Values
This function has no return value(s).
Code sample
gh_imgui.gizmo_manipulate(cam_id, obj_id, "rotate", "local")
gizmo_set_rect
Description
Defines the gizmo viewport.
Syntax
gh_imgui.gizmo_set_rect(
x, y, width, height
)
Languages
Parameters
- x, y, width, height [INTEGER]: viewport size
Return Values
This function has no return value(s).
Code sample
gh_imgui.gizmo_set_rect(0, 0, winW, winH)
group_begin
Description
Starts a new group. All widgets in a group are seen as a single widget.
Syntax
gh_imgui.group_begin()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.group_begin()
-- display widgets
...
gh_imgui.group_end()
group_end
Description
Ends a group.
Syntax
gh_imgui.group_end()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.group_begin()
-- display widgets
...
gh_imgui.group_end()
image
Description
Display a texture. Currently, this fonction works in OpenGL only.
Syntax
gh_imgui.image(
tex_id,
width, height
)
Languages
Parameters
- tex_id [ID]: texture identifier as returned by gh_texture.create_xxx() functions
- width, height [REAL]: image size
Return Values
This function has no return value(s).
Code sample
gh_imgui.image(tex0, 200, 200)
image_button
Description
Display a button with a texture. Currently, this fonction works in OpenGL only.
Syntax
gh_imgui.image_button(
tex_id,
width, height,
frame_padding
)
Languages
Parameters
- tex_id [ID]: texture identifier as returned by gh_texture.create_xxx() functions
- width, height [REAL]: image size
- frame_padding [INTEGER]: frame padding
Return Values
This function has no return value(s).
Code sample
gh_imgui.image_button(tex0, 200, 200, 1)
indent
Description
Sets indent spacing.
Syntax
gh_imgui.indent(
indent_w
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
indent_w = 10.0
gh_imgui.indent(indent_w)
init
Description
Initialize the ImGui library. Must be called once in the INIT script.
Syntax
error = gh_imgui.init()
Languages
Parameters
This function has no input parameter(s).
Return Values
- error [BOOLEAN]: 1 (success) or 0 (error)
Code sample
ret = gh_imgui.init()
input_text
Description
Allows to type a text.
Syntax
state, text = gh_imgui.input_text(
label,
max_text_len,
initial_text,
flags
)
Languages
Parameters
- label [STRING]: name of the input field
- max_text_len [INTEGER]: max text lenght in bytes (4096 bytes is the default value if max_text_len is set to 0)
- initial_text [STRING]: initial text
- flags [ENUM]: ImGuiInputTextFlags_xxx options
Return Values
- state [BOOLEAN]: state (1 or 0). Useful with ImGuiInputTextFlags_EnterReturnsTrue
- text [STRING]: text
Code sample
flags = ImGuiInputTextFlags_None
text, state = gh_imgui.input_text("User name", 128, "", flags)
is_any_item_hovered
Description
Check if any item has been hovered by mouse.
Syntax
hovered = gh_imgui.is_any_item_hovered()
Languages
Parameters
This function has no input parameter(s).
Return Values
- hovered [BOOLEAN]: hovered: 1 (true) or 0 (false)
Code sample
hovered = gh_imgui.is_any_item_hovered()
is_any_window_hovered
Description
Check if any window has been hovered by mouse.
Syntax
hovered = gh_imgui.is_any_window_hovered()
Languages
Parameters
This function has no input parameter(s).
Return Values
- hovered [BOOLEAN]: hovered: 1 (true) or 0 (false)
Code sample
hovered = gh_imgui.is_any_window_hovered()
is_item_clicked
Description
Check if the current item has been clicked.
Syntax
clicked = gh_imgui.is_item_clicked(
mouse_button
)
Languages
Parameters
- mouse_button [ENUM]: left button (0) or right button (1)
Return Values
- clicked [BOOLEAN]: clicked: 1 (true) or 0 (false)
Code sample
clicked = gh_imgui.is_item_clicked(0)
is_item_hovered
Description
Check if the current item has been hovered by mouse.
Syntax
hovered = gh_imgui.is_item_hovered()
Languages
Parameters
This function has no input parameter(s).
Return Values
- hovered [BOOLEAN]: hovered: 1 (true) or 0 (false)
Code sample
hovered = gh_imgui.is_item_hovered()
is_mouse_clicked
Description
Check if any window has been hovered by mouse.
Syntax
state = gh_imgui.is_mouse_clicked(
button
)
Languages
Parameters
- button [ENUM]: mouse button: 0 (left), 1 (right) or 2 (middle)
Return Values
- state [BOOLEAN]: clicked: 1 (true) or 0 (false)
Code sample
state = gh_imgui.is_mouse_clicked(button)
is_window_hovered
Description
Check if the current window has been hovered by mouse.
Syntax
hovered = gh_imgui.is_window_hovered()
Languages
Parameters
This function has no input parameter(s).
Return Values
- hovered [BOOLEAN]: hovered: 1 (true) or 0 (false)
Code sample
hovered = gh_imgui.is_window_hovered()
list_box_begin
Description
Defines a list box header.
Syntax
ret = gh_imgui.list_box_begin(
cb_index,
w, h
)
Languages
Parameters
- cb_index [INTEGER]: combo box index
- w, h [REAL]: size of the list box
Return Values
- ret [BOOLEAN]: return code: 1 (success) or 0 (error)
Code sample
ret = gh_imgui.list_box_begin(cb_index, 0)
list_box_draw
Description
Draws a combo box as a list box.
Syntax
selected_item = gh_imgui.list_box_draw(
cb_id,
initial_selected_item
)
Languages
Parameters
- cb_id [ID]: combo box identifier
- initial_selected_item [INTEGER]: index of the initial selected item
Return Values
- selected_item [INTEGER]: index of the current selected item
Code sample
selected_item = gh_imgui.list_box_draw(cb_id, 0)
list_box_draw_v2
Description
Draws a combo box as a list box.
Syntax
selected_item = gh_imgui.list_box_draw_v2(
cb_id,
initial_selected_item,
height_in_items
)
Languages
Parameters
- cb_id [ID]: combo box identifier
- initial_selected_item [INTEGER]: index of the initial selected item
- height_in_items [INTEGER]: height of the list box in items
Return Values
- selected_item [INTEGER]: index of the current selected item
Code sample
selected_item = gh_imgui.list_box_draw_v2(cb_id, 0, 20)
list_box_end
Description
Ends a list box header.
Syntax
gh_imgui.list_box_end()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.list_box_end()
list_clipping_begin
Description
Starts the list clipping. Allows to speed up rendering of very big lists.
Syntax
start_item, end_item = gh_imgui.list_clipping_begin(
num_items
)
Languages
Parameters
- num_items [INTEGER]: number of items
Return Values
- start_item, end_item [INTEGER]: range coreved by the list clipper
Code sample
start_item, end_item = gh_imgui.list_clipping_begin(num_items)
list_clipping_end
Description
Ends the list clipping.
Syntax
gh_imgui.list_clipping_end(
num_items,
start_item, end_item
)
Languages
Parameters
- num_items [INTEGER]: number of items
- start_item, end_item [INTEGER]: range coreved by the list clipper
Return Values
This function has no return value(s).
Code sample
gh_imgui.list_clipping_end(num_items, start_item, end_item)
menu_begin
Description
Begins a window menu.
Syntax
state = gh_imgui.menu_begin(
label,
enabled
)
Languages
Parameters
- label [STRING]: menu label
- enabled [BOOLEAN]: menu: 1 (enabled) or 0 (disabled)
Return Values
- state [BOOLEAN]: 1 or 0 - only call menu_end() if this returns 1
Code sample
gh_imgui.menu_begin("File", 1)
menu_begin_bar
Description
Begins a window menu bar.
Syntax
state = gh_imgui.menu_begin_bar()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]: 1 or 0 - only call menu_end_bar() if this returns 1
Code sample
gh_imgui.menu_begin_bar()
menu_begin_main_bar
Description
Begins the main menu bar (fullscreen menu bar).
Syntax
state = gh_imgui.menu_begin_main_bar()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]: 1 or 0 - only call menu_end_main_bar() if this returns 1
Code sample
gh_imgui.menu_begin_main_bar()
menu_end
Description
Ends a window menu.
Syntax
gh_imgui.menu_end()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.menu_end()
menu_end_bar
Description
Ends a window menu bar.
Syntax
gh_imgui.menu_end_bar()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.menu_end_bar()
menu_end_main_bar
Description
Ends the main menu bar.
Syntax
gh_imgui.menu_end_main_bar()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.menu_end_main_bar()
menu_item
Description
Adds an item to the current menu. Must be used between menu_begin() and menu_end().
Syntax
state = gh_imgui.menu_item(
label,
shortcut,
selected,
enabled
)
Languages
Parameters
- label [STRING]: menu label
- shortcut [STRING]: menu shortcut (not implemented) - set this value to ''
- selected [BOOLEAN]: menu selected: 1 (true) or 0 (false)
- enabled [BOOLEAN]: menu enabled: 1 (true) or 0 (false)
Return Values
- state [BOOLEAN]: clicked: 1 (true) or 0 (false)
Code sample
enabled = 1
gh_imgui.menu_item("Load a file", "", 0, enabled)
plotline_create
Description
Creates a plotline.
Syntax
index = gh_imgui.plotline_create(
label,
num_points
)
Languages
Parameters
- label [STRING]: label
- num_points [INTEGER]: number of points in the plotline
Return Values
- index [INTEGER]: index of the new plotline
Code sample
plotline_index = gh_imgui.plotline_create("Curve", 1000)
plotline_draw
Description
Draws a plotline.
Syntax
gh_imgui.plotline_draw(
index,
type,
overlay,
values_offset,
scale_min, scale_max,
graph_size_x, graph_size_y
)
Languages
Parameters
- index [INTEGER]: index of the plotline
- type [ENUM]: type: 1 (histogram) or 0 (line)
- overlay [STRING]: overlay text
- values_offset [INTEGER]: offset
- scale_min, scale_max [REAL]: minimal / maximal value
- graph_size_x, graph_size_y [REAL]: size of the graph
Return Values
This function has no return value(s).
Code sample
values_offset = 0
scale_min = 0
scale_max = 100
graph_size_x = 400
graph_size_y = 200
gh_imgui.plotline_draw(plotline_index, type, "overlay!", values_offset, scale_min, scale_max, graph_size_x, graph_size_y)
plotline_draw_v2
Description
Draws a plotline.
Syntax
gh_imgui.plotline_draw_v2(
index,
type,
overlay,
num_values,
values_offset,
scale_min, scale_max,
graph_size_x, graph_size_y
)
Languages
Parameters
- index [INTEGER]: index of the plotline
- type [ENUM]: type: 1 (histogram) or 0 (line)
- overlay [STRING]: overlay text
- num_values [INTEGER]: number of values to draw
- values_offset [INTEGER]: offset
- scale_min, scale_max [REAL]: minimal / maximal value
- graph_size_x, graph_size_y [REAL]: size of the graph
Return Values
This function has no return value(s).
Code sample
values_offset = 0
values_count = 1000
scale_min = 0
scale_max = 100
graph_size_x = 400
graph_size_y = 200
gh_imgui.plotline_draw_v2(plotline_index, type, "overlay!", values_count, values_offset, scale_min, scale_max, graph_size_x, graph_size_y)
plotline_get_value1f
Description
Gets a value from the plotline.
Syntax
x = gh_imgui.plotline_get_value1f(
index,
value_index
)
Languages
Parameters
- index [INTEGER]: index of the plotline
- value_index [INTEGER]: index of value in the plotline
Return Values
Code sample
x = gh_imgui.plotline_get_value1f(plotline_index, value_index)
plotline_set_value1f
Description
Sets a value in the plotline.
Syntax
gh_imgui.plotline_set_value1f(
index,
value_index,
x
)
Languages
Parameters
- index [INTEGER]: index of the plotline
- value_index [INTEGER]: index of value in the plotline
- x [REAL]: value
Return Values
This function has no return value(s).
Code sample
gh_imgui.plotline_set_value1f(plotline_index, value_index, x)
pop_font
Description
Restores the font saved by push_font().
Syntax
gh_imgui.pop_font()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.pop_font()
pop_item_width
Description
Restore the width that has been changed by push_item_width().
Syntax
gh_imgui.pop_item_width()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
local width = gh_imgui.get_content_region_available_width()
gh_imgui.push_item_width(width * 0.8)
...
gh_imgui.pop_item_width()
pop_style_color
Description
Restores a color saved with push_style_color().
Syntax
gh_imgui.pop_style_color()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.pop_style_color()
popup_begin
Description
Begins a popup window. Click outside the popup to close it.
Syntax
ret = gh_imgui.popup_begin(
label
)
Languages
Parameters
Return Values
- ret [BOOLEAN]: popup opened: 1 (true) or 0 (false)
Code sample
ret = gh_imgui.popup_begin("blabla")
popup_begin_context
Description
Begins a popup window.
Syntax
ret = gh_imgui.popup_begin_context(
label
)
Languages
Parameters
Return Values
- ret [BOOLEAN]: popup opened: 1 (true) or 0 (false)
Code sample
ret = gh_imgui.popup_begin_context("blabla")
popup_end
Description
Ends a popup window. Call this function only if popup_begin_xxx() return 1 (the popup is opened).
Syntax
gh_imgui.popup_end()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.popup_end()
popup_open
Description
Call to mark popup as open (don't call every frame!)
Syntax
gh_imgui.popup_open(
label
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.popup_open("blabla")
progress_bar
Description
Displays a progress bar.
Syntax
gh_imgui.progress_bar(
fraction,
width, height,
overlay
)
Languages
Parameters
- fraction [REAL]: progression of the bar: from 0.0 to 1.0
- width, height [INTEGER]: size of the bar
- overlay [STRING]: overlay text
Return Values
This function has no return value(s).
Code sample
gh_imgui.progress_bar(0.45, width, height, overlay_str)
set_font_glyph_offset
Description
Allows to set an offset to each glyph of the font (default offset is 0,0). This can be useful with narrow buttons for example. set_font_glyph_offset() must be call before rebuild_all_fonts().
Syntax
gh_imgui.set_font_glyph_offset(
font_id,
x, y
)
Languages
Parameters
- font_id [ID]: font identifier
- x, y [INTEGER]: font offset
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_font_glyph_offset(font_id, 0, -2)
gh_imgui.rebuild_all_fonts()
push_font
Description
Saves the current font and makes a new font the current active font for next text rendering calls.
Syntax
gh_imgui.push_font(
font_id
)
Languages
Parameters
- font_id [ID]: font identifier
Return Values
This function has no return value(s).
Code sample
gh_imgui.push_font(font_id)
push_item_width
Description
Sets the width of next items. This width is valid until a call to pop_item_width().
Syntax
gh_imgui.push_item_width(
width
)
Languages
Parameters
- width [REAL]: width in pixels of next items
Return Values
This function has no return value(s).
Code sample
local width = gh_imgui.get_content_region_available_width()
gh_imgui.push_item_width(width * 0.8)
...
gh_imgui.pop_item_width()
push_style_color
Description
Sets a new color to a particular color element.
Syntax
gh_imgui.push_style_color(
item_type,
r, g, b, a
)
Languages
Parameters
- item_type [ENUM]: type of the widget (see complete list in set_color() function)
- r, g, b, a [REAL]: new color
Return Values
This function has no return value(s).
Code sample
element_type = IMGUI_WINDOW_BG_COLOR
gh_imgui.push_style_color(element_type, r, g, b, a)
radio_button
Description
Display a radio button.
Syntax
gh_imgui.radio_button(
name,
active
)
Languages
Parameters
- name [STRING]: name
- active [BOOLEAN]: active state: 1 (true) or 0 (false)
Return Values
This function has no return value(s).
Code sample
gh_imgui.radio_button("radio button 1", 0)
gh_imgui.radio_button("radio button 2", 1)
gh_imgui.radio_button("radio button 3", 0)
rebuild_all_fonts
Description
Rebuild all fonts. Call this function once you have loaded some fonts with add_font_xxx().
Syntax
gh_imgui.rebuild_all_fonts()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.rebuild_all_fonts()
reset_default_font
Description
Resets the default font used by ImGui.
Syntax
gh_imgui.reset_default_font()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.reset_default_font()
same_line
Description
Allows to group items horizontally.
Syntax
gh_imgui.same_line(
local_pos_x,
spacing_w
)
Languages
Parameters
- local_pos_x [REAL]: default value: 0.0
- spacing_w [REAL]: default value: -1.0
Return Values
This function has no return value(s).
Code sample
gh_imgui.same_line(local_pos_x, spacing_w)
selectable
Description
Allows to select texts in list / widgets.
Syntax
ret = gh_imgui.selectable(
text,
selected,
flags
)
Languages
Parameters
- text [STRING]: label
- selected [BOOLEAN]: selected state: 1 (yes) or 0 (no)
- flags [ENUM]: ImGuiSelectableFlags_xxx options
Return Values
Code sample
-- Possible flags
ImGuiSelectableFlags_None = 0
ImGuiSelectableFlags_DontClosePopups = 1 -- // Clicking this don't close parent popup window
ImGuiSelectableFlags_SpanAllColumns = 2 -- Selectable frame can span all columns (text will still fit in current column)
ImGuiSelectableFlags_AllowDoubleClick = 4 -- Generate press events on double clicks too
ImGuiSelectableFlags_Disabled = 8 -- Cannot be selected, display greyed out text
selected = 0
flags = ImGuiSelectableFlags_SpanAllColumns
ret = gh_imgui.selectable(text, selected, flags)
separator
Description
Adds an horizontal line (separator).
Syntax
gh_imgui.separator()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.separator()
set_color
Description
Sets the color of the next widget.
Syntax
gh_imgui.set_color(
item_type,
r, g, b, a
)
Languages
Parameters
- item_type [ENUM]: type of the widget (see values in the code sample)
- r, g, b, a [REAL]: RGBA color of the widget
Return Values
This function has no return value(s).
Code sample
IMGUI_WINDOW_BG_COLOR = 1
IMGUI_TITLE_BG_COLOR = 2
IMGUI_PLOTLINES_COLOR = 3
IMGUI_FRAME_BG_COLOR = 4
IMGUI_TITLE_BG_ACTIVE_COLOR = 5
IMGUI_TITLE_BG_COLLAPSED_COLOR = 6
IMGUI_PLOTHISTOGRAM_COLOR = 7
IMGUI_COMBO_BG_COLOR = 8
IMGUI_BUTTON_COLOR = 9
IMGUI_SEPARATOR_COLOR = 10
IMGUI_RESIZE_GRIP_COLOR = 11
IMGUI_PLOTLINE_HOVERED_COLOR = 12
IMGUI_PLOTHISTOGRAM_HOVERED_COLOR = 13
IMGUI_BUTTON_HOVERED_COLOR = 14
IMGUI_SEPARATOR_HOVERED_COLOR = 15
IMGUI_RESIZE_GRIP_HOVERED_COLOR = 16
IMGUI_HEADER_COLOR = 17
IMGUI_HEADER_HOVERED_COLOR = 18
IMGUI_SLIDER_GRAB_COLOR = 19
IMGUI_CHECK_MARK_COLOR = 20
IMGUI_SCROLLBAR_BG_COLOR = 21
IMGUI_SCROLLBAR_GRAB_COLOR = 22
IMGUI_SCROLLBAR_GRAB_HOVERED_COLOR = 23
IMGUI_TEXT_COLOR = 24
IMGUI_POPUP_BG_COLOR = 25
IMGUI_TEXT_DISABLED_COLOR = 26
IMGUI_CHILD_BG_COLOR = 27
IMGUI_BORDER_COLOR = 28
IMGUI_BORDER_SHADOW_COLOR = 29
IMGUI_FRAME_BG_HOVERED_COLOR = 30
IMGUI_FRAME_BG_ACTIVE_COLOR = 31
IMGUI_MENU_BAR_BG_COLOR = 32
IMGUI_SCROLLBAR_GRAB_ACTIVE_COLOR = 33
IMGUI_SLIDER_GRAB_ACTIVE_COLOR = 34
IMGUI_BUTTON_ACTIVE_COLOR = 35
IMGUI_HEADER_ACTIVE_COLOR = 36
IMGUI_SEPARATOR_ACTIVE_COLOR = 37
IMGUI_RESIZE_GRIP_ACTIVE_COLOR = 38
IMGUI_CLOSE_BUTTON_COLOR = 39
IMGUI_CLOSE_BUTTON_HOVERED_COLOR = 40
IMGUI_CLOSE_BUTTON_ACTIVE_COLOR = 41
IMGUI_PLOTLINES_HOVERED_COLOR = 42
IMGUI_TEXT_SELECTED_BG_COLOR = 43
IMGUI_MODAL_WINDOW_DARKENING_COLOR = 44
IMGUI_DRAG_DROP_TARGET_COLOR = 45
IMGUI_NAV_HIGHLIGHT_COLOR = 46
IMGUI_NAV_WINDOW_IN_HIGHLIGHT_COLOR = 47
IMGUI_MODAL_WINDOW_DIM_BG_COLOR = 48
IMGUI_TAB_COLOR = 49
IMGUI_TAB_HOVERED_COLOR = 50
IMGUI_TAB_ACTIVE_COLOR = 51
IMGUI_TAB_UNFOCUSED_COLOR = 52
IMGUI_TAB_UNFOCUSED_ACTIVE_COLOR = 53
widget_type = IMGUI_BUTTON_COLOR
gh_imgui.set_color(widget_type, r, g, b, a)
set_cur_font_display_offset
Description
Sets the x and y offset of the current font. Useful to adjust the vertical alignment of a text.
Syntax
gh_imgui.set_cur_font_display_offset(
x, y
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_cur_font_display_offset(x, y)
set_default_font
Description
Sets the default font.
Syntax
gh_imgui.set_default_font(
font_id
)
Languages
Parameters
- font_id [ID]: font identifier
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_default_font(font_id)
set_frame_border_size
Description
Sets the size of the frame border.
Syntax
gh_imgui.set_frame_border_size(
x
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_frame_border_size(x)
set_rounding
Description
Sets the rounding of a particular element. A value of 0 means a squared corner.
Syntax
gh_imgui.set_rounding(
what,
x
)
Languages
Parameters
- what [STRING]: name of the element: window, child, popup, frame, scrollbar, grab, tab
- x [REAL]: size
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_rounding("frame", x)
set_indent_spacing
Description
Sets the indent size.
Syntax
gh_imgui.set_indent_spacing(
spacing
)
Languages
Parameters
- spacing [REAL]: indent spacing
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_indent_spacing(spacing)
set_item_default_focus
Description
Makes last item the default focused item of a window.
Syntax
gh_imgui.set_item_default_focus()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_item_default_focus()
set_keyboard_focus_here
Description
Focuses keyboard on the next widget. Use positive offset to access sub components of a multiple component widget. Use -1 to access previous widget.
Syntax
gh_imgui.set_keyboard_focus_here(
offset
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_keyboard_focus_here(offset)
set_next_item_width
Description
Sets the size of the next item.
Syntax
gh_imgui.set_next_item_width(
width
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_next_item_width(width)
set_next_window_content_size
Description
Sets the size of the window content.
Syntax
gh_imgui.set_next_window_content_size(
width, height
)
Languages
Parameters
- width, height [REAL]: size
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_next_window_content_size(width, height)
set_scroll
Description
Sets the scrolling amount in X and Y [0..get_scroll_max()].
Syntax
gh_imgui.set_scroll(
scroll_x, scroll_y
)
Languages
Parameters
- scroll_x, scroll_y [REAL]: scrolling values in X and Y
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_scroll(scroll_x, scroll_y)
set_scroll_from_pos_y
Description
Adjusts scrolling amount to make given position visible. Generally get_cursor_start_pos() + offset to compute a valid position.
Syntax
gh_imgui.set_scroll_from_pos_y(
local_y,
center_y_ratio
)
Languages
Parameters
- local_y [REAL]: local y
- center_y_ratio [REAL]: y ratio
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_scroll_from_pos_y(local_y, center_y_ratio)
set_scroll_here_y
Description
Adjusts scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center, 1.0: bottom. When using to make a default/current item visible, consider using set_item_default_focus() instead.
Syntax
gh_imgui.set_scroll_here_y(
center_y_ratio
)
Languages
Parameters
- center_y_ratio [REAL]: y ratio
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_scroll_here_y(center_y_ratio)
set_style_colors
Description
Sets a built-in color style.
Syntax
gh_imgui.set_style_colors(
style
)
Languages
Parameters
- style [ENUM]: name of the style
Return Values
This function has no return value(s).
Code sample
-- Available sytles:
"classic"
"dark"
"light"
"krosoft"
"maya"
"rayteak"
"fromhue"
"cherry"
"dark2"
"corporate_grey"
style_name = "classic"
gh_imgui.set_style_colors(style_name)
set_tooltip
Description
Sets a tooltip.
Syntax
gh_imgui.set_tooltip(
caption
)
Languages
Parameters
- caption [STRING]: tooltip text
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_tooltip("This is a tooltip!")
set_window_border_size
Description
Sets the size of the window border.
Syntax
gh_imgui.set_window_border_size(
x
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_window_border_size(x)
set_window_focus
Description
Sets named window to be focused (front-most).
Syntax
gh_imgui.set_window_focus(
name
)
Languages
Parameters
- name [STRING]: name of the window
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_window_focus(name)
set_window_rounding
Description
Sets the window corner rounding.
Syntax
gh_imgui.set_window_rounding(
x
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_window_rounding(x)
show_demo_window
Description
Renders the ImGui demo window.
Syntax
gh_imgui.show_demo_window()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.show_demo_window()
show_metrics_window
Description
Display an ImGui built-in window that shows statistics about all windows. Call this function between frame_begin() and frame_end().
Syntax
gh_imgui.show_metrics_window()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.show_metrics_window()
show_stack_tool_window
Description
Display an ImGui built-in window that shows items unique IDs. Call this function between frame_begin() and frame_end().
Syntax
gh_imgui.show_stack_tool_window()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.show_stack_tool_window()
show_test_window
Description
Shows ImGui test window.
Syntax
gh_imgui.show_test_window()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.frame_begin(winW, winH, mouse_x, mouse_y, mouse_left_button, mouse_right_button)
gh_imgui.show_test_window()
gh_imgui.frame_end()
slider_1i
Description
Displays a 1D slider with integer values.
Syntax
value = gh_imgui.slider_1i(
label,
initial_value,
v_min, v_max
)
Languages
Parameters
- label [STRING]: name of the slider
- initial_value [INTEGER]: initial value
- v_min, v_max [INTEGER]: min / max value of the slider
Return Values
- value [INTEGER]: current value
Code sample
v = gh_imgui.slider_1i("slider01", initial_value, v_min, v_max)
slider_1i_v2
Description
Displays a 1D slider with integer values.
Syntax
value = gh_imgui.slider_1i_v2(
label,
initial_value,
v_min, v_max,
flags
)
Languages
Parameters
- label [STRING]: name of the slider
- initial_value [INTEGER]: initial value
- v_min, v_max [INTEGER]: min / max value of the slider
- flags [INTEGER]: ImGuiSliderFlags_xxxx flags
Return Values
- value [INTEGER]: current value
Code sample
ImGuiSliderFlags_None = 0
ImGuiSliderFlags_ClampOnInput = 16
ImGuiSliderFlags_Logarithmic = 32
ImGuiSliderFlags_NoRoundToFormat = 64
ImGuiSliderFlags_NoInput = 12
v = gh_imgui.slider_1i_v2("slider01", initial_value, v_min, v_max, ImGuiSliderFlags_None)
slider_1f
Description
Displays a 1D slider.
Syntax
value = gh_imgui.slider_1f(
label,
initial_value,
v_min, v_max,
power
)
Languages
Parameters
- label [STRING]: name of the slider
- initial_value [REAL]: initial value
- v_min, v_max [REAL]: min / max value of the slider
- power [REAL]: use power != 1.0 for logarithmic sliders
Return Values
- value [REAL]: current value
Code sample
v = gh_imgui.slider_1f("slider01", initial_value, v_min, v_max, 1.0)
slider_2f
Description
Displays a 2D slider.
Syntax
x, y = gh_imgui.slider_2f(
label,
x0, y0,
v_min, v_max,
power
)
Languages
Parameters
- label [STRING]: name of the slider
- x0, y0 [REAL]: initial 2D value
- v_min, v_max [REAL]: min / max value of the slider
- power [REAL]: use power != 1.0 for logarithmic sliders
Return Values
- x, y [REAL]: current 2D value
Code sample
x, y = gh_imgui.slider_2f("slider04", x0, y0, v_min, v_max, 1.0)
slider_3f
Description
Displays a 3D slider.
Syntax
x, y, z = gh_imgui.slider_3f(
label,
x0, y0, z0,
v_min, v_max,
power
)
Languages
Parameters
- label [STRING]: name of the slider
- x0, y0, z0 [REAL]: initial 3D value
- v_min, v_max [REAL]: min / max value of the slider
- power [REAL]: use power != 1.0 for logarithmic sliders
Return Values
- x, y, z [REAL]: current 3D value
Code sample
x, y, z = gh_imgui.slider_3f("slider03", x0, y0, z0, v_min, v_max, 1.0)
slider_4f
Description
Displays a 4D slider.
Syntax
x, y, z, w = gh_imgui.slider_4f(
label,
x0, y0, z0, w0,
v_min, v_max,
power
)
Languages
Parameters
- label [STRING]: name of the slider
- x0, y0, z0, w0 [REAL]: initial 4D value
- v_min, v_max [REAL]: min / max value of the slider
- power [REAL]: use power != 1.0 for logarithmic sliders
Return Values
- x, y, z, w [REAL]: current 4D value
Code sample
x, y, z, w = gh_imgui.slider_4f("slider02", x0, y0, z0, w0, v_min, v_max, 1.0)
spacing
Description
Adds a vertical space.
Syntax
gh_imgui.spacing()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.spacing()
bullet
Description
Adds a bullet (for lists).
Syntax
gh_imgui.bullet()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.bullet()
tab_bar_begin
Description
Begins a tab bar.
Syntax
is_opened = gh_imgui.tab_bar_begin(
label
)
Languages
Parameters
Return Values
- is_opened [BOOLEAN]: 1 (true) or 0 (false)
Code sample
ret = gh_imgui.tab_bar_begin("tabbar01")
tab_bar_begin_v2
Description
Begins a tab bar.
Syntax
is_opened = gh_imgui.tab_bar_begin_v2(
label,
flags
)
Languages
Parameters
- label [STRING]: label
- flags [ENUM]: ImGuiTabBarFlags_xxx options
Return Values
- is_opened [BOOLEAN]: 1 (true) or 0 (false)
Code sample
ImGuiTabBarFlags_None = 0,
ImGuiTabBarFlags_Reorderable = 1
ImGuiTabBarFlags_AutoSelectNewTabs = 2
ImGuiTabBarFlags_NoCloseWithMiddleMouseButton = 4
ImGuiTabBarFlags_NoTabListPopupButton = 8
ImGuiTabBarFlags_NoTabListScrollingButtons = 16
ImGuiTabBarFlags_NoTooltip = 32
ImGuiTabBarFlags_FittingPolicyResizeDown = 64
ImGuiTabBarFlags_FittingPolicyScroll = 128
ret = gh_imgui.tab_bar_begin_v2("tabbar01", ImGuiTabBarFlags_Reorderable)
tab_bar_end
Description
Ends a tab bar.
Syntax
gh_imgui.tab_bar_end()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
ImGuiTabBarFlags_Reorderable = 1
if (gh_imgui.tab_bar_begin_v2("tabbar01", ImGuiTabBarFlags_Reorderable) == 1) then
...
gh_imgui.tab_bar_end()
end
tab_item_begin
Description
Begins a tab bar item.
Syntax
is_opened = gh_imgui.tab_item_begin(
label,
show_tab,
flags
)
Languages
Parameters
- label [STRING]: label
- show_tab [BOOLEAN]: 1 (show) or 0 (hide)
- flags [ENUM]: ImGuiTabItemFlags_xxx options
Return Values
- is_opened [BOOLEAN]: 1 (true) or 0 (false)
Code sample
flags = ImGuiTabItemFlags_None -- 0
show_tab = 1
if (gh_imgui.tab_bar_begin("tabbar01", show_tab, flags) == 1) then
flags = 0
if (gh_imgui.tab_item_begin("TAB1", 1, flags) == 1) then
gh_imgui.text("This is the TAB1")
gh_imgui.tab_item_end()
end
if (gh_imgui.tab_item_begin("TAB2", 0, flags) == 1) then
gh_imgui.text("This is the TAB2")
gh_imgui.tab_item_end()
end
gh_imgui.tab_bar_end()
end
tab_item_begin_v2
Description
Begins a tab bar item.
Syntax
is_opened = gh_imgui.tab_item_begin_v2(
label,
flags
)
Languages
Parameters
- label [STRING]: label
- flags [ENUM]: ImGuiTabItemFlags_xxx options
Return Values
- is_opened [BOOLEAN]: 1 (true) or 0 (false)
Code sample
if (gh_imgui.tab_bar_begin_v2("tabbar01", flags) == 1) then
flags = 0
if (gh_imgui.tab_item_begin("TAB1", 1, flags) == 1) then
gh_imgui.text("This is the TAB1")
gh_imgui.tab_item_end()
end
if (gh_imgui.tab_item_begin("TAB2", 1, flags) == 1) then
gh_imgui.text("This is the TAB2")
gh_imgui.tab_item_end()
end
gh_imgui.tab_bar_end()
end
tab_item_end
Description
Ends a tab bar item.
Syntax
gh_imgui.tab_item_end()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
flags = 0
if (gh_imgui.tab_bar_begin_v2("tabbar01", flags) == 1) then
flags = 0
if (gh_imgui.tab_item_begin("TAB1", 1, flags) == 1) then
gh_imgui.text("This is the TAB1")
gh_imgui.tab_item_end()
end
if (gh_imgui.tab_item_begin("TAB2", 1, flags) == 1) then
gh_imgui.text("This is the TAB2")
gh_imgui.tab_item_end()
end
gh_imgui.tab_bar_end()
end
terminate
Description
Terminates the ImGui library. Must be called once in the TERMINATE script.
Syntax
gh_imgui.terminate()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.terminate()
text
Description
Displays a simple text.
Syntax
gh_imgui.text(
text
)
Languages
Parameters
- text [STRING]: text to display
Return Values
This function has no return value(s).
Code sample
gh_imgui.text("GeeXLab is powerful!")
text_rgba
Description
Displays a colored text.
Syntax
gh_imgui.text_rgba(
text,
r, g, b, a
)
Languages
Parameters
- text [STRING]: text to display
- r, g, b, a [REAL]: color of the text
Return Values
This function has no return value(s).
Code sample
gh_imgui.text_rgba("GeeXLab is powerful!", 1.0, 1.0, 0.0, 1.0)
text_unformatted_v1
Description
Displays a raw text without formatting. Recommended for long chunks of text.
Syntax
gh_imgui.text_unformatted_v1(
text
)
Languages
Parameters
- text [STRING]: text to display
Return Values
This function has no return value(s).
Code sample
gh_imgui.text_unformatted_v1("GeeXLab is powerful!")
text_unformatted_v2
Description
Displays a raw text without formatting. Recommended for long chunks of text.
Syntax
gh_imgui.text_unformatted_v2(
text,
text_end
)
Languages
Parameters
- text [STRING]: text to display
- text_end [STRING]: XX euh...
Return Values
This function has no return value(s).
Code sample
gh_imgui.text_unformatted_v2("GeeXLab is powerful!")
text_wrapped
Description
Displays a wrapped text.
Syntax
gh_imgui.text_wrapped(
text
)
Languages
Parameters
- text [STRING]: text to display
Return Values
This function has no return value(s).
Code sample
gh_imgui.text_wrapped("GeeXLab is powerful!")
tree_node
Description
Starts a tree.
Syntax
state = gh_imgui.tree_node(
label
)
Languages
Parameters
Return Values
- state [BOOLEAN]: tree opened: 1 (true) or 0 (false)
Code sample
node_open = gh_imgui.tree_node("Root")
if (node_open == 1) then
gh_imgui.tree_node_leaf("Child 1")
if (gh_imgui.is_item_clicked(mouse_button_left) == 1) then
tree_selected_node_name = "Child 1"
end
gh_imgui.tree_pop()
end
tree_node_ex
Description
Starts a tree.
Syntax
state = gh_imgui.tree_node_ex(
label,
flags
)
Languages
Parameters
- label [STRING]: label
- flags [ENUM]: ImGuiTreeNodeFlags_xxx options
Return Values
- state [BOOLEAN]: tree opened: 1 (true) or 0 (false)
Code sample
flags = ImGuiTreeNodeFlags_Selected
node_open = gh_imgui.tree_node_ex("Root", flags)
if (node_open == 1) then
gh_imgui.tree_node_leaf("Child 1")
if (gh_imgui.is_item_clicked(mouse_button_left) == 1) then
tree_selected_node_name = "Child 1"
end
gh_imgui.tree_pop()
end
tree_node_leaf
Description
Display a tree leaf.
Syntax
gh_imgui.tree_node_leaf(
label
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
node_open = gh_imgui.tree_node("Root")
if (node_open == 1) then
gh_imgui.tree_node_leaf("Child 1")
if (gh_imgui.is_item_clicked(mouse_button_left) == 1) then
tree_selected_node_name = "Child 1"
end
gh_imgui.tree_pop()
end
tree_node_leaf_v2
Description
Display a tree leaf.
Syntax
gh_imgui.tree_node_leaf_v2(
label,
flags
)
Languages
Parameters
- label [STRING]: label
- flags [ENUM]: tree options - see ImGuiTreeNodeFlags_xxx constants in libs/lua/imgui.lua
Return Values
This function has no return value(s).
Code sample
node_open = gh_imgui.tree_node("Root")
if (node_open == 1) then
local ImGuiTreeNodeFlags_Bullet = 512
gh_imgui.tree_node_leaf_v2("Child 1", ImGuiTreeNodeFlags_Bullet)
if (gh_imgui.is_item_clicked(mouse_button_left) == 1) then
tree_selected_node_name = "Child 1"
end
gh_imgui.tree_pop()
end
tree_pop
Description
Ends a tree.
Syntax
gh_imgui.tree_pop()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
node_open = gh_imgui.tree_node("Root")
if (node_open == 1) then
gh_imgui.tree_node_leaf("Child 1")
if (gh_imgui.is_item_clicked(mouse_button_left) == 1) then
tree_selected_node_name = "Child 1"
end
gh_imgui.tree_pop()
end
underline
Description
Draw a colored line under the current item.
Syntax
gh_imgui.underline(
r, g, b, a
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.underline(r, g, b, a)
unindent
Description
Sets unindent spacing.
Syntax
gh_imgui.unindent(
indent_w
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.unindent(indent_w)
url
Description
Draw a clickable url.
Syntax
clicked = gh_imgui.url(
link_caption,
link_url,
tooltip_text
)
Languages
Parameters
- link_caption [STRING]: caption
- link_url [STRING]: url (https://....) - Link can be empty to work like a button
- tooltip_text [STRING]: tool tip (can be empty)
Return Values
- clicked [INTEGER]: 1 if clicked, 0 otherwise.
Code sample
clicked = gh_imgui.url(link_caption, link_url, tooltip_text)
vslider_1f
Description
Displays a 1D vertical slider.
Syntax
value = gh_imgui.vslider_1f(
label,
width, height,
initial_value,
v_min, v_max,
power
)
Languages
Parameters
- label [STRING]: name of the slider
- width, height [REAL]: size of the slider
- initial_value [REAL]: initial value
- v_min, v_max [REAL]: min / max value of the slider
- power [REAL]: use power != 1.0 for logarithmic sliders
Return Values
- value [REAL]: current value
Code sample
v = gh_imgui.vslider_1f("vslider01", 20, 100, initial_value, v_min, v_max, 1.0)
vslider_1i
Description
Displays a 1D vertical slider with integer values.
Syntax
value = gh_imgui.vslider_1i(
label,
width, height,
initial_value,
v_min, v_max
)
Languages
Parameters
- label [STRING]: name of the slider
- width, height [REAL]: size of the slider
- initial_value [INTEGER]: initial value
- v_min, v_max [INTEGER]: min / max value of the slider
Return Values
- value [INTEGER]: current value
Code sample
v = gh_imgui.vslider_1i("slider01", 20, 100, initial_value, v_min, v_max)
vslider_1i_v2
Description
Displays a 1D vertical slider with integer values.
Syntax
value = gh_imgui.vslider_1i_v2(
label,
width, height,
initial_value,
v_min, v_max,
flags
)
Languages
Parameters
- label [STRING]: name of the slider
- width, height [REAL]: size of the slider
- initial_value [INTEGER]: initial value
- v_min, v_max [INTEGER]: min / max value of the slider
- flags [INTEGER]: ImGuiSliderFlags_xxxx flags
Return Values
- value [INTEGER]: current value
Code sample
ImGuiSliderFlags_None = 0
ImGuiSliderFlags_ClampOnInput = 16
ImGuiSliderFlags_Logarithmic = 32
ImGuiSliderFlags_NoRoundToFormat = 64
ImGuiSliderFlags_NoInput = 128
v = gh_imgui.vslider_1i_v2("slider01", 20, 100, initial_value, v_min, v_max, ImGuiSliderFlags_None)
widget
Description
Adds a widget.
Syntax
gh_imgui.widget(
widget_type
)
Languages
Parameters
- widget_type [ENUM]: type of the widget
Return Values
This function has no return value(s).
Code sample
IMGUI_WIDGET_SEPARATOR = 1
IMGUI_WIDGET_SAME_LINE = 2
IMGUI_WIDGET_BULLET = 3
IMGUI_WIDGET_VERTICAL_SPACING = 4
IMGUI_WIDGET_NEW_LINE = 5
gh_imgui.widget(IMGUI_WIDGET_SEPARATOR)
window_begin
Description
Starts the rendering of a window.
Syntax
is_open = gh_imgui.window_begin(
name,
width, height,
pos_x, pos_y,
win_flags,
pos_flags,
size_flags
)
Languages
Parameters
- name [STRING]: name of the window
- width, height [REAL]: size of the window
- pos_x, pos_y [REAL]: position of the window
- win_flags [ENUM]: window options: set to 0 for default options. Options can be OR-ed.
- pos_flags [ENUM]: window position options: set to 4 for default options
- size_flags [ENUM]: window size options: set to 4 for default options
Return Values
- is_open [BOOLEAN]: window: 1 (opened) or 0 (collapsed)
Code sample
-- Window options
local window_default = 0
local window_no_resize = 2
local window_no_move = 4
local window_no_collapse = 32
local window_show_border = 128
local window_no_save_settings = 256
-- Position or size options
local pos_size_flag_always = 1 -- Always set the pos and/or size
local pos_size_flag_once = 2 -- Set the pos and/or size once per runtime session (only the first call with succeed)
local pos_size_flag_first_use_ever = 4 -- Set the pos and/or size if the window has no saved data (if doesn't exist in the .ini file)
local pos_size_flag_appearing = 8 -- Set the pos and/or size if the window is appearing after being hidden/inactive (or the first time)
-- window_flags = window_no_move | window_no_save_settings
window_flags = 0
pos_flags = pos_size_flag_first_use_ever
size_flags = pos_size_flag_first_use_ever
is_open = gh_imgui.window_begin("GeeXLab ImGui demo", 300, 200, 20, 20, window_flags, pos_flags, size_flags)
if (is_open == 1) then
gh_imgui.text("GeeXLab is powerful!")
end
gh_imgui.window_end()
window_begin_v2
Description
Starts the rendering of a window. This window has a close button.
Syntax
is_open, show_window = gh_imgui.window_begin_v2(
name,
width, height,
pos_x, pos_y,
win_flags,
pos_flags,
size_flags,
show_window
)
Languages
Parameters
- name [STRING]: name of the window
- width, height [REAL]: size of the window
- pos_x, pos_y [REAL]: position of the window
- win_flags [ENUM]: window options: set to 0 for default options. Options can be OR-ed.
- pos_flags [ENUM]: window position options: set to 4 for default options
- size_flags [ENUM]: window size options: set to 4 for default options
- show_window [BOOLEAN]: initial open state of the window: 1 (show) or 0 (hide)
Return Values
- is_open, show_window [BOOLEAN]: is_open: 1 (window opened) or 0 (window collapsed) - show_window: 0 (the user has clicked on the close button)
Code sample
-- Window options
local window_default = 0
local window_no_resize = 2
local window_no_move = 4
local window_no_collapse = 32
local window_show_border = 128
local window_no_save_settings = 256
-- Position or size options
local pos_size_flag_always = 1 -- Always set the pos and/or size
local pos_size_flag_once = 2 -- Set the pos and/or size once per runtime session (only the first call with succeed)
local pos_size_flag_first_use_ever = 4 -- Set the pos and/or size if the window has no saved data (if doesn't exist in the .ini file)
local pos_size_flag_appearing = 8 -- Set the pos and/or size if the window is appearing after being hidden/inactive (or the first time)
-- window_flags = window_no_move | window_no_save_settings
window_flags = 0
pos_flags = pos_size_flag_first_use_ever
size_flags = pos_size_flag_first_use_ever
if (show_window == 1) then
window_flags = 0
show = show_window
is_open, show_window = gh_imgui.window_begin_v2("GeeXLab information", 300, 200, 20, 20, window_flags, pos_flags, size_flags, show)
if (is_open == 1) then
gh_imgui.text("GeeXLab is powerful!")
end
gh_imgui.window_end()
end
window_end
Description
Stops the rendering of a window.
Syntax
gh_imgui.window_end()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
window_flags = 0
gh_imgui.window_begin("GeeXLab information", 300, 200, 20, 20, window_flags)
gh_imgui.text("GeeXLab is powerful!")
gh_imgui.window_end()
imguizmoquat_gizmo3d_v1
Description
Rotates an object using a virtual trackball.
Syntax
gh_imgui.imguizmoquat_gizmo3d_v1(
label,
size,
mode,
object_id
)
Languages
Parameters
- label [STRING]: label of the gizmo
- size [REAL]: size of the item
- mode [INTEGER]: gizmo mode
- object_id [REAL]: object identifier
Return Values
This function has no return value(s).
Code sample
local mode3Axes = 1
local modeDirection = 2
local modeDirPlane = 4
local modeDual = 8
local modeMask = 15
local cubeAtOrigin = 16
local sphereAtOrigin = 32
local noSolidAtOrigin = 64
local modeFullAxes = 128
local axesModeMask = 240
gh_imgui.imguizmoquat_gizmo3d_v1("##gizmo01", 100.0, modeDirection + cubeAtOrigin, torus)
imguizmoquat_gizmo3d_v2
Description
Rotates a virtual trackball and returns the orientation quaternion.
Syntax
qx, qy, qz, qw = gh_imgui.imguizmoquat_gizmo3d_v2(
label,
size,
mode,
q0x, q0y, q0z, q0w
)
Languages
Parameters
- label [STRING]: label of the gizmo
- size [REAL]: size of the item
- mode [INTEGER]: gizmo mode
- q0x, q0y, q0z, q0w [REAL]: initial orientation quaternion
Return Values
- qx, qy, qz, qw [REAL]: orientation quaternion
Code sample
local mode3Axes = 1
local modeDirection = 2
local modeDirPlane = 4
local modeDual = 8
local modeMask = 15
local cubeAtOrigin = 16
local sphereAtOrigin = 32
local noSolidAtOrigin = 64
local modeFullAxes = 128
local axesModeMask = 240
q0 = {x=0, y=0, z=0, w=0}
qr = {x=0, y=0, z=0, w=0}
qr.x, qr.w, qr.z, qr.w = gh_imgui.imguizmoquat_gizmo3d_v2("##gizmo01", 100.0, modeDirection + cubeAtOrigin, q0.x, q0.y, q0.z, q0.w)
imguizmoquat_gizmo3d_v3
Description
Rotates a virtual trackball and returns the 4x4 orientation matrix.
Syntax
m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15 = gh_imgui.imguizmoquat_gizmo3d_v3(
label,
size,
mode,
q0x, q0y, q0z, q0w
)
Languages
Parameters
- label [STRING]: label of the gizmo
- size [REAL]: size of the item
- mode [INTEGER]: gizmo mode
- q0x, q0y, q0z, q0w [REAL]: initial orientation quaternion
Return Values
- m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15 [REAL]: the 16 floats that make the 4x4 matrix
Code sample
local mode3Axes = 1
local modeDirection = 2
local modeDirPlane = 4
local modeDual = 8
local modeMask = 15
local cubeAtOrigin = 16
local sphereAtOrigin = 32
local noSolidAtOrigin = 64
local modeFullAxes = 128
local axesModeMask = 240
q0 = {x=0, y=0, z=0, w=0}
m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12,m13,m14,m15 = gh_imgui.imguizmoquat_gizmo3d_v3("##gizmo01", 100.0, modeDirection + cubeAtOrigin, q0.x, q0.y, q0.z, q0.w)
set_item_spacing
Description
Sets the spacing between items.
Syntax
gh_imgui.set_item_spacing(
x, y
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_item_spacing(x, y)
get_item_spacing
Description
Gets the spacing between items.
Syntax
x, y = gh_imgui.get_item_spacing()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
x, y = gh_imgui.get_item_spacing()
imgui_plot_create
Description
Creates a plotline.
Syntax
plot_id = gh_imgui.imgui_plot_create(
label
)
Languages
Parameters
- label [STRING]: name of the plotline
Return Values
- plot_id [ID]: plotline identifier
Code sample
plot_id = gh_imgui.imgui_plot_create("myPlotline")
plot_kill
Description
Destroys a plotline.
Syntax
gh_imgui.plot_kill(
plot_id
)
Languages
Parameters
- plot_id [ID]: plotline identifier
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_kill(plot_id)
plot_draw
Description
Draws a plotline.
Syntax
gh_imgui.plot_draw(
plot_id,
label,
num_items,
size_x, size_y
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- label [STRING]: name of the plotline
- num_items [INTEGER]: number of lines to draw
- size_x, size_y [REAL]: plotline frame size
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_draw(plot_id, label, num_items, size_x, size_y)
plot_set_title
Description
Sets the title a plotline.
Syntax
gh_imgui.plot_set_title(
plot_id,
title
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- title [STRING]: title of the plotline
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_set_title(plot_id, title)
plot_set_color
Description
Sets the color a of particular element of a plotline.
Syntax
gh_imgui.plot_set_color(
plot_id,
what,
r, g, b, a
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- what [STRING]: element name: 'frame', 'background', 'border'
- r, g, b, a [REAL]: RGBA color
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_set_color(plot_id, "background", 0.4, 0.4, 0.4, 0.85)
plot_set_state
Description
Sets the state a of particular element of a plotline.
Syntax
gh_imgui.plot_set_state(
plot_id,
what,
state
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- what [STRING]: element name: 'show_crosshairs', 'show_mouse_pos', 'show_legend'
- state [BOOLEAN]: 0 (disabled) or 1 (enabled)
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_set_state(plot_id, "show_crosshairs", state)
plot_set_axis_param_bool
Description
Sets the state a of particular element of an axis.
Syntax
gh_imgui.plot_set_axis_param_bool(
plot_id,
axis,
what,
state
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- axis [INTEGER]: X axis: 0 or Y axis: 1
- what [STRING]: element name: 'show_grid', 'show_tick_marks', 'show_tick_labels', 'adaptive', 'lock_max', 'lock_min', 'flip'
- state [BOOLEAN]: 0 (disabled) or 1 (enabled)
Return Values
This function has no return value(s).
Code sample
axis_x = 0
axis_y = 1
state = 1
gh_imgui.plot_set_axis_param_bool(plot_id, axis_x, "show_grid", state)
gh_imgui.plot_set_axis_param_bool(plot_id, axis_y, "show_grid", state)
plot_set_axis_param_int
Description
Sets the value a of particular element of an axis.
Syntax
gh_imgui.plot_set_axis_param_int(
plot_id,
axis,
what,
x
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- axis [INTEGER]: X axis: 0 or Y axis: 1
- what [STRING]: element name: 'divisions', 'subdivisions'
- x [INTEGER]: value
Return Values
This function has no return value(s).
Code sample
axis_x = 0
gh_imgui.plot_set_axis_param_int(plot_id, axis_x, "divisions", 10)
gh_imgui.plot_set_axis_param_int(plot_id, axis_x, "subdivisions", 4)
plot_set_axis_param_float
Description
Sets the value a of particular element of an axis.
Syntax
gh_imgui.plot_set_axis_param_float(
plot_id,
axis,
what,
x
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- axis [INTEGER]: X axis: 0 or Y axis: 1
- what [STRING]: element name: 'minimum', 'maximum', 'zoom_rate'
- x [REAL]: value
Return Values
This function has no return value(s).
Code sample
axis_y = 1
gh_imgui.plot_set_axis_param_float(plot_id, axis_y, "minimum", -10.0)
gh_imgui.plot_set_axis_param_bool(plot_id, axis_y, "minimum", 10.0)
plot_set_axis_label
Description
Sets the label of an axis.
Syntax
gh_imgui.plot_set_axis_label(
plot_id,
axis,
label
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- axis [INTEGER]: X axis: 0 or Y axis: 1
- label [STRING]: label
Return Values
This function has no return value(s).
Code sample
axis_y = 1
gh_imgui.plot_set_axis_label(plot_id, axis_y, "Y axis")
plot_set_axis_color
Description
Sets the color of an axis.
Syntax
gh_imgui.plot_set_axis_color(
plot_id,
axis,
r, g, b, a
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- axis [INTEGER]: X axis: 0 or Y axis: 1
- r, g, b, a [REAL]: RGBA color
Return Values
This function has no return value(s).
Code sample
axis_y = 1
gh_imgui.plot_set_axis_color(plot_id, axis_y, r, g, b, a)
plot_add_item
Description
Adds a new item (a line) to an existing plotline.
Syntax
item_index = gh_imgui.plot_add_item(
plot_id,
label,
type
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- label [STRING]: label
- type [INTEGER]: line: 0, scatter: 1, xbar: 2 or ybar: 3
Return Values
- item_index [INTEGER]: index of the new item
Code sample
type_line = 0
type_scatter = 1
type_xbar = 2
type_ybar = 3
item_index = gh_imgui.plot_add_item(plot_id, "myNewItem", type_line)
plot_item_set_label
Description
Sets a label of an item.
Syntax
gh_imgui.plot_item_set_label(
plot_id,
item_index,
label
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
- label [STRING]: label
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_add_item(plot_id, item_index, "myItem")
plot_item_set_color
Description
Sets the color of an item.
Syntax
gh_imgui.plot_item_set_color(
plot_id,
item_index,
r, g, b, a
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
- r, g, b, a [REAL]: RGBA color
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_item_set_color(plot_id, item_index, r, g, b, a)
plot_item_set_type
Description
Sets the type of an item.
Syntax
gh_imgui.plot_item_set_type(
plot_id,
item_index,
type
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
- type [INTEGER]: line: 0, scatter: 1, xbar: 2 or ybar: 3
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_item_set_type(plot_id, item_index, type)
plot_item_set_size
Description
Sets the size (or tickness) of an item.
Syntax
gh_imgui.plot_item_set_size(
plot_id,
item_index,
size
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
- size [REAL]: size (or tickness)
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_item_set_size(plot_id, item_index, 2.0)
plot_item_set_data_begin
Description
Sets the start offset.
Syntax
gh_imgui.plot_item_set_data_begin(
plot_id,
item_index,
x
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
- x [INTEGER]: offset
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_item_set_data_begin(plot_id, item_index, 0)
plot_item_add_data
Description
Adds data to an item.
Syntax
gh_imgui.plot_item_add_data(
plot_id,
item_index,
x, y
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
- x, y [REAL]: data - these are the line values in Y and Y
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_item_add_data(plot_id, item_index, x, y)
plot_item_get_data_size
Description
Gets the data size of an item.
Syntax
n = gh_imgui.plot_item_get_data_size(
plot_id,
item_index
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
Return Values
Code sample
n = gh_imgui.plot_item_get_data_size(plot_id, item_index)
plot_item_clear_data
Description
Clears all data of an item.
Syntax
gh_imgui.plot_item_clear_data(
plot_id,
item_index
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_item_clear_data(plot_id, item_index)
plot_item_clear_data
Description
Resize data of an item.
Syntax
gh_imgui.plot_item_clear_data(
plot_id,
item_index,
n
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
- n [INTEGER]: data size
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_item_resize_data(plot_id, item_index, n)
plot_item_set_data
Description
Sets data of an item.
Syntax
gh_imgui.plot_item_set_data(
plot_id,
item_index,
data_index,
x, y
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
- data_index [INTEGER]: index of the data
- x, y [REAL]: data - these are the line values in Y and Y
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_item_set_data(plot_id, item_index, , data_index, x, y)
plot_item_roll_point
Description
Adds a point to an item data set, clearing it every span seconds.
Syntax
gh_imgui.plot_item_roll_point(
plot_id,
item_index,
x, y,
span
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
- x, y [REAL]: data - these are the line values in Y and Y
- span [REAL]: duration in seconds
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_item_roll_point(plot_id, item_index, x, y, span)
plot_item_buffer_point
Description
Pushes a point into an item data set as if it were a circular buffer of #max_points size.
Syntax
gh_imgui.plot_item_buffer_point(
plot_id,
item_index,
x, y,
max_points
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- item_index [INTEGER]: index of the item
- x, y [REAL]: data - these are the line values in Y and Y
- max_points [INTEGER]: max number of points
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_item_buffer_point(plot_id, item_index, x, y, max_points)
plot_axis_scroll
Description
Call before rendering a plot to scroll the axis in time, displaying history seconds.
Syntax
gh_imgui.plot_axis_scroll(
plot_id,
axis,
current_time,
history
)
Languages
Parameters
- plot_id [ID]: plotline identifier
- axis [INTEGER]: X axis: 0, Y axis: 1
- current_time [REAL]: current time
- history [REAL]: history seconds
Return Values
This function has no return value(s).
Code sample
gh_imgui.plot_axis_scroll(plot_id, axis, current_time, history)
plot_is_hovered
Description
Checks if a plotline is hovered by the mouse.
Syntax
state = gh_imgui.plot_is_hovered()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [INTEGER]: 1: hovered, 0: not hovered
Code sample
state = gh_imgui.plot_is_hovered()
plot_get_mouse_position
Description
Gets the mouse position related to the plotline.
Syntax
x, y = gh_imgui.plot_get_mouse_position()
Languages
Parameters
This function has no input parameter(s).
Return Values
- x, y [REAL]: mouse position
Code sample
x, y = gh_imgui.plot_get_mouse_position()
get_text_line_height
Description
Gets the current line height (font size).
Syntax
h = gh_imgui.get_text_line_height()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
h = gh_imgui.get_text_line_height()
get_text_line_height_with_spacing
Description
Gets the distance in pixels between 2 consecutive lines of text.
Syntax
h = gh_imgui.get_text_line_height_with_spacing()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
h = gh_imgui.get_text_line_height_with_spacing()
color_text_editor_create
Description
Creates a new text editor widget.
Syntax
te_id = gh_imgui.color_text_editor_create()
Languages
Parameters
This function has no input parameter(s).
Return Values
- te_id [ID]: text editor identifier
Code sample
te_id = gh_imgui.color_text_editor_create()
color_text_editor_kill
Description
Destroys a text editor.
Syntax
gh_imgui.color_text_editor_kill(
te_id
)
Languages
Parameters
- te_id [ID]: text editor identifier
Return Values
This function has no return value(s).
Code sample
gh_imgui.color_text_editor_kill(te_id)
color_text_editor_render
Description
Draws a text editor.
Syntax
gh_imgui.color_text_editor_render(
te_id,
title,
size_x, size_y,
border
)
Languages
Parameters
- te_id [ID]: text editor identifier
- title [STRING]: title
- size_x, size_y [REAL]: frame size
- border [INTEGER]: border (1: yes, 0: no)
Return Values
This function has no return value(s).
Code sample
gh_imgui.color_text_editor_render(te_id, "Lua Editor", 400, 600, 0)
color_text_editor_get_text
Description
Gets the text of the editor.
Syntax
text = gh_imgui.color_text_editor_get_text(
te_id
)
Languages
Parameters
- te_id [ID]: text editor identifier
Return Values
Code sample
text = gh_imgui.color_text_editor_get_text(te_id)
color_text_editor_set_text
Description
Sets the text of the editor.
Syntax
gh_imgui.color_text_editor_set_text(
te_id,
text
)
Languages
Parameters
- te_id [ID]: text editor identifier
- text [STRING]: text
Return Values
This function has no return value(s).
Code sample
gh_imgui.color_text_editor_set_text(te_id, text)
color_text_editor_set_language
Description
Sets a built-in language support.
Syntax
gh_imgui.color_text_editor_set_language(
te_id,
lang
)
Languages
Parameters
- te_id [ID]: text editor identifier
- lang [STRING]: langaue: lua, glsl, hlsl, cpp, c, sql
Return Values
This function has no return value(s).
Code sample
gh_imgui.color_text_editor_set_language(te_id, "lua")
color_text_editor_set_palette
Description
Sets a color palette. Colors can also be modified with color_text_editor_palette_set_color().
Syntax
gh_imgui.color_text_editor_set_palette(
te_id,
pal
)
Languages
Parameters
- te_id [ID]: text editor identifier
- pal [STRING]: palette: dark, light, retro_blue
Return Values
This function has no return value(s).
Code sample
gh_imgui.color_text_editor_set_palette(te_id, "dark")
color_text_editor_set_property_bool
Description
Sets a property boolean value.
Syntax
gh_imgui.color_text_editor_set_property_bool(
te_id,
what,
x
)
Languages
Parameters
- te_id [ID]: text editor identifier
- what [STRING]: property name: whitespaces, readonly, colorizer, handle_mouse_inputs, handle_keyboard_inputs
- x [INTEGER]: value
Return Values
This function has no return value(s).
Code sample
gh_imgui.color_text_editor_set_property_bool(te_id, "whitespaces", 1)
color_text_editor_set_property_int
Description
Sets a property integer value.
Syntax
gh_imgui.color_text_editor_set_property_int(
te_id,
what,
x
)
Languages
Parameters
- te_id [ID]: text editor identifier
- what [STRING]: property name: tabsize
- x [INTEGER]: value
Return Values
This function has no return value(s).
Code sample
gh_imgui.color_text_editor_set_property_int(te_id, "tabsize", 2)
color_text_editor_get_total_lines
Description
Gets the current number of lines.
Syntax
n = gh_imgui.color_text_editor_get_total_lines(
te_id
)
Languages
Parameters
- te_id [ID]: text editor identifier
Return Values
- n [INTEGER]: number of lines
Code sample
n = gh_imgui.color_text_editor_get_total_lines(te_id)
color_text_editor_get_selected_text
Description
Gets the selected text.
Syntax
text = gh_imgui.color_text_editor_get_selected_text(
te_id
)
Languages
Parameters
- te_id [ID]: text editor identifier
Return Values
- text [STRING]: selected text
Code sample
text = gh_imgui.color_text_editor_get_selected_text(te_id)
color_text_editor_get_current_line_text
Description
Gets the current line.
Syntax
line = gh_imgui.color_text_editor_get_current_line_text(
te_id
)
Languages
Parameters
- te_id [ID]: text editor identifier
Return Values
- line [STRING]: current line
Code sample
line = gh_imgui.color_text_editor_get_current_line_text(te_id)
color_text_editor_get_cursor_position
Description
Gets the cursor position.
Syntax
x, y = gh_imgui.color_text_editor_get_cursor_position(
te_id
)
Languages
Parameters
- te_id [ID]: text editor identifier
Return Values
- x, y [INTEGER]: current cursor position
Code sample
x, y = gh_imgui.color_text_editor_get_cursor_position(te_id)
color_text_editor_palette_set_color
Description
Sets the color of a particular element.
Syntax
gh_imgui.color_text_editor_palette_set_color(
te_id,
what,
r, g, b, a
)
Languages
Parameters
- te_id [ID]: text editor identifier
- what [STRING]: element name: Default, Keyword, Number, String, Punctuation, Preprocessor, Identifier, KnownIdentifier, PreprocIdentifier, Comment, MultiLineComment, Background, Cursor, Selection, ErrorMarker, Breakpoint, LineNumber, CurrentLineFill, CurrentLineFillInactive, CurrentLineEdge, XT95Line
- r, g, b, a [REAL]: RGBA color
Return Values
This function has no return value(s).
Code sample
gh_imgui.color_text_editor_palette_set_color(te_id, "Background", r, g, b, a)
gh_imgui.color_text_editor_palette_set_color(te_id, "XT95Line", 0.2, 0.2, 0.2, 0.8)
color_text_editor_palette_get_color
Description
Gets the color of a particular element.
Syntax
r, g, b, a = gh_imgui.color_text_editor_palette_get_color(
te_id,
what
)
Languages
Parameters
- te_id [ID]: text editor identifier
- what [STRING]: element name: Default, Keyword, Number, String, Punctuation, Preprocessor, Identifier, KnownIdentifier, PreprocIdentifier, Comment, MultiLineComment, Background, Cursor, Selection, ErrorMarker, Breakpoint, LineNumber, CurrentLineFill, CurrentLineFillInactive, CurrentLineEdge
Return Values
- r, g, b, a [REAL]: RGBA color
Code sample
r, g, b, a = gh_imgui.color_text_editor_palette_get_color(te_id, "Background")
color_text_editor_copy_paste_cut
Description
Performs a copy, paste or cut operation.
Syntax
gh_imgui.color_text_editor_copy_paste_cut(
te_id,
what
)
Languages
Parameters
- te_id [ID]: text editor identifier
- what [STRING]: operation: copy, paste or cut
Return Values
This function has no return value(s).
Code sample
gh_imgui.color_text_editor_copy_paste_cut(te_id, "copy")
color_text_editor_selection
Description
Starts or ends text selection.
Syntax
gh_imgui.color_text_editor_selection(
te_id,
what
)
Languages
Parameters
- te_id [ID]: text editor identifier
- what [STRING]: operation: start, end or clear
Return Values
This function has no return value(s).
Code sample
gh_imgui.color_text_editor_selection(te_id, "start")
color_text_editor_is_text_changed
Description
Allows to know the if text has changed.
Syntax
x = gh_imgui.color_text_editor_is_text_changed(
te_id
)
Languages
Parameters
- te_id [ID]: text editor identifier
Return Values
- x [INTEGER]: 1 if text changed, 0 if not.
Code sample
x = gh_imgui.color_text_editor_is_text_changed(te_id)
implot_create_dataplot
Description
Creates a plot data set. This data set will be used with implot_begin_plot() and implot_end_plot() to draw a plot.
Syntax
plotid = gh_imgui.implot_create_dataplot(
max_points
)
Languages
Parameters
- max_points [INTEGER]: max number of points of the data plot. Can be 0
Return Values
- plotid [INTEGER]: plot identifier.
Code sample
plotid = gh_imgui.implot_create_dataplot(max_points)
implot_kill_dataplot
Description
Destroy a plot data set.
Syntax
gh_imgui.implot_kill_dataplot(
plotid
)
Languages
Parameters
- plotid [INTEGER]: plot identifier.
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_kill_dataplot(plotid)
implot_show_demo_window
Description
Displays the official ImPlot demo.
Syntax
gh_imgui.implot_show_demo_window(
show_window
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_show_demo_window(show_window)
implot_begin_plot
Description
Begins the rendering of one or several plots.
Syntax
gh_imgui.implot_begin_plot(
label,
x_label,
y_label,
label,
x, y,
flags,
x_flags,
y_flags,
y2_flags,
y3_flags
)
Languages
Parameters
- label [STRING]: plot label.
- x_label [STRING]: X axis label.
- y_label [STRING]: y axis label.
- label [STRING]: plot label.
- x, y [REAL]: plot size.
- flags [INTEGER]: plot flags/options.
- x_flags [INTEGER]: X axis flags/options.
- y_flags [INTEGER]: Y axis flags/options.
- y2_flags [INTEGER]: Y axis additional flags/options.
- y3_flags [INTEGER]: Y axis additional flags/options.
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_begin_plot(label, x_label, y_label, x_size, y_size, flags, x_flags, y_flags, y2_flags, y3_flags)
gh_imguiimplot_draw_plotline(plotid0, ...)
gh_imguiimplot_draw_plotline(plotid1, ...)
gh_imgui.implot_end_plot()
implot_end_plot
Description
Ends plot rendering.
Syntax
gh_imgui.implot_end_plot()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_end_plot()
implot_add_data
Description
Adds data to a plot. If the plot has been created with max_points greater than zero, data is stored in a circular buffer otherwise in a regular (endless) buffer.
Syntax
gh_imgui.implot_add_data(
plotid,
x, y
)
Languages
Parameters
- plotid [INTEGER]: plot identifier.
- x, y [REAL]: plot data.
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_add_data(plotid, x, y)
implot_draw_plotline
Description
Draws a plot data set.
Syntax
gh_imgui.implot_draw_plotline(
plotid,
label,
count,
offset
)
Languages
Parameters
- plotid [INTEGER]: plot identifier.
- label [STRING]: plot data label.
- count [INTEGER]: number of points to draw.
- offset [INTEGER]: plot data offset.
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_draw_plotline(plotid, label, count, offset)
implot_draw_plotscatter
Description
Draws a plot data set.
Syntax
gh_imgui.implot_draw_plotscatter(
plotid,
label,
count,
offset
)
Languages
Parameters
- plotid [INTEGER]: plot identifier.
- label [STRING]: plot data label.
- count [INTEGER]: number of points to draw.
- offset [INTEGER]: plot data offset.
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_draw_plotscatter(plotid, label, count, offset)
implot_draw_plotshaded
Description
Draws a plot data set.
Syntax
gh_imgui.implot_draw_plotshaded(
plotid,
label,
count,
offset
)
Languages
Parameters
- plotid [INTEGER]: plot identifier.
- label [STRING]: plot data label.
- count [INTEGER]: number of points to draw.
- offset [INTEGER]: plot data offset.
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_draw_plotshaded(plotid, label, count, offset)
implot_draw_plotbars
Description
Draws a plot data set.
Syntax
gh_imgui.implot_draw_plotbars(
plotid,
label,
count,
offset,
size,
vertical
)
Languages
Parameters
- plotid [INTEGER]: plot identifier.
- label [STRING]: plot data label.
- count [INTEGER]: number of points to draw.
- offset [INTEGER]: plot data offset.
- size [REAL]: size.
- vertical [INTEGER]: vertical (1) or hozizontal (0) bars.
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_draw_plotbars(plotid, label, count, offset, size, vertical)
implot_set_next_plot_limits
Description
Sets the limits (X and Y axis) of the next plot.
Syntax
gh_imgui.implot_set_next_plot_limits(
x_min,
x_max,
y_min,
y_max,
cond
)
Languages
Parameters
- x_min [INTEGER]: min limit in a X axis.
- x_max [INTEGER]: max limit in a X axis.
- y_min [INTEGER]: min limit in a Y axis.
- y_max [INTEGER]: max limit in a Y axis.
- cond [INTEGER]:
Return Values
This function has no return value(s).
Code sample
ImGuiCond_None = 0
ImGuiCond_Always = 1
ImGuiCond_Once = 2
ImGuiCond_FirstUseEver = 4
ImGuiCond_Appearing = 8
gh_imgui.implot_set_next_plot_limits(x-10, x, -10, 30, ImGuiCond_Always)
implot_push_style_color
Description
Saves the current color and pushes a new color.
Syntax
gh_imgui.implot_push_style_color(
color_index,
r, g, b, a
)
Languages
Parameters
- color_index [INTEGER]: index (identifier) of the color.
- r, g, b, a [REAL]: RGBA color.
Return Values
This function has no return value(s).
Code sample
ImPlotCol_Line = 0
ImPlotCol_Fill = 1
ImPlotCol_MarkerOutline = 2
ImPlotCol_MarkerFill = 3
ImPlotCol_ErrorBar = 4
ImPlotCol_FrameBg = 5
ImPlotCol_PlotBg = 6
ImPlotCol_PlotBorder = 7
ImPlotCol_XAxis = 8
ImPlotCol_YAxis = 9
ImPlotCol_YAxis2 = 10
ImPlotCol_YAxis3 = 11
ImPlotCol_Selection = 12
ImPlotCol_Query = 13
gh_imgui.implot_push_style_color(ImPlotCol_Line, r, g, b, a)
gh_imgui.implot_draw_plotline(plotid1, "MouseX", max_size, offset)
gh_imgui.implot_pop_style_color(1)
implot_pop_style_color
Description
Restores a color
Syntax
gh_imgui.implot_pop_style_color(
count
)
Languages
Parameters
- count [INTEGER]: number of colors to restore (default: 1).
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_push_style_color(ImPlotCol_Line, r, g, b, a)
gh_imgui.implot_draw_plotline(plotid1, "MouseX", max_size, offset)
gh_imgui.implot_pop_style_color(1)
implot_push_style_var_1f
Description
Saves a property and pushes a new one
Syntax
gh_imgui.implot_push_style_var_1f(
var_id,
x
)
Languages
Parameters
- var_id [INTEGER]: variable identifier.
- x [REAL]: value.
Return Values
This function has no return value(s).
Code sample
ImPlotStyleVar_LineWeight = 0
ImPlotStyleVar_Marker = 1
ImPlotStyleVar_MarkerSize = 2
ImPlotStyleVar_MarkerWeight = 3
ImPlotStyleVar_FillAlpha = 4
ImPlotStyleVar_ErrorBarSize = 5
ImPlotStyleVar_ErrorBarWeight = 6
ImPlotStyleVar_DigitalBitHeight = 7
ImPlotStyleVar_DigitalBitGap = 8
gh_imgui.implot_push_style_var_1i(ImPlotStyleVar_FillAlpha, 0.5)
gh_imgui.implot_draw_plotline(plotid1, "MouseX", max_size, offset)
gh_imgui.implot_pop_style_var(1)
implot_push_style_var_1i
Description
Saves a property and pushes a new one
Syntax
gh_imgui.implot_push_style_var_1i(
var_id,
x
)
Languages
Parameters
- var_id [INTEGER]: variable identifier.
- x [INTEGER]: value.
Return Values
This function has no return value(s).
Code sample
ImPlotStyleVar_LineWeight = 0
ImPlotStyleVar_Marker = 1
ImPlotStyleVar_MarkerSize = 2
ImPlotStyleVar_MarkerWeight = 3
ImPlotStyleVar_FillAlpha = 4
ImPlotStyleVar_ErrorBarSize = 5
ImPlotStyleVar_ErrorBarWeight = 6
ImPlotStyleVar_DigitalBitHeight = 7
ImPlotStyleVar_DigitalBitGap = 8
ImPlotMarker_None = 1
ImPlotMarker_Circle = 2
ImPlotMarker_Square = 4
ImPlotMarker_Diamond = 8
ImPlotMarker_Up = 16
ImPlotMarker_Down = 32
ImPlotMarker_Left = 64
ImPlotMarker_Right = 128
ImPlotMarker_Cross = 256
ImPlotMarker_Plus = 512
ImPlotMarker_Asterisk = 1024
gh_imgui.implot_push_style_var_1i(ImPlotStyleVar_Marker, ImPlotMarker_Circle)
gh_imgui.implot_draw_plotline(plotid1, "MouseX", max_size, offset)
gh_imgui.implot_pop_style_var(1)
implot_is_hovered
Description
Checks if mouse is over the plot
Syntax
state = gh_imgui.implot_is_hovered()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [INTEGER]: 1 (hovered) or 0 (not hovered).
Code sample
is_hovered = gh_imgui.implot_is_hovered()
implot_get_mouse_pos
Description
Gets mouse position
Syntax
x, y = gh_imgui.implot_get_mouse_pos()
Languages
Parameters
This function has no input parameter(s).
Return Values
- x, y [REAL]: mouse position.
Code sample
x, y = gh_imgui.implot_get_mouse_pos()
implot_push_colormap
Description
Pushes a color map. This color map is the new active color map. The color map is specified by an index. Call implot_pop_colormap() to restore previous color map.
Syntax
gh_imgui.implot_push_colormap(
colormap_index
)
Languages
Parameters
- colormap_index [INTEGER]: colormap index/identifier.
Return Values
This function has no return value(s).
Code sample
ImPlotColormap_Deep = 0
ImPlotColormap_Dark = 1
ImPlotColormap_Pastel = 2
ImPlotColormap_Paired = 3
ImPlotColormap_Viridis = 4
ImPlotColormap_Plasma = 5
ImPlotColormap_Hot = 6
ImPlotColormap_Cool = 7
ImPlotColormap_Pink = 8
ImPlotColormap_Jet = 9
ImPlotColormap_Twilight = 10
ImPlotColormap_RdBu = 11
ImPlotColormap_BrBG = 12
ImPlotColormap_PiYG = 13
ImPlotColormap_Spectral = 14
ImPlotColormap_Greys = 15
gh_imgui.implot_push_colormap(ImPlotColormap_Plasma)
...
gh_imgui.implot_pop_colormap(1)
implot_pop_colormap
Description
Pops (or restores) a color map.
Syntax
gh_imgui.implot_pop_colormap(
count
)
Languages
Parameters
- count [INTEGER]: undo multiple pushes at once by increasing count.
Return Values
This function has no return value(s).
Code sample
ImPlotColormap_Deep = 0
ImPlotColormap_Dark = 1
ImPlotColormap_Pastel = 2
ImPlotColormap_Paired = 3
ImPlotColormap_Viridis = 4
gh_imgui.implot_push_colormap(ImPlotColormap_Dark)
...
gh_imgui.implot_pop_colormap(1)
implot_plottext
Description
Draw a text on a plot at position x, y
Syntax
gh_imgui.implot_plottext(
text,
x, y,
vertical,
offset_x, offset_y
)
Languages
Parameters
- text [STRING]: text
- x, y [REAL]: text position
- vertical [INTEGER]: vertical (1) or horizontal (0) text
- offset_x, offset_y [REAL]: offset
Return Values
This function has no return value(s).
Code sample
gh_imgui.implot_plottext(text, x, y, vertical, offset_x, offset_y)
get_item_rect_min
Description
Gets the upper-left bounding rectangle of the last item.
Syntax
x, y = gh_imgui.get_item_rect_min()
Languages
Parameters
This function has no input parameter(s).
Return Values
- x, y [REAL]: 2D coordinates
Code sample
x, y = gh_imgui.get_item_rect_min()
get_item_rect_max
Description
Gets the lower-right bounding rectangle of the last item.
Syntax
x, y = gh_imgui.get_item_rect_max()
Languages
Parameters
This function has no input parameter(s).
Return Values
- x, y [REAL]: 2D coordinates
Code sample
x, y = gh_imgui.get_item_rect_max()
push_clip_rect
Description
Pushes (saves) a clipping rectangle for the current drawlist.
Syntax
gh_imgui.push_clip_rect(
x_min, y_min,
x_max, y_max
)
Languages
Parameters
- x_min, y_min [REAL]: 2D coordinates or the upper-left bounding rectangle
- x_max, y_max [REAL]: 2D coordinates or the lower-right bounding rectangle
Return Values
This function has no return value(s).
Code sample
x0, y0 = gh_imgui.get_item_rect_min()
x1, y1 = gh_imgui.get_item_rect_max()
gh_imgui.push_clip_rect(x0, y0, x1, y1)
pop_clip_rect
Description
Pops (restores) a clipping rectangle for the current drawlist.
Syntax
gh_imgui.pop_clip_rect()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.pop_clip_rect()
invisible_button
Description
Flexible button behavior without the visuals, frequently useful to build custom behaviors.
Syntax
gh_imgui.invisible_button(
label,
w, h,
flags
)
Languages
Parameters
- label [STRING]: label
- w, h [REAL]: size of the button
- flags [INTEGER]: options
Return Values
This function has no return value(s).
Code sample
ImGuiButtonFlags_None = 0
ImGuiButtonFlags_MouseButtonLeft = 1
ImGuiButtonFlags_MouseButtonRight = 2
ImGuiButtonFlags_MouseButtonMiddle = 4
gh_imgui.invisible_button("canvas", 320, 180, ImGuiButtonFlags_None)
fx_drawlist_coding_party_demo
Description
Implementation of some effects of the ImDrawList online coding party.
Syntax
gh_imgui.fx_drawlist_coding_party_demo(
fx_name,
title,
window_flags,
width, height,
size_flags,
x, y,
position_flags
)
Languages
Parameters
- fx_name [STRING]: name of the demo or effect
- title [STRING]: window title
- window_flags [INTEGER]: window flags
- width, height [INTEGER]: window size
- size_flags [INTEGER]: size flags
- x, y [INTEGER]: window position
- position_flags [INTEGER]: position flags
Return Values
This function has no return value(s).
Code sample
Current demos:
"ocornut_squares"
"ocornut_waves"
"kudaba_thunder_storm"
"crowbarous_blobs"
"badlydrawnrod_racetrack"
"floooh_googly_eyes"
"bdero_particles"
pos_size_flag_always = 1
pos_size_flag_once = 2
pos_size_flag_first_use_ever = 4
pos_size_flag_appearing = 8
pos_size_flag = pos_size_flag_always
window_default = 0
window_no_resize = 2
window_no_move = 4
window_no_collapse = 32
window_show_border = 128
window_no_save_settings = 256
window_flags = window_default
gh_imgui.fx_drawlist_coding_party_demo("ocornut_squares", "squares", window_flags, 320, 180, pos_size_flag, 20, 20, pos_size_flag_once)
file_browser_init
Description
Initializes the file browser. MUST be called before any other file_browser_xxxx() functions.
Syntax
gh_imgui.file_browser_init(
flags
)
Languages
Parameters
- flags [INTEGER]: options. See ImGuiFileBrowserFlags_xxxx values in imgui.lua
Return Values
This function has no return value(s).
Code sample
gh_imgui.file_browser_init(0)
file_browser_set_title
Description
Sets the file browser title.
Syntax
gh_imgui.file_browser_set_title(
text
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.file_browser_set_title(title)
file_browser_set_current_directory
Description
Sets the current directory before displaying the file browser.
Syntax
gh_imgui.file_browser_set_current_directory(
dir
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.file_browser_set_current_directory(demo_dir)
file_browser_clear_type_filters
Description
Clears all type filters. In that case the file browser will display all types of files.
Syntax
gh_imgui.file_browser_clear_type_filters()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.file_browser_clear_type_filters()
file_browser_add_type_filter
Description
Adds a type filter.
Syntax
gh_imgui.file_browser_add_type_filter(
type
)
Languages
Parameters
- type [STRING]: type filter
Return Values
This function has no return value(s).
Code sample
gh_imgui.file_browser_add_type_filter(".lua")
gh_imgui.file_browser_add_type_filter(".xml")
gh_imgui.file_browser_add_type_filter(".txt")
file_browser_open
Description
Opens the file browser: the file browser can be displayed with file_browser_display().
Syntax
gh_imgui.file_browser_open()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.file_browser_open()
file_browser_close
Description
Closes the file browser: the file browser is no longer displayed with file_browser_display().
Syntax
gh_imgui.file_browser_close()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.file_browser_close()
file_browser_display
Description
Displays the file browser. To really shows it, you must open the file browser with file_browser_open().
Syntax
gh_imgui.file_browser_display(
width, height
)
Languages
Parameters
- width, height [INTEGER]: size of the file browser window
Return Values
This function has no return value(s).
Code sample
gh_imgui.file_browser_display(600, 400)
file_browser_has_selected
Description
Checks if a file has been selected.
Syntax
ret = gh_imgui.file_browser_has_selected()
Languages
Parameters
This function has no input parameter(s).
Return Values
- ret [INTEGER]: 1 (selected) or 0 (not selected)
Code sample
if (gh_imgui.file_browser_has_selected() == 1) then
DoSomething()
end
file_browser_get_selected
Description
Gets the selected filename.
Syntax
filename = gh_imgui.file_browser_get_selected()
Languages
Parameters
This function has no input parameter(s).
Return Values
- filename [STRING]: the selected filename
Code sample
if (gh_imgui.file_browser_has_selected() == 1) then
filename = gh_imgui.file_browser_get_selected()
end
memory_editor_create
Description
Creates a memory editor instance.
Syntax
meid = gh_imgui.memory_editor_create(
size
)
Languages
Parameters
- size [INTEGER]: size of the window
Return Values
- meid [ID]: memory editor identifier
Code sample
meid = gh_imgui.memory_editor_create(1024)
memory_editor_kill
Description
Destroys a memory editor instance.
Syntax
gh_imgui.memory_editor_kill(
meid
)
Languages
Parameters
- meid [ID]: memory editor identifier
Return Values
This function has no return value(s).
Code sample
gh_imgui.memory_editor_kill(meid)
memory_editor_resize
Description
Resizes a memory editor instance.
Syntax
gh_imgui.memory_editor_resize(
meid,
size
)
Languages
Parameters
- meid [ID]: memory editor identifier
- size [INTEGER]: size of the window
Return Values
This function has no return value(s).
Code sample
gh_imgui.memory_editor_resize(meid, 512)
memory_editor_draw_window
Description
Draws the window of a memory editor.
Syntax
gh_imgui.memory_editor_draw_window(
meid,
title
)
Languages
Parameters
- meid [ID]: memory editor identifier
- title [STRING]: title of the window
Return Values
This function has no return value(s).
Code sample
gh_imgui.memory_editor_draw_window(meid, title)
memory_editor_draw_window
Description
Draws the content of a memory editor.
Syntax
gh_imgui.memory_editor_draw_window(
meid
)
Languages
Parameters
- meid [ID]: memory editor identifier
Return Values
This function has no return value(s).
Code sample
gh_imgui.memory_editor_draw_contents(meid)
memory_editor_set_value_1u8
Description
Writes a byte.
Syntax
gh_imgui.memory_editor_set_value_1u8(
meid,
index,
x
)
Languages
Parameters
- meid [ID]: memory editor identifier
- index [INTEGER]: index of the value
- x [INTEGER]: value
Return Values
This function has no return value(s).
Code sample
gh_imgui.memory_editor_set_value_1u8(meid, 0, 128)
memory_editor_set_data_from_texture
Description
Fills the content with the data from a texture.
Syntax
gh_imgui.memory_editor_set_data_from_texture(
meid,
tid
)
Languages
Parameters
- meid [ID]: memory editor identifier
- tid [ID]: texture identifier
Return Values
This function has no return value(s).
Code sample
gh_imgui.memory_editor_set_data_from_texture(meid, tid)
memory_editor_read_data_from_file
Description
Fills the content with the data from a file.
Syntax
gh_imgui.memory_editor_read_data_from_file(
meid,
filename
)
Languages
Parameters
- meid [ID]: memory editor identifier
- filename [STRING]: absolute path to the file
Return Values
This function has no return value(s).
Code sample
gh_imgui.memory_editor_read_data_from_file(meid, filename)
memory_editor_write_data_to_file
Description
Writes the content to a file.
Syntax
gh_imgui.memory_editor_write_data_to_file(
meid,
filename
)
Languages
Parameters
- meid [ID]: memory editor identifier
- filename [STRING]: absolute path to the file
Return Values
This function has no return value(s).
Code sample
gh_imgui.memory_editor_write_data_to_file(meid, filename)
memory_editor_read_data_from_buffer
Description
Reads data from a memory buffer.
Syntax
gh_imgui.memory_editor_read_data_from_buffer(
meid,
buffer,
buffer_size
)
Languages
Parameters
- meid [ID]: memory editor identifier
- buffer [POINTER]: memory buffer. See memory buffer function of gh_utils.
- buffer_size [INTEGER]: size in bytes of memory buffer.
Return Values
This function has no return value(s).
Code sample
gh_imgui.memory_editor_read_data_from_buffer(meid, buffer, buffer_size)
memory_editor_write_data_to_buffer
Description
Writes data to a memory buffer.
Syntax
gh_imgui.memory_editor_write_data_to_buffer(
meid,
buffer,
buffer_size
)
Languages
Parameters
- meid [ID]: memory editor identifier
- buffer [POINTER]: memory buffer. See memory buffer function of gh_utils.
- buffer_size [INTEGER]: size in bytes of memory buffer.
Return Values
This function has no return value(s).
Code sample
gh_imgui.memory_editor_write_data_to_buffer(meid, buffer, buffer_size)
set_next_window_size
Description
Sets the size of the next window.
Syntax
gh_imgui.set_next_window_size(
width, height
)
Languages
Parameters
- width, height [INTEGER]: size of the window
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_next_window_size(width, height)
set_window_size
Description
Sets the size of a window.
Syntax
gh_imgui.set_window_size(
name,
width, height
)
Languages
Parameters
- name [STRING]: window name
- width, height [INTEGER]: size of the window
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_window_size("Control Panel", width, height)
set_next_window_size_constraints
Description
Sets the size limits of the next window.
Syntax
gh_imgui.set_next_window_size_constraints(
min_x, min_y,
max_x, max_y
)
Languages
Parameters
- min_x, min_y [INTEGER]: bottom left corner
- max_x, max_y [INTEGER]: top right corner
Return Values
This function has no return value(s).
Code sample
gh_imgui.set_next_window_size_constraints(min_x, min_y, max_x, max_y)
table_begin
Description
Begins a table.
Syntax
ret = gh_imgui.table_begin(
label,
num_columns,
flags,
outer_size_x, outer_size_y,
inner_width
)
Languages
Parameters
- label [STRING]: label
- num_columns [INTEGER]: number of columns
- flags [INTEGER]: options. See all ImGuiTableFlags_xxxx constants in imgui.lua
- outer_size_x, outer_size_y [REAL]: outer size
- inner_width [REAL]: inner width
Return Values
- ret [INTEGER]: 1 if success or 0 if error
Code sample
flags = ImGuiTableFlags_Resizable + ImGuiTableFlags_Borders
num_columns = 2
if (gh_imgui.table_begin("Table1", num_columns, flags, 0,0, 0) == 1) then
...
...
gh_imgui.table_end()
end
table_end
Description
Ends a table. Must be called only if table_begin() returns 1.
Syntax
gh_imgui.table_end()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
flags = ImGuiTableFlags_Resizable + ImGuiTableFlags_Borders
num_columns = 2
if (gh_imgui.table_begin("Table1", num_columns, flags, 0,0, 0) == 1) then
...
...
gh_imgui.table_end()
end
table_set_column_enabled
Description
Description not available.
Syntax
gh_imgui.table_set_column_enabled(
column_n,
state
)
Languages
Parameters
- column_n [INTEGER]:
- state [BOOLEAN]: 0 or 1
Return Values
This function has no return value(s).
Code sample
gh_imgui.table_set_column_enabled(column_n, state)
table_next_row
Description
Appends into the first cell of a new row.
Syntax
gh_imgui.table_next_row(
row_flags,
min_row_height
)
Languages
Parameters
- row_flags [INTEGER]: See ImGuiTableRowFlags_xxxx in imgui.lua
- min_row_height [INTEGER]:
Return Values
This function has no return value(s).
Code sample
gh_imgui.table_next_row(row_flags, min_row_height)
table_next_row
Description
Appends into the first cell of a new row.
Syntax
gh_imgui.table_next_row(
row_flags,
min_row_height
)
Languages
Parameters
- row_flags [INTEGER]: See ImGuiTableRowFlags_xxxx in imgui.lua
- min_row_height [INTEGER]:
Return Values
This function has no return value(s).
Code sample
gh_imgui.table_next_row(row_flags, min_row_height)
table_next_column
Description
Appends into the next column (or first column of next row if currently in last column). Returns true when column is visible.
Syntax
ret = gh_imgui.table_next_column()
Languages
Parameters
This function has no input parameter(s).
Return Values
- ret [INTEGER]: 1 if visible or 0 if not
Code sample
ret = gh_imgui.table_next_column()
table_set_column_index
Description
Appends into the specified column. Returns true when column is visible.
Syntax
ret = gh_imgui.table_set_column_index(
column_n
)
Languages
Parameters
- column_n [INTEGER]: column index
Return Values
- ret [INTEGER]: 1 if success or 0 if error
Code sample
ret = gh_imgui.table_set_column_index(column_n)
table_setup_column
Description
Allows to to specify label, resizing policy, default width/weight, id, various other flags etc.
Syntax
gh_imgui.table_setup_column(
label,
flags,
init_width_or_weight,
user_id
)
Languages
Parameters
- label [STRING]:
- flags [INTEGER]:
- init_width_or_weight [REAL]:
- user_id [INTEGER]:
Return Values
This function has no return value(s).
Code sample
gh_imgui.table_setup_column(label, flags, init_width_or_weight, user_id)
table_setup_scroll_freeze
Description
Locks columns/rows so they stay visible when scrolled.
Syntax
gh_imgui.table_setup_scroll_freeze(
cols,
rows
)
Languages
Parameters
- cols [INTEGER]:
- rows [INTEGER]:
Return Values
This function has no return value(s).
Code sample
gh_imgui.table_setup_scroll_freeze(cols, rows)
table_headers_row
Description
Submits all headers cells based on data provided to table_setup_column() + submit context menu.
Syntax
gh_imgui.table_headers_row()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.table_headers_row()
table_header
Description
Submits one header cell manually (rarely used).
Syntax
gh_imgui.table_header(
label
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.table_header(label)
table_get_column_count
Description
Returns the number of columns (value passed to BeginTable).
Syntax
count = gh_imgui.table_get_column_count()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
count = gh_imgui.table_get_column_count()
table_get_column_index
Description
Returns the current column index.
Syntax
index = gh_imgui.table_get_column_index()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
index = gh_imgui.table_get_column_index()
table_get_row_index
Description
Returns the current row index.
Syntax
index = gh_imgui.table_get_row_index()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
index = gh_imgui.table_get_row_index()
table_get_column_name
Description
Returns empty string if column didn't have a name declared by table_setup_column(). Pass -1 to use current column.
Syntax
name = gh_imgui.table_get_column_name(
column_n
)
Languages
Parameters
- column_n [INTEGER]: column index
Return Values
Code sample
name = gh_imgui.table_get_column_name(column_n)
table_get_column_flags
Description
Returns column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column.
Syntax
flags = gh_imgui.table_get_column_flags(
column_n
)
Languages
Parameters
- column_n [INTEGER]: column index
Return Values
- flags [INTEGER]: See the ImGuiTableColumnFlags_xxxxx constants in imgui.lua
Code sample
flags = gh_imgui.table_get_column_flags(column_n)
table_set_bg_color
Description
Changes the color of a cell, row, or column. See ImGuiTableBgTarget_ flags in imgui.lua for details.
Syntax
gh_imgui.table_set_bg_color(
target,
r, g, b, a,
column_n
)
Languages
Parameters
- target [INTEGER]:
- r, g, b, a [REAL]: RGBA color
- column_n [INTEGER]: column index
Return Values
This function has no return value(s).
Code sample
gh_imgui.table_set_bg_color(target, r, g, b, a, column_n)
begin_disabled
Description
Disables all user interactions and darkens items visuals. end_disabled() must be called to end the disabled section.
Syntax
gh_imgui.begin_disabled(
disabled
)
Languages
Parameters
- disabled [INTEGER]: 0 or 1
Return Values
This function has no return value(s).
Code sample
gh_imgui.begin_disabled(1)
end_disabled
Description
Ends a disabled section.
Syntax
gh_imgui.end_disabled()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.end_disabled()
get_mouse_pos
Description
Gets the mouse position.
Syntax
x, y = gh_imgui.get_mouse_pos()
Languages
Parameters
This function has no input parameter(s).
Return Values
- x, y [REAL]: mouse position
Code sample
x, y = gh_imgui.get_mouse_pos()
get_mouse_pos_on_opening_current_popup
Description
Gets the mouse position when the user is opening a popup / context menu (mouse right click).
Syntax
x, y = gh_imgui.get_mouse_pos_on_opening_current_popup()
Languages
Parameters
This function has no input parameter(s).
Return Values
- x, y [REAL]: mouse position
Code sample
x, y = gh_imgui.get_mouse_pos_on_opening_current_popup()
imnodes_begin_node_editor
Description
ImNodes - top-level function call - Calling this function will result the node editor grid workspace being rendered.
Syntax
gh_imgui.imnodes_begin_node_editor()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_begin_node_editor()
imnodes_end_node_editor
Description
Ends the node editor rendering.
Syntax
gh_imgui.imnodes_end_node_editor()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_end_node_editor()
imnodes_begin_node
Description
Description not available.
Syntax
gh_imgui.imnodes_begin_node(
node_id
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_begin_node(node_id)
imnodes_end_node
Description
Description not available.
Syntax
gh_imgui.imnodes_end_node()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_end_node()
imnodes_begin_output_attribute
Description
Description not available.
Syntax
gh_imgui.imnodes_begin_output_attribute(
output_attr_id,
pin_shape
)
Languages
Parameters
- output_attr_id [INTEGER]:
- pin_shape [INTEGER]:
Return Values
This function has no return value(s).
Code sample
ImNodesPinShape_Circle = 0
ImNodesPinShape_CircleFilled = 1
ImNodesPinShape_Triangle = 2
ImNodesPinShape_TriangleFilled = 3
ImNodesPinShape_Quad = 4
ImNodesPinShape_QuadFilled = 5
pin_shape = ImNodesPinShape_CircleFilled
gh_imgui.imnodes_begin_output_attribute(output_attr_id, pin_shape)
imnodes_end_output_attribute
Description
Description not available.
Syntax
gh_imgui.imnodes_end_output_attribute()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_end_output_attribute()
imnodes_begin_input_attribute
Description
Description not available.
Syntax
gh_imgui.imnodes_begin_input_attribute(
input_attr_id,
pin_shape
)
Languages
Parameters
- input_attr_id [INTEGER]:
- pin_shape [INTEGER]:
Return Values
This function has no return value(s).
Code sample
ImNodesPinShape_Circle = 0
ImNodesPinShape_CircleFilled = 1
ImNodesPinShape_Triangle = 2
ImNodesPinShape_TriangleFilled = 3
ImNodesPinShape_Quad = 4
ImNodesPinShape_QuadFilled = 5
pin_shape = ImNodesPinShape_CircleFilled
gh_imgui.imnodes_begin_input_attribute(input_attr_id, pin_shape)
imnodes_end_output_attribute
Description
Description not available.
Syntax
gh_imgui.imnodes_end_output_attribute()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_end_output_attribute()
imnodes_begin_node_title_bar
Description
Description not available.
Syntax
gh_imgui.imnodes_begin_node_title_bar()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_begin_node_title_bar()
imnodes_end_node_title_bar
Description
Description not available.
Syntax
gh_imgui.imnodes_end_node_title_bar()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_end_node_title_bar()
imnodes_link
Description
Description not available.
Syntax
gh_imgui.imnodes_link(
link_id,
start_attribute_id,
end_attribute_id
)
Languages
Parameters
- link_id [INTEGER]:
- start_attribute_id [INTEGER]:
- end_attribute_id [INTEGER]:
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_link(link_id, start_attribute_id, end_attribute_id)
imnodes_set_node_screen_space_pos
Description
Description not available.
Syntax
gh_imgui.imnodes_set_node_screen_space_pos(
node_id,
x, y
)
Languages
Parameters
- node_id [INTEGER]:
- x, y [REAL]:
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_set_node_screen_space_pos(node_id, x, y)
imnodes_set_node_editor_space_pos
Description
Description not available.
Syntax
gh_imgui.imnodes_set_node_editor_space_pos(
node_id,
x, y
)
Languages
Parameters
- node_id [INTEGER]:
- x, y [REAL]:
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_set_node_editor_space_pos(node_id, x, y)
imnodes_set_node_grid_space_pos
Description
Description not available.
Syntax
gh_imgui.imnodes_set_node_grid_space_pos(
node_id,
x, y
)
Languages
Parameters
- node_id [INTEGER]:
- x, y [REAL]:
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_set_node_grid_space_pos(node_id, x, y)
imnodes_get_node_screen_space_pos
Description
Description not available.
Syntax
x, y = gh_imgui.imnodes_get_node_screen_space_pos(
node_id
)
Languages
Parameters
Return Values
Code sample
x, y = gh_imgui.imnodes_get_node_screen_space_pos(node_id)
imnodes_get_node_editor_space_pos
Description
Description not available.
Syntax
x, y = gh_imgui.imnodes_get_node_editor_space_pos(
node_id
)
Languages
Parameters
Return Values
Code sample
x, y = gh_imgui.imnodes_get_node_editor_space_pos(node_id)
imnodes_get_node_grid_space_pos
Description
Description not available.
Syntax
x, y = gh_imgui.imnodes_get_node_grid_space_pos(
node_id
)
Languages
Parameters
Return Values
Code sample
x, y = gh_imgui.imnodes_get_node_grid_space_pos(node_id)
imnodes_set_node_draggable
Description
Description not available.
Syntax
gh_imgui.imnodes_set_node_draggable(
node_id,
state
)
Languages
Parameters
- node_id [INTEGER]:
- state [BOOLEAN]: 1 or 0
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_set_node_draggable(state)
imnodes_is_editor_hovered
Description
Description not available.
Syntax
state = gh_imgui.imnodes_is_editor_hovered()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
state = gh_imgui.imnodes_is_editor_hovered()
imnodes_is_node_hovered
Description
Description not available.
Syntax
state, node_id = gh_imgui.imnodes_is_node_hovered()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]: 1 or 0
- node_id [INTEGER]:
Code sample
state, node_id = gh_imgui.imnodes_is_node_hovered()
imnodes_is_link_hovered
Description
Description not available.
Syntax
state, link_id = gh_imgui.imnodes_is_link_hovered()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]: 1 or 0
- link_id [INTEGER]:
Code sample
state, link_id = gh_imgui.imnodes_is_link_hovered()
imnodes_is_pin_hovered
Description
Description not available.
Syntax
state, pin_id = gh_imgui.imnodes_is_pin_hovered()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]: 1 or 0
- pin_id [INTEGER]:
Code sample
state, pin_id = gh_imgui.imnodes_is_pin_hovered()
imnodes_num_selected_nodes
Description
Description not available.
Syntax
n = gh_imgui.imnodes_num_selected_nodes()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
n = gh_imgui.imnodes_num_selected_nodes()
imnodes_read_selected_nodes
Description
Description not available.
Syntax
gh_imgui.imnodes_read_selected_nodes()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_read_selected_nodes()
imnodes_get_selected_node
Description
Description not available.
Syntax
node_id = gh_imgui.imnodes_get_selected_node(
index
)
Languages
Parameters
Return Values
Code sample
node_id = gh_imgui.imnodes_get_selected_node(index)
imnodes_num_selected_links
Description
Description not available.
Syntax
n = gh_imgui.imnodes_num_selected_links()
Languages
Parameters
This function has no input parameter(s).
Return Values
Code sample
n = gh_imgui.imnodes_num_selected_links()
imnodes_read_selected_links
Description
Description not available.
Syntax
gh_imgui.imnodes_read_selected_links()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_read_selected_links()
imnodes_get_selected_link
Description
Description not available.
Syntax
link_id = gh_imgui.imnodes_get_selected_link(
index
)
Languages
Parameters
Return Values
Code sample
link_id = gh_imgui.imnodes_get_selected_link(index)
imnodes_clear_nodes_selection
Description
Description not available.
Syntax
gh_imgui.imnodes_clear_nodes_selection()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_clear_nodes_selection()
imnodes_clear_links_selection
Description
Description not available.
Syntax
gh_imgui.imnodes_clear_links_selection()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_clear_links_selection()
imnodes_is_link_started
Description
Description not available.
Syntax
state, started_at_attribute_id = gh_imgui.imnodes_is_link_started()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]:
- started_at_attribute_id [INTEGER]:
Code sample
state, started_at_attribute_id = gh_imgui.imnodes_is_link_started()
imnodes_is_link_dropped
Description
Description not available.
Syntax
state, started_at_attribute_id = gh_imgui.imnodes_is_link_dropped(
including_detached_links
)
Languages
Parameters
- including_detached_links [INTEGER]:
Return Values
- state [BOOLEAN]:
- started_at_attribute_id [INTEGER]:
Code sample
state, started_at_attribute_id = gh_imgui.imnodes_is_link_dropped(including_detached_links)
imnodes_is_link_created
Description
Description not available.
Syntax
state, started_at_attribute_id, ended_at_attribute_id = gh_imgui.imnodes_is_link_created()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]:
- started_at_attribute_id [INTEGER]:
- ended_at_attribute_id [INTEGER]:
Code sample
state, started_at_attribute_id, ended_at_attribute_id = gh_imgui.imnodes_is_link_created()
imnodes_is_link_created_v2
Description
Description not available.
Syntax
state, started_at_node_id, started_at_attribute_id, ended_at_node_id, ended_at_attribute_id = gh_imgui.imnodes_is_link_created_v2()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]:
- started_at_node_id [INTEGER]:
- started_at_attribute_id [INTEGER]:
- ended_at_node_id [INTEGER]:
- ended_at_attribute_id [INTEGER]:
Code sample
state, started_at_node_id, started_at_attribute_id, ended_at_node_id, ended_at_attribute_id = gh_imgui.imnodes_is_link_created_v2()
imnodes_is_link_destroyed
Description
Description not available.
Syntax
state, link_id = gh_imgui.imnodes_is_link_destroyed()
Languages
Parameters
This function has no input parameter(s).
Return Values
- state [BOOLEAN]:
- link_id [INTEGER]:
Code sample
state, link_id = gh_imgui.imnodes_is_link_destroyed()
imnodes_push_color_style
Description
Description not available.
Syntax
r, g, b, a = gh_imgui.imnodes_push_color_style(
color_item
)
Languages
Parameters
Return Values
Code sample
ImNodesCol_NodeBackground = 0
ImNodesCol_NodeBackgroundHovered = 1
ImNodesCol_NodeBackgroundSelected = 2
ImNodesCol_NodeOutline = 3
ImNodesCol_TitleBar = 4
ImNodesCol_TitleBarHovered = 5
ImNodesCol_TitleBarSelected = 6
ImNodesCol_Link = 7
ImNodesCol_LinkHovered = 8
ImNodesCol_LinkSelected = 9
ImNodesCol_Pin = 10
ImNodesCol_PinHovered = 11
ImNodesCol_BoxSelector = 12
ImNodesCol_BoxSelectorOutline = 13
ImNodesCol_GridBackground = 14
ImNodesCol_GridLine = 15
ImNodesCol_MiniMapBackground = 16
ImNodesCol_MiniMapBackgroundHovered = 17
ImNodesCol_MiniMapOutline = 18
ImNodesCol_MiniMapOutlineHovered = 19
ImNodesCol_MiniMapNodeBackground = 20
ImNodesCol_MiniMapNodeBackgroundHovered = 21
ImNodesCol_MiniMapNodeBackgroundSelected = 22
ImNodesCol_MiniMapNodeOutline = 23
ImNodesCol_MiniMapLink = 24
ImNodesCol_MiniMapLinkSelected = 25
color_item = ImNodesCol_TitleBar
gh_imgui.imnodes_push_color_style(color_item, r, g, b, a)
imnodes_pop_color_style
Description
Description not available.
Syntax
gh_imgui.imnodes_pop_color_style()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_pop_color_style()
imnodes_push_style_var
Description
Description not available.
Syntax
value = gh_imgui.imnodes_push_style_var(
style_item
)
Languages
Parameters
Return Values
Code sample
ImNodesStyleVar_GridSpacing = 0
ImNodesStyleVar_NodeCornerRounding = 1
ImNodesStyleVar_NodePaddingHorizontal = 2
ImNodesStyleVar_NodePaddingVertical = 3
ImNodesStyleVar_NodeBorderThickness = 4
ImNodesStyleVar_LinkThickness = 5
ImNodesStyleVar_LinkLineSegmentsPerLength = 6
ImNodesStyleVar_LinkHoverDistance = 7
ImNodesStyleVar_PinCircleRadius = 8
ImNodesStyleVar_PinQuadSideLength = 9
ImNodesStyleVar_PinTriangleSideLength = 10
ImNodesStyleVar_PinLineThickness = 11
ImNodesStyleVar_PinHoverRadius = 12
ImNodesStyleVar_PinOffset = 13
style_item = ImNodesStyleVar_GridSpacing
value = 24
gh_imgui.imnodes_push_style_var(style_item, value)
imnodes_pop_style_var
Description
Description not available.
Syntax
gh_imgui.imnodes_pop_style_var()
Languages
Parameters
This function has no input parameter(s).
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_pop_style_var()
imnodes_select_node
Description
Description not available.
Syntax
gh_imgui.imnodes_select_node(
node_id
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_select_node(node_id)
imnodes_clear_node_selection
Description
Description not available.
Syntax
gh_imgui.imnodes_clear_node_selection(
node_id
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_clear_node_selection(node_id)
imnodes_is_node_selected
Description
Description not available.
Syntax
state = gh_imgui.imnodes_is_node_selected(
node_id
)
Languages
Parameters
Return Values
Code sample
state = gh_imgui.imnodes_is_node_selected(node_id)
imnodes_select_link
Description
Description not available.
Syntax
gh_imgui.imnodes_select_link(
link_id
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_select_link(link_id)
imnodes_clear_link_selection
Description
Description not available.
Syntax
gh_imgui.imnodes_clear_link_selection(
link_id
)
Languages
Parameters
Return Values
This function has no return value(s).
Code sample
gh_imgui.imnodes_clear_link_selection(link_id)
imnodes_is_link_selected
Description
Description not available.
Syntax
state = gh_imgui.imnodes_is_link_selected(
link_id
)
Languages
Parameters
Return Values
Code sample
state = gh_imgui.imnodes_is_link_selected(link_id)
imnodes_minimap
Description
Description not available.
Syntax
gh_imgui.imnodes_minimap(
minimap_size_fraction,
minimap_location
)
Languages
Parameters
- minimap_size_fraction [REAL]:
- minimap_location [INTEGER]:
Return Values
This function has no return value(s).
Code sample
ImNodesMiniMapLocation_BottomLeft = 0
ImNodesMiniMapLocation_BottomRight = 1
ImNodesMiniMapLocation_TopLeft = 2
ImNodesMiniMapLocation_TopRight = 3
minimap_size_fraction = 0.2
minimap_location = ImNodesMiniMapLocation_BottomLeft
gh_imgui.imnodes_minimap(minimap_size_fraction, minimap_location)
knob
Description
Displays a knob
Syntax
out_value, ret = gh_imgui.knob(
label,
in_value,
v_min, v_max,
speed,
format,
knob_type,
size,
flags,
steps
)
Languages
Parameters
- label [STRING]: label
- in_value [REAL]: initial value
- v_min, v_max [REAL]: min and max values
- speed [REAL]: animation speed
- format [STRING]: how the value is displayed.
- knob_type [INTEGER]: type of the knob: tick, dot, wiper, ...
- size [REAL]: size in pixels of the knob
- flags [INTEGER]: flags
- steps [INTEGER]: number of steps from start to end
Return Values
- out_value [REAL]: value of the knob between v_min and _vmax
- ret [INTEGER]: return code: 1 if OK, 0 if error
Code sample
ImGuiKnobVariant_Tick = 1
ImGuiKnobVariant_Dot = 2
ImGuiKnobVariant_Wiper = 4
ImGuiKnobVariant_WiperOnly = 8
ImGuiKnobVariant_WiperDot = 16
ImGuiKnobVariant_Stepped = 32
ImGuiKnobVariant_Space = 64
ImGuiKnobFlags_NoTitle = 1
ImGuiKnobFlags_NoInput = 2
ImGuiKnobFlags_ValueTooltip = 4
ImGuiKnobFlags_DragHorizontal = 8
-- this is special flag fopr GeeXLab only.
ImGuiKnobFlags_ReadOnlyInput = 16
-- this is special flag fopr GeeXLab only.
ImGuiKnobFlags_DisableMouse = 32
value, ret = gh_imgui.knob(label, init_value, v_min, v_max, speed, format, type, size, flags, steps)
toggle
Description
Displays a knob
Syntax
out_value = gh_imgui.toggle(
label,
in_value,
size_x, size_y,
flags,
animation_duration,
frame_rounding,
knob_rounding
)
Languages
Parameters
- label [STRING]: label
- in_value [BOOLEAN]: initial value
- size_x, size_y [REAL]: size in pixels of the toggle
- flags [INTEGER]: flags
- animation_duration [REAL]: animation duration
- frame_rounding [REAL]: frame rounding - from 0.0 to 1.0
- knob_rounding [REAL]: knob rounding - from 0.0 to 1.0
Return Values
- out_value [REAL]: value of the toggle: 0 or 1
Code sample
ImGuiToggleFlags_None = 0
ImGuiToggleFlags_Animated = 1
ImGuiToggleFlags_BorderedFrame = 8
ImGuiToggleFlags_BorderedKnob = 16
ImGuiToggleFlags_ShadowedFrame = 32
ImGuiToggleFlags_ShadowedKnob = 64
ImGuiToggleFlags_A11y = 256
size_x = 40
size_y = 20
flags = ImGuiToggleFlags_Animated
animation_duration = 0.1
frame_rounding = 1.0
knob_rounding = 1.0
label = "Horizontal drag"
out_value = gh_imgui.toggle(label, in_value, size_x, size_y, flags, animation_duration, frame_rounding, knob_rounding)
| |