module ImGui
Included Modules
Defined in:
custom.crimgui.cr:1
imgui.cr:30
imgui.cr:100
obj.cr
types.cr
Constant Summary
-
PAYLOAD_TYPE_COLOR_3F =
"_COL3F"
-
PAYLOAD_TYPE_COLOR_4F =
"_COL4F"
-
VERSION =
"1.90.6"
-
VERSION_NUM =
19060
Class Method Summary
-
.accept_drag_drop_payload(type : String, flags : ImGuiDragDropFlags = ImGuiDragDropFlags.new(0)) : ImGuiPayload | Nil
accept contents of a given type.
-
.align_text_to_frame_padding : Void
vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item)
-
.arrow_button(str_id : String, dir : ImGuiDir) : Bool
square button with an arrow shape
- .begin(name : String, p_open : Pointer(Bool) = Pointer(Bool).null, flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0)) : Bool
- .begin_child(str_id : String, size : ImVec2 = ImVec2.new(0, 0), child_flags : ImGuiChildFlags = ImGuiChildFlags.new(0), window_flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0)) : Bool
- .begin_child(id : ImGuiID, size : ImVec2 = ImVec2.new(0, 0), child_flags : ImGuiChildFlags = ImGuiChildFlags.new(0), window_flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0)) : Bool
- .begin_combo(label : String, preview_value : String, flags : ImGuiComboFlags = ImGuiComboFlags.new(0)) : Bool
- .begin_disabled(disabled : Bool = true) : Void
-
.begin_drag_drop_source(flags : ImGuiDragDropFlags = ImGuiDragDropFlags.new(0)) : Bool
call after submitting an item which may be dragged.
-
.begin_drag_drop_target : Bool
call after submitting an item that may receive a payload.
-
.begin_group : Void
lock horizontal starting position
-
.begin_item_tooltip : Bool
begin/append a tooltip window if preceding item was hovered.
-
.begin_list_box(label : String, size : ImVec2 = ImVec2.new(0, 0)) : Bool
open a framed scrolling region
-
.begin_main_menu_bar : Bool
create and append to a full screen menu-bar.
-
.begin_menu(label : String, enabled : Bool = true) : Bool
create a sub-menu entry.
-
.begin_menu_bar : Bool
append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window).
-
.begin_popup(str_id : String, flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0)) : Bool
return true if the popup is open, and you can start outputting to it.
-
.begin_popup_context_item(str_id : String | Nil = nil, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(1)) : Bool
open+begin popup when clicked on last item.
-
.begin_popup_context_void(str_id : String | Nil = nil, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(1)) : Bool
open+begin popup when clicked in void (where there are no windows).
-
.begin_popup_context_window(str_id : String | Nil = nil, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(1)) : Bool
open+begin popup when clicked on current window.
-
.begin_popup_modal(name : String, p_open : Pointer(Bool) = Pointer(Bool).null, flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0)) : Bool
return true if the modal is open, and you can start outputting to it.
-
.begin_tab_bar(str_id : String, flags : ImGuiTabBarFlags = ImGuiTabBarFlags.new(0)) : Bool
create and append into a TabBar
-
.begin_tab_item(label : String, p_open : Pointer(Bool) = Pointer(Bool).null, flags : ImGuiTabItemFlags = ImGuiTabItemFlags.new(0)) : Bool
create a Tab.
- .begin_table(str_id : String, column : Int32, flags : ImGuiTableFlags = ImGuiTableFlags.new(0), outer_size : ImVec2 = ImVec2.new(0.0, 0.0), inner_width : Float32 = 0.0) : Bool
-
.begin_tooltip : Bool
begin/append a tooltip window.
-
.bullet : Void
draw a small circle + keep the cursor on the same line.
-
.bullet_text(fmt : String, *args) : Void
shortcut for Bullet()+Text()
-
.button(label : String, size : ImVec2 = ImVec2.new(0, 0)) : Bool
button
-
.calc_item_width : Float32
width of item given pushed settings and current cursor position.
- .calc_text_size(text : Bytes | String, hide_text_after_double_hash : Bool = false, wrap_width : Float32 = -1.0) : ImGui::ImVec2
- .checkbox(label : String, v : Pointer(Bool)) : Bool
- .checkbox_flags(label : String, flags : Pointer(Int32), flags_value : Int32) : Bool
- .checkbox_flags(label : String, flags : Pointer(UInt32), flags_value : UInt32) : Bool
- .checkbox_flags(label : String, flags : Pointer(T), flags_value : T) : Bool forall T
-
.child(str_id : String, size : ImVec2 = ImVec2.new(0, 0), child_flags : ImGuiChildFlags = ImGuiChildFlags.new(0), window_flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0), &) : Nil
Calls
.begin_child
, conditionally yields to the block, then calls.end_child
. -
.child(id : ImGuiID, size : ImVec2 = ImVec2.new(0, 0), child_flags : ImGuiChildFlags = ImGuiChildFlags.new(0), window_flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0), &) : Nil
Calls
.begin_child
, conditionally yields to the block, then calls.end_child
. -
.close_current_popup : Void
manually close the popup we have begin-ed into.
- .col32(r : Int, g : Int, b : Int, a : Int = 255) : UInt32
- .col32(color : ImVec4) : UInt32
-
.collapsing_header(label : String, flags : ImGuiTreeNodeFlags = ImGuiTreeNodeFlags.new(0)) : Bool
if returning 'true' the header is open.
-
.collapsing_header(label : String, p_visible : Pointer(Bool), flags : ImGuiTreeNodeFlags = ImGuiTreeNodeFlags.new(0)) : Bool
when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right of the header which will set the bool to false when clicked, if '*p_visible==false' don't display the header.
- .color(r : Int, g : Int, b : Int, a : Int = 255) : ImVec4
- .color(col32 : UInt32) : ImVec4
-
.color_button(desc_id : String, col : ImVec4, flags : ImGuiColorEditFlags = ImGuiColorEditFlags.new(0), size : ImVec2 = ImVec2.new(0, 0)) : Bool
display a color square/button, hover for details, return true when pressed.
- .color_convert_float4_to_u32(in_ : ImVec4) : UInt32
- .color_convert_hsv_to_rgb(h : Float32, s : Float32, v : Float32) : Tuple(LibC::Float, LibC::Float, LibC::Float)
- .color_convert_rgb_to_hsv(r : Float32, g : Float32, b : Float32) : Tuple(LibC::Float, LibC::Float, LibC::Float)
- .color_convert_u32_to_float4(in_ : UInt32) : ImGui::ImVec4
- .color_edit3(label : String, col : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), flags : ImGuiColorEditFlags = ImGuiColorEditFlags.new(0)) : Bool
- .color_edit4(label : String, col : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), flags : ImGuiColorEditFlags = ImGuiColorEditFlags.new(0)) : Bool
- .color_picker3(label : String, col : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), flags : ImGuiColorEditFlags = ImGuiColorEditFlags.new(0)) : Bool
- .color_picker4(label : String, col : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), flags : ImGuiColorEditFlags = ImGuiColorEditFlags.new(0), ref_col : Pointer(Float32) = Pointer(Float32).null) : Bool
- .columns(count : Int32 = 1, id : String | Nil = nil, border : Bool = true) : Void
-
.combo(label : String, preview_value : String, flags : ImGuiComboFlags = ImGuiComboFlags.new(0), &) : Nil
Calls
.begin_combo
, conditionally yields to the block, then conditionally calls.end_combo
. - .combo(label : String, current_item : Pointer(Int32) | Pointer, getter : Pointer(Void), Int32 -> String, user_data : Pointer(Void), items_count : Int32, popup_max_height_in_items : Int32 = -1) : Bool
- .combo(label : String, current_item : Pointer(Int32) | Pointer, items : Indexable(Pointer(LibC::Char)), popup_max_height_in_items : Int32 = -1) : Bool
-
.combo(label : String, current_item : Pointer(Int32) | Pointer, items_separated_by_zeros : String, popup_max_height_in_items : Int32 = -1) : Bool
Separate items with \0 within a string, end item-list with \0\0.
- .combo(label : String, current_item : Pointer(Int32) | Pointer, items_count : Int32, popup_max_height_in_items : Int32 = -1, &block : Int32 -> Slice(UInt8) | String | Nil) : Bool
- .combo(label : String, current_item : Pointer(Int32) | Pointer, items : Indexable(String), popup_max_height_in_items : Int32 = -1)
- .create_context(shared_font_atlas : ImFontAtlas | Nil = nil) : ImGuiContext
-
.debug_check_version_and_data_layout(version_str : String, sz_io : LibC::SizeT, sz_style : LibC::SizeT, sz_vec2 : LibC::SizeT, sz_vec4 : LibC::SizeT, sz_drawvert : LibC::SizeT, sz_drawidx : LibC::SizeT) : Bool
This is called by IMGUI_CHECKVERSION() macro.
- .debug_flash_style_color(idx : ImGuiCol) : Void
- .debug_start_item_picker : Void
- .debug_text_encoding(text : String) : Void
-
.destroy_context(ctx : ImGuiContext | Nil = nil) : Void
NULL = destroy current context
-
.disabled(disabled : Bool = true, &) : Nil
Calls
.begin_disabled
, yields to the block, then calls.end_disabled
. -
.drag_drop_source(flags : ImGuiDragDropFlags = ImGuiDragDropFlags.new(0), &) : Nil
Calls
.begin_drag_drop_source
, conditionally yields to the block, then conditionally calls.end_drag_drop_source
. -
.drag_drop_target(&) : Nil
Calls
.begin_drag_drop_target
, conditionally yields to the block, then conditionally calls.end_drag_drop_target
. -
.drag_float(label : String, v : Pointer(Float32), v_speed : Float32 = 1.0, v_min : Float32 = 0.0, v_max : Float32 = 0.0, format : String = "%.3f", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
If v_min >= v_max we have no bound
- .drag_float2(label : String, v : Pointer(ImVec2) | Indexable(Float32) | Pointer(Float32), v_speed : Float32 = 1.0, v_min : Float32 = 0.0, v_max : Float32 = 0.0, format : String = "%.3f", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_float3(label : String, v : Indexable(Float32) | Pointer(Float32), v_speed : Float32 = 1.0, v_min : Float32 = 0.0, v_max : Float32 = 0.0, format : String = "%.3f", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_float4(label : String, v : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), v_speed : Float32 = 1.0, v_min : Float32 = 0.0, v_max : Float32 = 0.0, format : String = "%.3f", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_float_range2(label : String, v_current_min : Pointer(Float32), v_current_max : Pointer(Float32), v_speed : Float32 = 1.0, v_min : Float32 = 0.0, v_max : Float32 = 0.0, format : String = "%.3f", format_max : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
-
.drag_int(label : String, v : Pointer(Int32), v_speed : Float32 = 1.0, v_min : Int32 = 0, v_max : Int32 = 0, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
If v_min >= v_max we have no bound
- .drag_int2(label : String, v : Indexable(Int32) | Pointer(Int32), v_speed : Float32 = 1.0, v_min : Int32 = 0, v_max : Int32 = 0, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_int3(label : String, v : Indexable(Int32) | Pointer(Int32), v_speed : Float32 = 1.0, v_min : Int32 = 0, v_max : Int32 = 0, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_int4(label : String, v : Indexable(Int32) | Pointer(Int32), v_speed : Float32 = 1.0, v_min : Int32 = 0, v_max : Int32 = 0, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_int_range2(label : String, v_current_min : Pointer(Int32), v_current_max : Pointer(Int32), v_speed : Float32 = 1.0, v_min : Int32 = 0, v_max : Int32 = 0, format : String = "%d", format_max : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar(label : String, p_data : Pointer(Int8), v_speed : Float32 = 1.0, p_min : Int8 | Nil = nil, p_max : Int8 | Nil = nil, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar(label : String, p_data : Pointer(UInt8), v_speed : Float32 = 1.0, p_min : UInt8 | Nil = nil, p_max : UInt8 | Nil = nil, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar(label : String, p_data : Pointer(Int16), v_speed : Float32 = 1.0, p_min : Int16 | Nil = nil, p_max : Int16 | Nil = nil, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar(label : String, p_data : Pointer(UInt16), v_speed : Float32 = 1.0, p_min : UInt16 | Nil = nil, p_max : UInt16 | Nil = nil, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar(label : String, p_data : Pointer(Int32), v_speed : Float32 = 1.0, p_min : Int32 | Nil = nil, p_max : Int32 | Nil = nil, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar(label : String, p_data : Pointer(UInt32), v_speed : Float32 = 1.0, p_min : UInt32 | Nil = nil, p_max : UInt32 | Nil = nil, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar(label : String, p_data : Pointer(Int64), v_speed : Float32 = 1.0, p_min : Int64 | Nil = nil, p_max : Int64 | Nil = nil, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar(label : String, p_data : Pointer(UInt64), v_speed : Float32 = 1.0, p_min : UInt64 | Nil = nil, p_max : UInt64 | Nil = nil, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar(label : String, p_data : Pointer(Float32), v_speed : Float32 = 1.0, p_min : Float32 | Nil = nil, p_max : Float32 | Nil = nil, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar(label : String, p_data : Pointer(Float64), v_speed : Float32 = 1.0, p_min : Float64 | Nil = nil, p_max : Float64 | Nil = nil, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar_n(label : String, p_data : Pointer(Int8), components : Int32, v_speed : Float32 = 1.0, p_min : Pointer(Int8) = Pointer(Int8).null, p_max : Pointer(Int8) = Pointer(Int8).null, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar_n(label : String, p_data : Pointer(UInt8), components : Int32, v_speed : Float32 = 1.0, p_min : Pointer(UInt8) = Pointer(UInt8).null, p_max : Pointer(UInt8) = Pointer(UInt8).null, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar_n(label : String, p_data : Pointer(Int16), components : Int32, v_speed : Float32 = 1.0, p_min : Pointer(Int16) = Pointer(Int16).null, p_max : Pointer(Int16) = Pointer(Int16).null, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar_n(label : String, p_data : Pointer(UInt16), components : Int32, v_speed : Float32 = 1.0, p_min : Pointer(UInt16) = Pointer(UInt16).null, p_max : Pointer(UInt16) = Pointer(UInt16).null, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar_n(label : String, p_data : Pointer(Int32), components : Int32, v_speed : Float32 = 1.0, p_min : Pointer(Int32) = Pointer(Int32).null, p_max : Pointer(Int32) = Pointer(Int32).null, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar_n(label : String, p_data : Pointer(UInt32), components : Int32, v_speed : Float32 = 1.0, p_min : Pointer(UInt32) = Pointer(UInt32).null, p_max : Pointer(UInt32) = Pointer(UInt32).null, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar_n(label : String, p_data : Pointer(Int64), components : Int32, v_speed : Float32 = 1.0, p_min : Pointer(Int64) = Pointer(Int64).null, p_max : Pointer(Int64) = Pointer(Int64).null, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar_n(label : String, p_data : Pointer(UInt64), components : Int32, v_speed : Float32 = 1.0, p_min : Pointer(UInt64) = Pointer(UInt64).null, p_max : Pointer(UInt64) = Pointer(UInt64).null, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar_n(label : String, p_data : Pointer(Float32), components : Int32, v_speed : Float32 = 1.0, p_min : Pointer(Float32) = Pointer(Float32).null, p_max : Pointer(Float32) = Pointer(Float32).null, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .drag_scalar_n(label : String, p_data : Pointer(Float64), components : Int32, v_speed : Float32 = 1.0, p_min : Pointer(Float64) = Pointer(Float64).null, p_max : Pointer(Float64) = Pointer(Float64).null, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
-
.dummy(size : ImVec2) : Void
add a dummy item of given size.
- .end : Void
- .end_child : Void
-
.end_combo : Void
only call EndCombo() if BeginCombo() returns true!
- .end_disabled : Void
-
.end_drag_drop_source : Void
only call EndDragDropSource() if BeginDragDropSource() returns true!
-
.end_drag_drop_target : Void
only call EndDragDropTarget() if BeginDragDropTarget() returns true!
-
.end_frame : Void
ends the Dear ImGui frame.
-
.end_group : Void
unlock horizontal starting position + capture the whole group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
-
.end_list_box : Void
only call EndListBox() if BeginListBox() returned true!
-
.end_main_menu_bar : Void
only call EndMainMenuBar() if BeginMainMenuBar() returns true!
-
.end_menu : Void
only call EndMenu() if BeginMenu() returns true!
-
.end_menu_bar : Void
only call EndMenuBar() if BeginMenuBar() returns true!
-
.end_popup : Void
only call EndPopup() if BeginPopupXXX() returns true!
-
.end_tab_bar : Void
only call EndTabBar() if BeginTabBar() returns true!
-
.end_tab_item : Void
only call EndTabItem() if BeginTabItem() returns true!
-
.end_table : Void
only call EndTable() if BeginTable() returns true!
-
.end_tooltip : Void
only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns true!
- .get_allocator_functions(p_alloc_func : Pointer(ImGuiMemAllocFunc), p_free_func : Pointer(ImGuiMemFreeFunc), p_user_data : Pointer(Pointer(Void))) : Void
-
.get_background_draw_list : ImDrawList
this draw list will be the first rendered one.
- .get_clipboard_text : String
-
.get_color_u32(idx : ImGuiCol, alpha_mul : Float32 = 1.0) : UInt32
retrieve given style color with style alpha applied and optional extra alpha multiplier, packed as a 32-bit value suitable for ImDrawList
-
.get_color_u32(col : ImVec4) : UInt32
retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
-
.get_color_u32(col : UInt32, alpha_mul : Float32 = 1.0) : UInt32
retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
-
.get_column_index : Int32
get current column index
-
.get_column_offset(column_index : Int32 = -1) : Float32
get position of column line (in pixels, from the left side of the contents region).
-
.get_column_width(column_index : Int32 = -1) : Float32
get column width (in pixels).
- .get_columns_count : Int32
-
.get_content_region_avail : ImGui::ImVec2
== GetContentRegionMax() - GetCursorPos()
-
.get_content_region_max : ImGui::ImVec2
current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
- .get_current_context : ImGuiContext
-
.get_cursor_pos : ImGui::ImVec2
[window-local] cursor position in window coordinates (relative to window position)
-
.get_cursor_pos_x : Float32
[window-local] "
-
.get_cursor_pos_y : Float32
[window-local] "
-
.get_cursor_screen_pos : ImGui::ImVec2
cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).
-
.get_cursor_start_pos : ImGui::ImVec2
[window-local] initial cursor position, in window coordinates
-
.get_drag_drop_payload : ImGuiPayload | Nil
peek directly into the current payload from anywhere.
-
.get_draw_data : ImDrawData
valid after Render() and until the next call to NewFrame().
-
.get_draw_list_shared_data : ImDrawListSharedData
you may use this when creating your own ImDrawList instances.
-
.get_font : ImFont
get current font
-
.get_font_size : Float32
get current font size (= height in pixels) of current font with current scale applied
-
.get_font_tex_uv_white_pixel : ImGui::ImVec2
get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
-
.get_foreground_draw_list : ImDrawList
this draw list will be the last rendered one.
-
.get_frame_count : Int32
get global imgui frame count.
-
.get_frame_height : Float32
~ FontSize + style.FramePadding.y * 2
-
.get_frame_height_with_spacing : Float32
~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets)
-
.get_id(str_id : String) : ImGuiID
calculate unique ID (hash of whole ID stack + given parameter).
- .get_id(str_id : Bytes | String) : ImGuiID
- .get_id(int_id : Int) : ImGuiID
- .get_id(ptr_id : Reference | ClassType | Int | Pointer(Void)) : ImGuiID
-
.get_io : ImGuiIO
access the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)
-
.get_item_id : ImGuiID
get ID of last item (~~ often same ImGui::GetID(label) beforehand)
-
.get_item_rect_max : ImGui::ImVec2
get lower-right bounding rectangle of the last item (screen space)
-
.get_item_rect_min : ImGui::ImVec2
get upper-left bounding rectangle of the last item (screen space)
-
.get_item_rect_size : ImGui::ImVec2
get size of last item
-
.get_key_name(key : ImGuiKey) : String
[DEBUG] returns English name of the key.
-
.get_key_pressed_amount(key : ImGuiKey, repeat_delay : Float32, rate : Float32) : Int32
uses provided repeat rate/delay.
-
.get_main_viewport : ImGuiViewport
return primary/default viewport.
-
.get_mouse_clicked_count(button : ImGuiMouseButton) : Int32
return the number of successive mouse-clicks at the time where a click happen (otherwise 0).
-
.get_mouse_cursor : ImGuiMouseCursor
get desired mouse cursor shape.
-
.get_mouse_drag_delta(button : ImGuiMouseButton = ImGuiMouseButton.new(0), lock_threshold : Float32 = -1.0) : ImGui::ImVec2
return the delta from the initial clicking position while the mouse button is pressed or was just released.
-
.get_mouse_pos : ImGui::ImVec2
shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
-
.get_mouse_pos_on_opening_current_popup : ImGui::ImVec2
retrieve mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user backing that value themselves)
- .get_rgba(color : ImVec4) : Tuple(UInt8, UInt8, UInt8, UInt8)
-
.get_scroll_max_x : Float32
get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x
-
.get_scroll_max_y : Float32
get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - DecorationsSize.y
-
.get_scroll_x : Float32
get scrolling amount [0 ..
-
.get_scroll_y : Float32
get scrolling amount [0 ..
- .get_state_storage : ImGuiStorage
-
.get_style : ImGuiStyle
access the Style structure (colors, sizes).
-
.get_style_color_name(idx : ImGuiCol) : String
get a string corresponding to the enum value (for display, saving, etc.).
-
.get_style_color_vec4(idx : ImGuiCol) : ImVec4
retrieve style color as stored in ImGuiStyle structure.
-
.get_text_line_height : Float32
~ FontSize
-
.get_text_line_height_with_spacing : Float32
~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)
-
.get_time : Float64
get global imgui time.
-
.get_tree_node_to_label_spacing : Float32
horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode
-
.get_version : String
get the compiled version string e.g.
-
.get_window_content_region_max : ImGui::ImVec2
content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
-
.get_window_content_region_min : ImGui::ImVec2
content boundaries min for the full window (roughly (0,0)-Scroll), in window coordinates
-
.get_window_draw_list : ImDrawList
get draw list associated to the current window, to append your own drawing primitives
-
.get_window_height : Float32
get current window height (shortcut for GetWindowSize().y)
-
.get_window_pos : ImGui::ImVec2
get current window position in screen space (note: it is unlikely you need to use this.
-
.get_window_size : ImGui::ImVec2
get current window size (note: it is unlikely you need to use this.
-
.get_window_width : Float32
get current window width (shortcut for GetWindowSize().x)
-
.group(&) : Nil
Calls
.begin_group
, yields to the block, then calls.end_group
. - .hsv(h : Number, s : Number, v : Number, a : Number = 1.0) : ImVec4
- .image(user_texture_id : ImTextureID, image_size : ImVec2, uv0 : ImVec2 = ImVec2.new(0, 0), uv1 : ImVec2 = ImVec2.new(1, 1), tint_col : ImVec4 = ImVec4.new(1, 1, 1, 1), border_col : ImVec4 = ImVec4.new(0, 0, 0, 0)) : Void
- .image_button(str_id : String, user_texture_id : ImTextureID, image_size : ImVec2, uv0 : ImVec2 = ImVec2.new(0, 0), uv1 : ImVec2 = ImVec2.new(1, 1), bg_col : ImVec4 = ImVec4.new(0, 0, 0, 0), tint_col : ImVec4 = ImVec4.new(1, 1, 1, 1)) : Bool
-
.indent(indent_w : Float32 = 0.0) : Void
move content position toward the right, by indent_w, or style.IndentSpacing if indent_w <= 0
- .input_double(label : String, v : Pointer(Float64), step : Float64 = 0.0, step_fast : Float64 = 0.0, format : String = "%.6f", flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_float(label : String, v : Pointer(Float32), step : Float32 = 0.0, step_fast : Float32 = 0.0, format : String = "%.3f", flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_float2(label : String, v : Pointer(ImVec2) | Indexable(Float32) | Pointer(Float32), format : String = "%.3f", flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_float3(label : String, v : Indexable(Float32) | Pointer(Float32), format : String = "%.3f", flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_float4(label : String, v : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), format : String = "%.3f", flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_int(label : String, v : Pointer(Int32), step : Int32 = 1, step_fast : Int32 = 100, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_int2(label : String, v : Indexable(Int32) | Pointer(Int32), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_int3(label : String, v : Indexable(Int32) | Pointer(Int32), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_int4(label : String, v : Indexable(Int32) | Pointer(Int32), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar(label : String, p_data : Pointer(Int8), p_step : Int8 | Nil = nil, p_step_fast : Int8 | Nil = nil, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar(label : String, p_data : Pointer(UInt8), p_step : UInt8 | Nil = nil, p_step_fast : UInt8 | Nil = nil, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar(label : String, p_data : Pointer(Int16), p_step : Int16 | Nil = nil, p_step_fast : Int16 | Nil = nil, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar(label : String, p_data : Pointer(UInt16), p_step : UInt16 | Nil = nil, p_step_fast : UInt16 | Nil = nil, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar(label : String, p_data : Pointer(Int32), p_step : Int32 | Nil = nil, p_step_fast : Int32 | Nil = nil, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar(label : String, p_data : Pointer(UInt32), p_step : UInt32 | Nil = nil, p_step_fast : UInt32 | Nil = nil, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar(label : String, p_data : Pointer(Int64), p_step : Int64 | Nil = nil, p_step_fast : Int64 | Nil = nil, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar(label : String, p_data : Pointer(UInt64), p_step : UInt64 | Nil = nil, p_step_fast : UInt64 | Nil = nil, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar(label : String, p_data : Pointer(Float32), p_step : Float32 | Nil = nil, p_step_fast : Float32 | Nil = nil, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar(label : String, p_data : Pointer(Float64), p_step : Float64 | Nil = nil, p_step_fast : Float64 | Nil = nil, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar_n(label : String, p_data : Pointer(Int8), components : Int32, p_step : Pointer(Int8) = Pointer(Int8).null, p_step_fast : Pointer(Int8) = Pointer(Int8).null, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar_n(label : String, p_data : Pointer(UInt8), components : Int32, p_step : Pointer(UInt8) = Pointer(UInt8).null, p_step_fast : Pointer(UInt8) = Pointer(UInt8).null, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar_n(label : String, p_data : Pointer(Int16), components : Int32, p_step : Pointer(Int16) = Pointer(Int16).null, p_step_fast : Pointer(Int16) = Pointer(Int16).null, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar_n(label : String, p_data : Pointer(UInt16), components : Int32, p_step : Pointer(UInt16) = Pointer(UInt16).null, p_step_fast : Pointer(UInt16) = Pointer(UInt16).null, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar_n(label : String, p_data : Pointer(Int32), components : Int32, p_step : Pointer(Int32) = Pointer(Int32).null, p_step_fast : Pointer(Int32) = Pointer(Int32).null, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar_n(label : String, p_data : Pointer(UInt32), components : Int32, p_step : Pointer(UInt32) = Pointer(UInt32).null, p_step_fast : Pointer(UInt32) = Pointer(UInt32).null, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar_n(label : String, p_data : Pointer(Int64), components : Int32, p_step : Pointer(Int64) = Pointer(Int64).null, p_step_fast : Pointer(Int64) = Pointer(Int64).null, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar_n(label : String, p_data : Pointer(UInt64), components : Int32, p_step : Pointer(UInt64) = Pointer(UInt64).null, p_step_fast : Pointer(UInt64) = Pointer(UInt64).null, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar_n(label : String, p_data : Pointer(Float32), components : Int32, p_step : Pointer(Float32) = Pointer(Float32).null, p_step_fast : Pointer(Float32) = Pointer(Float32).null, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_scalar_n(label : String, p_data : Pointer(Float64), components : Int32, p_step : Pointer(Float64) = Pointer(Float64).null, p_step_fast : Pointer(Float64) = Pointer(Float64).null, format : String | Nil = nil, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_text(label : String, buf : Bytes, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0), callback : ImGuiInputTextCallback | Nil = nil, user_data : Pointer(Void) = Pointer(Void).null) : Bool
- .input_text(label : String, buf : TextBuffer, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0), &block : ImGuiInputTextCallbackData -> Int32) : Bool
- .input_text(label : String, buf : TextBuffer, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_text_multiline(label : String, buf : Bytes, size : ImVec2 = ImVec2.new(0, 0), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0), callback : ImGuiInputTextCallback | Nil = nil, user_data : Pointer(Void) = Pointer(Void).null) : Bool
- .input_text_multiline(label : String, buf : TextBuffer, size : ImVec2 = ImVec2.new(0, 0), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0), &block : ImGuiInputTextCallbackData -> Int32) : Bool
- .input_text_multiline(label : String, buf : TextBuffer, size : ImVec2 = ImVec2.new(0, 0), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
- .input_text_with_hint(label : String, hint : String, buf : Bytes, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0), callback : ImGuiInputTextCallback | Nil = nil, user_data : Pointer(Void) = Pointer(Void).null) : Bool
- .input_text_with_hint(label : String, hint : String, buf : TextBuffer, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0), &block : ImGuiInputTextCallbackData -> Int32) : Bool
- .input_text_with_hint(label : String, hint : String, buf : TextBuffer, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool
-
.invisible_button(str_id : String, size : ImVec2, flags : ImGuiButtonFlags = ImGuiButtonFlags.new(0)) : Bool
flexible button behavior without the visuals, frequently useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.)
-
.is_any_item_active : Bool
is any item active?
-
.is_any_item_focused : Bool
is any item focused?
-
.is_any_item_hovered : Bool
is any item hovered?
-
.is_any_mouse_down : Bool
[WILL OBSOLETE] is any mouse button held? This was designed for backends, but prefer having backend maintain a mask of held mouse buttons, because upcoming input queue system will make this invalid.
-
.is_item_activated : Bool
was the last item just made active (item was previously inactive).
-
.is_item_active : Bool
is the last item active? (e.g.
-
.is_item_clicked(mouse_button : ImGuiMouseButton = ImGuiMouseButton.new(0)) : Bool
is the last item hovered and mouse clicked on? (**) == IsMouseClicked(mouse_button) && IsItemHovered()Important.
-
.is_item_deactivated : Bool
was the last item just made inactive (item was previously active).
-
.is_item_deactivated_after_edit : Bool
was the last item just made inactive and made a value change when it was active? (e.g.
-
.is_item_edited : Bool
did the last item modify its underlying value this frame? or was pressed? This is generally the same as the "bool" return value of many widgets.
-
.is_item_focused : Bool
is the last item focused for keyboard/gamepad navigation?
-
.is_item_hovered(flags : ImGuiHoveredFlags = ImGuiHoveredFlags.new(0)) : Bool
is the last item hovered? (and usable, aka not blocked by a popup, etc.).
-
.is_item_toggled_open : Bool
was the last item open state toggled? set by TreeNode().
-
.is_item_visible : Bool
is the last item visible? (items may be out of sight because of clipping/scrolling)
-
.is_key_chord_pressed(key_chord : ImGuiKeyChord) : Bool
was key chord (mods + key) pressed, e.g.
-
.is_key_down(key : ImGuiKey) : Bool
is key being held.
-
.is_key_pressed(key : ImGuiKey, repeat : Bool = true) : Bool
was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate
-
.is_key_released(key : ImGuiKey) : Bool
was key released (went from Down to !Down)?
-
.is_mouse_clicked(button : ImGuiMouseButton, repeat : Bool = false) : Bool
did mouse button clicked? (went from !Down to Down).
-
.is_mouse_double_clicked(button : ImGuiMouseButton) : Bool
did mouse button double-clicked? Same as GetMouseClickedCount() == 2.
-
.is_mouse_down(button : ImGuiMouseButton) : Bool
is mouse button held?
-
.is_mouse_dragging(button : ImGuiMouseButton, lock_threshold : Float32 = -1.0) : Bool
is mouse dragging? (if lock_threshold < -1.0f, uses io.MouseDraggingThreshold)
-
.is_mouse_hovering_rect(r_min : ImVec2, r_max : ImVec2, clip : Bool = true) : Bool
is mouse hovering given bounding rect (in screen space).
-
.is_mouse_pos_valid(mouse_pos : Pointer(ImVec2) = Pointer(ImVec2).null) : Bool
by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse available
-
.is_mouse_released(button : ImGuiMouseButton) : Bool
did mouse button released? (went from Down to !Down)
-
.is_popup_open(str_id : String, flags : ImGuiPopupFlags = ImGuiPopupFlags.new(0)) : Bool
return true if the popup is open.
-
.is_rect_visible(rect_min : ImVec2, rect_max : ImVec2) : Bool
test if rectangle (in screen space) is visible / not clipped.
-
.is_rect_visible(size : ImVec2) : Bool
test if rectangle (of given size, starting from cursor position) is visible / not clipped.
- .is_window_appearing : Bool
- .is_window_collapsed : Bool
-
.is_window_focused(flags : ImGuiFocusedFlags = ImGuiFocusedFlags.new(0)) : Bool
is current window focused? or its root/child, depending on flags.
-
.is_window_hovered(flags : ImGuiHoveredFlags = ImGuiHoveredFlags.new(0)) : Bool
is current window hovered and hoverable (e.g.
-
.label_text(label : String, fmt : String, *args) : Void
display text+label aligned the same way as value+label widgets
- .list_box(label : String, current_item : Pointer(Int32) | Pointer, items_count : Int32, height_in_items : Int32 = -1, &block : Int32 -> Slice(UInt8) | String | Nil) : Bool
-
.list_box(label : String, size : ImVec2 = ImVec2.new(0, 0), &) : Nil
Calls
.begin_list_box
, conditionally yields to the block, then conditionally calls.end_list_box
. - .list_box(label : String, current_item : Pointer(Int32) | Pointer, getter : Pointer(Void), Int32 -> String, user_data : Pointer(Void), items_count : Int32, height_in_items : Int32 = -1) : Bool
- .list_box(label : String, current_item : Pointer(Int32) | Pointer, items : Indexable(Pointer(LibC::Char)), height_in_items : Int32 = -1) : Bool
- .list_box(label : String, current_item : Pointer(Int32) | Pointer, items : Indexable(String), height_in_items : Int32 = -1)
-
.load_ini_settings_from_disk(ini_filename : String) : Void
call after CreateContext() and before the first call to NewFrame().
-
.load_ini_settings_from_memory(ini_data : String, ini_size : LibC::SizeT = 0) : Void
call after CreateContext() and before the first call to NewFrame() to provide .ini data from your own data source.
-
.log_buttons : Void
helper to display buttons for logging to tty/file/clipboard
-
.log_finish : Void
stop logging (close file, etc.)
-
.log_text(fmt : String, *args) : Void
pass text data straight to log (without being displayed)
-
.log_to_clipboard(auto_open_depth : Int32 = -1) : Void
start logging to OS clipboard
-
.log_to_file(auto_open_depth : Int32 = -1, filename : String | Nil = nil) : Void
start logging to file
-
.log_to_tty(auto_open_depth : Int32 = -1) : Void
start logging to tty (stdout)
-
.main_menu_bar(&) : Nil
Calls
.begin_main_menu_bar
, conditionally yields to the block, then conditionally calls.end_main_menu_bar
. - .mem_alloc(size : LibC::SizeT) : Pointer(Void)
- .mem_free(ptr : Pointer(Void)) : Void
-
.menu(label : String, enabled : Bool = true, &) : Nil
Calls
.begin_menu
, conditionally yields to the block, then conditionally calls.end_menu
. -
.menu_bar(&) : Nil
Calls
.begin_menu_bar
, conditionally yields to the block, then conditionally calls.end_menu_bar
. -
.menu_item(label : String, shortcut : String | Nil = nil, selected : Bool = false, enabled : Bool = true) : Bool
return true when activated.
-
.menu_item(label : String, shortcut : String, p_selected : Pointer(Bool), enabled : Bool = true) : Bool
return true when activated + toggle (*p_selected) if p_selected != NULL
-
.new_frame : Void
start a new Dear ImGui frame, you can submit any command from this point until Render()/EndFrame().
-
.new_line : Void
undo a SameLine() or force a new line when in a horizontal-layout context.
-
.next_column : Void
next column, defaults to current row or next row if the current row is finished
-
.open_popup(str_id : String, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(0)) : Void
call to mark popup as open (don't call every frame!).
-
.open_popup(id : ImGuiID, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(0)) : Void
id overload to facilitate calling from nested stacks
-
.open_popup_on_item_click(str_id : String | Nil = nil, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(1)) : Void
helper to open popup when clicked on last item.
- .plot_histogram(label : String, values : Indexable(Float32), values_offset : Int32 = 0, overlay_text : String | Nil = nil, scale_min : Float32 = Float32::MAX, scale_max : Float32 = Float32::MAX, graph_size : ImVec2 = ImVec2.new(0, 0), stride : Int32 = sizeof(Float32)) : Void
- .plot_histogram(label : String, values_getter : Pointer(Void), Int32 -> Float32, data : Pointer(Void), values_count : Int32, values_offset : Int32 = 0, overlay_text : String | Nil = nil, scale_min : Float32 = Float32::MAX, scale_max : Float32 = Float32::MAX, graph_size : ImVec2 = ImVec2.new(0, 0)) : Void
- .plot_histogram(label : String, values_count : Int32, values_offset : Int32 = 0, overlay_text : String | Nil = nil, scale_min : Float32 = Float32::MAX, scale_max : Float32 = Float32::MAX, graph_size : ImVec2 = ImVec2.new(0, 0), &block : Int32 -> Float32) : Void
- .plot_lines(label : String, values : Indexable(Float32), values_offset : Int32 = 0, overlay_text : String | Nil = nil, scale_min : Float32 = Float32::MAX, scale_max : Float32 = Float32::MAX, graph_size : ImVec2 = ImVec2.new(0, 0), stride : Int32 = sizeof(Float32)) : Void
- .plot_lines(label : String, values_getter : Pointer(Void), Int32 -> Float32, data : Pointer(Void), values_count : Int32, values_offset : Int32 = 0, overlay_text : String | Nil = nil, scale_min : Float32 = Float32::MAX, scale_max : Float32 = Float32::MAX, graph_size : ImVec2 = ImVec2.new(0, 0)) : Void
- .plot_lines(label : String, values_count : Int32, values_offset : Int32 = 0, overlay_text : String | Nil = nil, scale_min : Float32 = Float32::MAX, scale_max : Float32 = Float32::MAX, graph_size : ImVec2 = ImVec2.new(0, 0), &block : Int32 -> Float32) : Void
- .pop_button_repeat : Void
- .pop_clip_rect : Void
- .pop_font : Void
-
.pop_id : Void
pop from the ID stack.
- .pop_item_width : Void
- .pop_style_color(count : Int32 = 1) : Void
- .pop_style_var(count : Int32 = 1) : Void
- .pop_tab_stop : Void
- .pop_text_wrap_pos : Void
-
.popup(str_id : String, flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0), &) : Nil
Calls
.begin_popup
, conditionally yields to the block, then conditionally calls.end_popup
. -
.popup_context_item(str_id : String | Nil = nil, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(1), &) : Nil
Calls
.begin_popup_context_item
, conditionally yields to the block, then conditionally calls.end_popup
. -
.popup_context_void(str_id : String | Nil = nil, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(1), &) : Nil
Calls
.begin_popup_context_void
, conditionally yields to the block, then conditionally calls.end_popup
. -
.popup_context_window(str_id : String | Nil = nil, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(1), &) : Nil
Calls
.begin_popup_context_window
, conditionally yields to the block, then conditionally calls.end_popup
. -
.popup_modal(name : String, p_open : Pointer(Bool) = Pointer(Bool).null, flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0), &) : Nil
Calls
.begin_popup_modal
, conditionally yields to the block, then conditionally calls.end_popup
. - .progress_bar(fraction : Float32, size_arg : ImVec2 = ImVec2.new(-Float32::MIN_POSITIVE, 0), overlay : String | Nil = nil) : Void
-
.push_button_repeat(repeat : Bool) : Void
in 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting).
- .push_clip_rect(clip_rect_min : ImVec2, clip_rect_max : ImVec2, intersect_with_current_clip_rect : Bool) : Void
-
.push_font(font : ImFont) : Void
use NULL as a shortcut to push default font
-
.push_id(str_id : String) : Void
push string into the ID stack (will hash string).
-
.push_id(str_id : Bytes | String) : Void
push string into the ID stack (will hash string).
-
.push_id(int_id : Int32) : Void
push integer into the ID stack (will hash integer).
- .push_id(ptr_id : ClassType) : Void
-
.push_id(ptr_id : Reference | ClassType | Int | Pointer(Void)) : Void
push pointer into the ID stack (will hash pointer).
-
.push_item_width(item_width : Float32) : Void
push width of items for common large "item+label" widgets.
-
.push_style_color(idx : ImGuiCol, col : UInt32) : Void
modify a style color.
- .push_style_color(idx : ImGuiCol, col : ImVec4) : Void
-
.push_style_var(idx : ImGuiStyleVar, val : Float32) : Void
modify a style float variable.
-
.push_style_var(idx : ImGuiStyleVar, val : ImVec2) : Void
modify a style ImVec2 variable.
-
.push_tab_stop(tab_stop : Bool) : Void
== tab stop enable.
-
.push_text_wrap_pos(wrap_local_pos_x : Float32 = 0.0) : Void
push word-wrapping position for Text*() commands.
-
.radio_button(label : String, v : Pointer(Int32), v_button : Int32) : Bool
shortcut to handle the above pattern when value is an integer
- .radio_button(label : String, v : Pointer(T), v_button : T) : Bool forall T
-
.radio_button(label : String, active : Bool) : Bool
use with e.g.
-
.render : Void
ends the Dear ImGui frame, finalize the draw data.
- .reset_mouse_drag_delta(button : ImGuiMouseButton = ImGuiMouseButton.new(0)) : Void
- .rgb(r : Number, g : Number, b : Number, a : Number = 1.0) : ImVec4
-
.same_line(offset_from_start_x : Float32 = 0.0, spacing : Float32 = -1.0) : Void
call between widgets or groups to layout them horizontally.
-
.save_ini_settings_to_disk(ini_filename : String) : Void
this is automatically called (if io.IniFilename is not empty) a few seconds after any modification that should be reflected in the .ini file (and also by DestroyContext).
-
.save_ini_settings_to_memory : Tuple(String, LibC::SizeT)
return a zero-terminated string with the .ini data which you can save by your own mean.
-
.selectable(label : String, selected : Bool = false, flags : ImGuiSelectableFlags = ImGuiSelectableFlags.new(0), size : ImVec2 = ImVec2.new(0, 0)) : Bool
"bool selected" carry the selection state (read-only).
-
.selectable(label : String, p_selected : Pointer(Bool), flags : ImGuiSelectableFlags = ImGuiSelectableFlags.new(0), size : ImVec2 = ImVec2.new(0, 0)) : Bool
"bool* p_selected" point to the selection state (read-write), as a convenient helper.
-
.separator : Void
separator, generally horizontal.
-
.separator_text(label : String) : Void
currently: formatted text with an horizontal line
- .set_allocator_functions(alloc_func : ImGuiMemAllocFunc, free_func : ImGuiMemFreeFunc, user_data : Pointer(Void) = Pointer(Void).null) : Void
- .set_clipboard_text(text : String) : Void
-
.set_color_edit_options(flags : ImGuiColorEditFlags) : Void
initialize current options (generally on application startup) if you want to select a default format, picker type, etc.
-
.set_column_offset(column_index : Int32, offset_x : Float32) : Void
set position of column line (in pixels, from the left side of the contents region).
-
.set_column_width(column_index : Int32, width : Float32) : Void
set column width (in pixels).
- .set_current_context(ctx : ImGuiContext) : Void
-
.set_cursor_pos(local_pos : ImVec2) : Void
[window-local] "
-
.set_cursor_pos_x(local_x : Float32) : Void
[window-local] "
-
.set_cursor_pos_y(local_y : Float32) : Void
[window-local] "
-
.set_cursor_screen_pos(pos : ImVec2) : Void
cursor position in absolute coordinates
-
.set_drag_drop_payload(type : String, data : Pointer(Void), sz : LibC::SizeT, cond : ImGuiCond = ImGuiCond.new(0)) : Bool
type is a user defined string of maximum 32 characters.
-
.set_item_default_focus : Void
make last item the default focused item of a window.
-
.set_item_tooltip(fmt : String, *args) : Void
set a text-only tooltip if preceeding item was hovered.
-
.set_keyboard_focus_here(offset : Int32 = 0) : Void
focus keyboard on the next widget.
-
.set_mouse_cursor(cursor_type : ImGuiMouseCursor) : Void
set desired mouse cursor shape
-
.set_next_frame_want_capture_keyboard(want_capture_keyboard : Bool) : Void
Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, typically when true it instructs your app to ignore inputs).
-
.set_next_frame_want_capture_mouse(want_capture_mouse : Bool) : Void
Override io.WantCaptureMouse flag next frame (said flag is left for your application to handle, typical when true it instucts your app to ignore inputs).
-
.set_next_item_allow_overlap : Void
allow next item to be overlapped by a subsequent item.
-
.set_next_item_open(is_open : Bool, cond : ImGuiCond = ImGuiCond.new(0)) : Void
set next TreeNode/CollapsingHeader open state.
-
.set_next_item_width(item_width : Float32) : Void
set width of the next common large "item+label" widget.
-
.set_next_window_bg_alpha(alpha : Float32) : Void
set next window background color alpha.
-
.set_next_window_collapsed(collapsed : Bool, cond : ImGuiCond = ImGuiCond.new(0)) : Void
set next window collapsed state.
-
.set_next_window_content_size(size : ImVec2) : Void
set next window content size (~ scrollable client area, which enforce the range of scrollbars).
-
.set_next_window_focus : Void
set next window to be focused / top-most.
-
.set_next_window_pos(pos : ImVec2, cond : ImGuiCond = ImGuiCond.new(0), pivot : ImVec2 = ImVec2.new(0, 0)) : Void
set next window position.
-
.set_next_window_scroll(scroll : ImVec2) : Void
set next window scrolling value (use < 0.0f to not affect a given axis).
-
.set_next_window_size(size : ImVec2, cond : ImGuiCond = ImGuiCond.new(0)) : Void
set next window size.
-
.set_next_window_size_constraints(size_min : ImVec2, size_max : ImVec2, custom_callback : ImGuiSizeCallback | Nil = nil, custom_callback_data : Pointer(Void) = Pointer(Void).null) : Void
set next window size limits.
- .set_next_window_size_constraints(size_min : ImVec2, size_max : ImVec2, &block : ImGuiSizeCallbackData -> ) : Void
-
.set_scroll_from_pos_x(local_x : Float32, center_x_ratio : Float32 = 0.5) : Void
adjust scrolling amount to make given position visible.
-
.set_scroll_from_pos_y(local_y : Float32, center_y_ratio : Float32 = 0.5) : Void
adjust scrolling amount to make given position visible.
-
.set_scroll_here_x(center_x_ratio : Float32 = 0.5) : Void
adjust scrolling amount to make current cursor position visible.
-
.set_scroll_here_y(center_y_ratio : Float32 = 0.5) : Void
adjust scrolling amount to make current cursor position visible.
-
.set_scroll_x(scroll_x : Float32) : Void
set scrolling amount [0 ..
-
.set_scroll_y(scroll_y : Float32) : Void
set scrolling amount [0 ..
-
.set_state_storage(storage : Pointer(ImGuiStorage)) : Void
replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)
-
.set_tab_item_closed(tab_or_docked_window_label : String) : Void
notify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on reorderable tab bars).
-
.set_tooltip(fmt : String, *args) : Void
set a text-only tooltip.
-
.set_window_collapsed(collapsed : Bool, cond : ImGuiCond = ImGuiCond.new(0)) : Void
(not recommended) set current window collapsed state.
-
.set_window_collapsed(name : String, collapsed : Bool, cond : ImGuiCond = ImGuiCond.new(0)) : Void
set named window collapsed state
-
.set_window_focus(name : String) : Void
set named window to be focused / top-most.
-
.set_window_focus : Void
(not recommended) set current window to be focused / top-most.
-
.set_window_font_scale(scale : Float32) : Void
[OBSOLETE] set font scale.
-
.set_window_pos(pos : ImVec2, cond : ImGuiCond = ImGuiCond.new(0)) : Void
(not recommended) set current window position - call within Begin()/End().
-
.set_window_pos(name : String, pos : ImVec2, cond : ImGuiCond = ImGuiCond.new(0)) : Void
set named window position.
-
.set_window_size(size : ImVec2, cond : ImGuiCond = ImGuiCond.new(0)) : Void
(not recommended) set current window size - call within Begin()/End().
-
.set_window_size(name : String, size : ImVec2, cond : ImGuiCond = ImGuiCond.new(0)) : Void
set named window size.
-
.show_about_window(p_open : Pointer(Bool) = Pointer(Bool).null) : Void
create About window.
-
.show_debug_log_window(p_open : Pointer(Bool) = Pointer(Bool).null) : Void
create Debug Log window.
-
.show_demo_window(p_open : Pointer(Bool) = Pointer(Bool).null) : Void
create Demo window.
-
.show_font_selector(label : String) : Void
add font selector block (not a window), essentially a combo listing the loaded fonts.
-
.show_id_stack_tool_window(p_open : Pointer(Bool) = Pointer(Bool).null) : Void
create Stack Tool window.
-
.show_metrics_window(p_open : Pointer(Bool) = Pointer(Bool).null) : Void
create Metrics/Debugger window.
-
.show_style_editor(ref : ImGuiStyle | Nil = nil) : Void
add style editor block (not a window).
-
.show_style_selector(label : String) : Bool
add style selector block (not a window), essentially a combo listing the default styles.
-
.show_user_guide : Void
add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard controls).
- .slider_angle(label : String, v_rad : Pointer(Float32), v_degrees_min : Float32 = -360.0, v_degrees_max : Float32 = +360.0, format : String = "%.0f deg", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
-
.slider_float(label : String, v : Pointer(Float32), v_min : Float32, v_max : Float32, format : String = "%.3f", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display.
- .slider_float2(label : String, v : Pointer(ImVec2) | Indexable(Float32) | Pointer(Float32), v_min : Float32, v_max : Float32, format : String = "%.3f", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_float3(label : String, v : Indexable(Float32) | Pointer(Float32), v_min : Float32, v_max : Float32, format : String = "%.3f", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_float4(label : String, v : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), v_min : Float32, v_max : Float32, format : String = "%.3f", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_int(label : String, v : Pointer(Int32), v_min : Int32, v_max : Int32, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_int2(label : String, v : Indexable(Int32) | Pointer(Int32), v_min : Int32, v_max : Int32, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_int3(label : String, v : Indexable(Int32) | Pointer(Int32), v_min : Int32, v_max : Int32, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_int4(label : String, v : Indexable(Int32) | Pointer(Int32), v_min : Int32, v_max : Int32, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar(label : String, p_data : Pointer(Int8), p_min : Int8, p_max : Int8, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar(label : String, p_data : Pointer(UInt8), p_min : UInt8, p_max : UInt8, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar(label : String, p_data : Pointer(Int16), p_min : Int16, p_max : Int16, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar(label : String, p_data : Pointer(UInt16), p_min : UInt16, p_max : UInt16, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar(label : String, p_data : Pointer(Int32), p_min : Int32, p_max : Int32, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar(label : String, p_data : Pointer(UInt32), p_min : UInt32, p_max : UInt32, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar(label : String, p_data : Pointer(Int64), p_min : Int64, p_max : Int64, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar(label : String, p_data : Pointer(UInt64), p_min : UInt64, p_max : UInt64, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar(label : String, p_data : Pointer(Float32), p_min : Float32, p_max : Float32, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar(label : String, p_data : Pointer(Float64), p_min : Float64, p_max : Float64, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar_n(label : String, p_data : Pointer(Int8), components : Int32, p_min : Pointer(Int8), p_max : Pointer(Int8), format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar_n(label : String, p_data : Pointer(UInt8), components : Int32, p_min : Pointer(UInt8), p_max : Pointer(UInt8), format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar_n(label : String, p_data : Pointer(Int16), components : Int32, p_min : Pointer(Int16), p_max : Pointer(Int16), format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar_n(label : String, p_data : Pointer(UInt16), components : Int32, p_min : Pointer(UInt16), p_max : Pointer(UInt16), format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar_n(label : String, p_data : Pointer(Int32), components : Int32, p_min : Pointer(Int32), p_max : Pointer(Int32), format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar_n(label : String, p_data : Pointer(UInt32), components : Int32, p_min : Pointer(UInt32), p_max : Pointer(UInt32), format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar_n(label : String, p_data : Pointer(Int64), components : Int32, p_min : Pointer(Int64), p_max : Pointer(Int64), format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar_n(label : String, p_data : Pointer(UInt64), components : Int32, p_min : Pointer(UInt64), p_max : Pointer(UInt64), format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar_n(label : String, p_data : Pointer(Float32), components : Int32, p_min : Pointer(Float32), p_max : Pointer(Float32), format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .slider_scalar_n(label : String, p_data : Pointer(Float64), components : Int32, p_min : Pointer(Float64), p_max : Pointer(Float64), format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
-
.small_button(label : String) : Bool
button with (FramePadding.y == 0) to easily embed within text
-
.spacing : Void
add vertical spacing.
-
.style_colors_classic(dst : ImGuiStyle | Nil = nil) : Void
classic imgui style
-
.style_colors_dark(dst : ImGuiStyle | Nil = nil) : Void
new, recommended style (default)
-
.style_colors_light(dst : ImGuiStyle | Nil = nil) : Void
best used with borders and a custom, thicker font
-
.tab_bar(str_id : String, flags : ImGuiTabBarFlags = ImGuiTabBarFlags.new(0), &) : Nil
Calls
.begin_tab_bar
, conditionally yields to the block, then conditionally calls.end_tab_bar
. -
.tab_item(label : String, p_open : Pointer(Bool) = Pointer(Bool).null, flags : ImGuiTabItemFlags = ImGuiTabItemFlags.new(0), &) : Nil
Calls
.begin_tab_item
, conditionally yields to the block, then conditionally calls.end_tab_item
. -
.tab_item_button(label : String, flags : ImGuiTabItemFlags = ImGuiTabItemFlags.new(0)) : Bool
create a Tab behaving like a button.
-
.table(str_id : String, column : Int32, flags : ImGuiTableFlags = ImGuiTableFlags.new(0), outer_size : ImVec2 = ImVec2.new(0.0, 0.0), inner_width : Float32 = 0.0, &) : Nil
Calls
.begin_table
, conditionally yields to the block, then conditionally calls.end_table
. -
.table_angled_headers_row : Void
submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag.
-
.table_get_column_count : Int32
return number of columns (value passed to BeginTable)
-
.table_get_column_flags(column_n : Int32 = -1) : ImGuiTableColumnFlags
return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags.
-
.table_get_column_index : Int32
return current column index.
-
.table_get_column_name(column_n : Int32 = -1) : String
return "" if column didn't have a name declared by TableSetupColumn().
-
.table_get_row_index : Int32
return current row index.
-
.table_get_sort_specs : ImGuiTableSortSpecs | Nil
get latest sort specs for the table (NULL if not sorting).
-
.table_header(label : String) : Void
submit one header cell manually (rarely used)
-
.table_headers_row : Void
submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu
-
.table_next_column : Bool
append into the next column (or first column of next row if currently in last column).
-
.table_next_row(row_flags : ImGuiTableRowFlags = ImGuiTableRowFlags.new(0), min_row_height : Float32 = 0.0) : Void
append into the first cell of a new row.
-
.table_set_bg_color(target : ImGuiTableBgTarget, color : UInt32, column_n : Int32 = -1) : Void
change the color of a cell, row, or column.
-
.table_set_column_enabled(column_n : Int32, v : Bool) : Void
change user accessible enabled/disabled state of a column.
-
.table_set_column_index(column_n : Int32) : Bool
append into the specified column.
- .table_setup_column(label : String, flags : ImGuiTableColumnFlags = ImGuiTableColumnFlags.new(0), init_width_or_weight : Float32 = 0.0, user_id : ImGuiID = 0) : Void
-
.table_setup_scroll_freeze(cols : Int32, rows : Int32) : Void
lock columns/rows so they stay visible when scrolled.
-
.text(fmt : String, *args) : Void
formatted text
-
.text_colored(col : ImVec4, fmt : String, *args) : Void
shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor();
-
.text_disabled(fmt : String, *args) : Void
shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); PopStyleColor();
-
.text_unformatted(text : Bytes | String) : Void
raw text without formatting.
-
.text_wrapped(fmt : String, *args) : Void
shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();.
-
.tooltip(&) : Nil
Calls
.begin_tooltip
, conditionally yields to the block, then calls.end_tooltip
. -
.tree_node(str_id : String, fmt : String, *args) : Bool
helper variation to easily decorelate the id from the displayed string.
-
.tree_node(ptr_id : Reference | ClassType | Int | Pointer(Void), fmt : String, *args) : Bool
"
- .tree_node(label : String) : Bool
-
.tree_node(str_id : String, fmt : String, *args, &) : Nil
Calls
.tree_node
, conditionally yields to the block, then conditionally calls.tree_pop
. -
.tree_node(ptr_id : Reference | ClassType | Int | Pointer(Void), fmt : String, *args, &) : Nil
Calls
.tree_node
, conditionally yields to the block, then conditionally calls.tree_pop
. -
.tree_node(label : String, &) : Nil
Calls
.tree_node
, conditionally yields to the block, then conditionally calls.tree_pop
. - .tree_node_ex(str_id : String, flags : ImGuiTreeNodeFlags, fmt : String, *args) : Bool
- .tree_node_ex(ptr_id : Reference | ClassType | Int | Pointer(Void), flags : ImGuiTreeNodeFlags, fmt : String, *args) : Bool
- .tree_node_ex(label : String, flags : ImGuiTreeNodeFlags = ImGuiTreeNodeFlags.new(0)) : Bool
-
.tree_node_ex(str_id : String, flags : ImGuiTreeNodeFlags, fmt : String, *args, &) : Nil
Calls
.tree_node_ex
, conditionally yields to the block, then conditionally calls.tree_pop
. -
.tree_node_ex(ptr_id : Reference | ClassType | Int | Pointer(Void), flags : ImGuiTreeNodeFlags, fmt : String, *args, &) : Nil
Calls
.tree_node_ex
, conditionally yields to the block, then conditionally calls.tree_pop
. -
.tree_node_ex(label : String, flags : ImGuiTreeNodeFlags = ImGuiTreeNodeFlags.new(0), &) : Nil
Calls
.tree_node_ex
, conditionally yields to the block, then conditionally calls.tree_pop
. -
.tree_pop : Void
~ Unindent()+PopID()
-
.tree_push(str_id : String) : Void
~ Indent()+PushID().
-
.tree_push(ptr_id : Reference | ClassType | Int | Pointer(Void)) : Void
"
-
.unindent(indent_w : Float32 = 0.0) : Void
move content position back to the left, by indent_w, or style.IndentSpacing if indent_w <= 0
- .v_slider_float(label : String, size : ImVec2, v : Pointer(Float32), v_min : Float32, v_max : Float32, format : String = "%.3f", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_int(label : String, size : ImVec2, v : Pointer(Int32), v_min : Int32, v_max : Int32, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_scalar(label : String, size : ImVec2, p_data : Pointer(Int8), p_min : Int8, p_max : Int8, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_scalar(label : String, size : ImVec2, p_data : Pointer(UInt8), p_min : UInt8, p_max : UInt8, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_scalar(label : String, size : ImVec2, p_data : Pointer(Int16), p_min : Int16, p_max : Int16, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_scalar(label : String, size : ImVec2, p_data : Pointer(UInt16), p_min : UInt16, p_max : UInt16, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_scalar(label : String, size : ImVec2, p_data : Pointer(Int32), p_min : Int32, p_max : Int32, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_scalar(label : String, size : ImVec2, p_data : Pointer(UInt32), p_min : UInt32, p_max : UInt32, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_scalar(label : String, size : ImVec2, p_data : Pointer(Int64), p_min : Int64, p_max : Int64, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_scalar(label : String, size : ImVec2, p_data : Pointer(UInt64), p_min : UInt64, p_max : UInt64, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_scalar(label : String, size : ImVec2, p_data : Pointer(Float32), p_min : Float32, p_max : Float32, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .v_slider_scalar(label : String, size : ImVec2, p_data : Pointer(Float64), p_min : Float64, p_max : Float64, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool
- .value(prefix : String, b : Bool) : Void
- .value(prefix : String, v : Int32) : Void
- .value(prefix : String, v : UInt32) : Void
- .value(prefix : String, v : Float32, float_format : String | Nil = nil) : Void
- .window(name : String, p_open : Pointer(Bool) = Pointer(Bool).null, flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0), &) : Nil
-
.with_button_repeat(repeat : Bool, &) : Nil
Calls
.push_button_repeat
, yields to the block, then calls.pop_button_repeat
. -
.with_clip_rect(clip_rect_min : ImVec2, clip_rect_max : ImVec2, intersect_with_current_clip_rect : Bool, &) : Nil
Calls
.push_clip_rect
, yields to the block, then calls.pop_clip_rect
. -
.with_font(font : ImFont, &) : Nil
Calls
.push_font
, yields to the block, then calls.pop_font
. - .with_id(str_id : String, &) : Nil
- .with_id(str_id : Bytes | String, &) : Nil
- .with_id(int_id : Int32, &) : Nil
- .with_id(ptr_id : Reference | ClassType | Int | Pointer(Void), &) : Nil
-
.with_item_width(item_width : Float32, &) : Nil
Calls
.push_item_width
, yields to the block, then calls.pop_item_width
. -
.with_style_color(idx : ImGuiCol, col : UInt32, &) : Nil
Calls
.push_style_color
, yields to the block, then calls.pop_style_color
. -
.with_style_color(idx : ImGuiCol, col : ImVec4, &) : Nil
Calls
.push_style_color
, yields to the block, then calls.pop_style_color
. -
.with_style_var(idx : ImGuiStyleVar, val : Float32, &) : Nil
Calls
.push_style_var
, yields to the block, then calls.pop_style_var
. -
.with_style_var(idx : ImGuiStyleVar, val : ImVec2, &) : Nil
Calls
.push_style_var
, yields to the block, then calls.pop_style_var
. -
.with_tab_stop(tab_stop : Bool, &) : Nil
Calls
.push_tab_stop
, yields to the block, then calls.pop_tab_stop
. -
.with_text_wrap_pos(wrap_local_pos_x : Float32 = 0.0, &) : Nil
Calls
.push_text_wrap_pos
, yields to the block, then calls.pop_text_wrap_pos
. -
.with_tree(str_id : String, &) : Nil
Calls
.tree_push
, yields to the block, then calls.tree_pop
. -
.with_tree(ptr_id : Reference | ClassType | Int | Pointer(Void), &) : Nil
Calls
.tree_push
, yields to the block, then calls.tree_pop
.
Macro Summary
- begin(*args, **kwargs, &block)
-
begin_popup_modal(*args, **kwargs, &block)
return true if the modal is open, and you can start outputting to it.
-
begin_tab_item(*args, **kwargs, &block)
create a Tab.
- checkbox(*args, **kwargs, &block)
- checkbox_flags(*args, **kwargs, &block)
-
collapsing_header(*args, **kwargs, &block)
when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right of the header which will set the bool to false when clicked, if '*p_visible==false' don't display the header.
- color_edit3(*args, **kwargs, &block)
- color_edit4(*args, **kwargs, &block)
- color_picker3(*args, **kwargs, &block)
- color_picker4(*args, **kwargs, &block)
- combo(*args, **kwargs, &block)
-
drag_float(*args, **kwargs, &block)
If v_min >= v_max we have no bound
- drag_float2(*args, **kwargs, &block)
- drag_float3(*args, **kwargs, &block)
- drag_float4(*args, **kwargs, &block)
- drag_float_range2(*args, **kwargs, &block)
-
drag_int(*args, **kwargs, &block)
If v_min >= v_max we have no bound
- drag_int2(*args, **kwargs, &block)
- drag_int3(*args, **kwargs, &block)
- drag_int4(*args, **kwargs, &block)
- drag_int_range2(*args, **kwargs, &block)
- drag_scalar(*args, **kwargs, &block)
- drag_scalar_n(*args, **kwargs, &block)
- get_allocator_functions(*args, **kwargs, &block)
- input_double(*args, **kwargs, &block)
- input_float(*args, **kwargs, &block)
- input_float2(*args, **kwargs, &block)
- input_float3(*args, **kwargs, &block)
- input_float4(*args, **kwargs, &block)
- input_int(*args, **kwargs, &block)
- input_int2(*args, **kwargs, &block)
- input_int3(*args, **kwargs, &block)
- input_int4(*args, **kwargs, &block)
- input_scalar(*args, **kwargs, &block)
- input_scalar_n(*args, **kwargs, &block)
- list_box(*args, **kwargs, &block)
-
menu_item(*args, **kwargs, &block)
return true when activated + toggle (*p_selected) if p_selected != NULL
-
popup_modal(*args, **kwargs, &block)
Calls
.begin_popup_modal
, conditionally yields to the block, then conditionally calls.end_popup
. -
radio_button(*args, **kwargs, &block)
shortcut to handle the above pattern when value is an integer
-
selectable(*args, **kwargs, &block)
"bool* p_selected" point to the selection state (read-write), as a convenient helper.
-
show_about_window(*args, **kwargs, &block)
create About window.
-
show_debug_log_window(*args, **kwargs, &block)
create Debug Log window.
-
show_demo_window(*args, **kwargs, &block)
create Demo window.
-
show_id_stack_tool_window(*args, **kwargs, &block)
create Stack Tool window.
-
show_metrics_window(*args, **kwargs, &block)
create Metrics/Debugger window.
- slider_angle(*args, **kwargs, &block)
-
slider_float(*args, **kwargs, &block)
adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display.
- slider_float2(*args, **kwargs, &block)
- slider_float3(*args, **kwargs, &block)
- slider_float4(*args, **kwargs, &block)
- slider_int(*args, **kwargs, &block)
- slider_int2(*args, **kwargs, &block)
- slider_int3(*args, **kwargs, &block)
- slider_int4(*args, **kwargs, &block)
- slider_scalar(*args, **kwargs, &block)
- slider_scalar_n(*args, **kwargs, &block)
-
tab_item(*args, **kwargs, &block)
Calls
.begin_tab_item
, conditionally yields to the block, then conditionally calls.end_tab_item
. - v_slider_float(*args, **kwargs, &block)
- v_slider_int(*args, **kwargs, &block)
- v_slider_scalar(*args, **kwargs, &block)
- window(*args, **kwargs, &block)
Class Method Detail
accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the payload before the mouse button is released.
vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items (call if you have text on a line before a framed item)
square button with an arrow shape
call after submitting an item which may be dragged. when this return true, you can call SetDragDropPayload() + EndDragDropSource()
call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget()
open a framed scrolling region
return true if the popup is open, and you can start outputting to it.
open+begin popup when clicked on last item. Use str_id==NULL to associate the popup to previous item. If you want to use that on a non-interactive item such as Text() you need to pass in an explicit ID here. read comments in .cpp!
open+begin popup when clicked in void (where there are no windows).
open+begin popup when clicked on current window.
return true if the modal is open, and you can start outputting to it.
create and append into a TabBar
create a Tab. Returns true if the Tab is selected.
draw a small circle + keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
button
width of item given pushed settings and current cursor position. NOT necessarily the width of last item unlike most 'Item' functions.
Calls .begin_child
, conditionally yields to the block, then calls .end_child
.
Calls .begin_child
, conditionally yields to the block, then calls .end_child
.
if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop().
when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right of the header which will set the bool to false when clicked, if '*p_visible==false' don't display the header.
display a color square/button, hover for details, return true when pressed.
Calls .begin_combo
, conditionally yields to the block, then conditionally calls .end_combo
.
Separate items with \0 within a string, end item-list with \0\0. e.g. "One\0Two\0Three\0"
This is called by IMGUI_CHECKVERSION() macro.
NULL = destroy current context
Calls .begin_disabled
, yields to the block, then calls .end_disabled
.
Calls .begin_drag_drop_source
, conditionally yields to the block, then conditionally calls .end_drag_drop_source
.
Calls .begin_drag_drop_target
, conditionally yields to the block, then conditionally calls .end_drag_drop_target
.
If v_min >= v_max we have no bound
If v_min >= v_max we have no bound
add a dummy item of given size. unlike InvisibleButton(), Dummy() won't take the mouse click or be navigable into.
only call EndDragDropSource() if BeginDragDropSource() returns true!
only call EndDragDropTarget() if BeginDragDropTarget() returns true!
ends the Dear ImGui frame. automatically called by Render(). If you don't need to render data (skipping rendering) you may call EndFrame() without Render()... but you'll have wasted CPU already! If you don't need to render, better to not create any windows and not call NewFrame() at all!
unlock horizontal starting position + capture the whole group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns true!
this draw list will be the first rendered one. Useful to quickly draw shapes/text behind dear imgui contents.
retrieve given style color with style alpha applied and optional extra alpha multiplier, packed as a 32-bit value suitable for ImDrawList
retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
get position of column line (in pixels, from the left side of the contents region). pass -1 to use current column, otherwise 0..GetColumnsCount() inclusive. column 0 is typically 0.0f
get column width (in pixels). pass -1 to use current column
current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates
[window-local] cursor position in window coordinates (relative to window position)
cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).
[window-local] initial cursor position, in window coordinates
peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or inactive. use ImGuiPayload::IsDataType() to test for the payload type.
valid after Render() and until the next call to NewFrame(). this is what you have to render.
get current font size (= height in pixels) of current font with current scale applied
get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API
this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.
~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets)
calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself
access the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)
get ID of last item (~~ often same ImGui::GetID(label) beforehand)
get lower-right bounding rectangle of the last item (screen space)
get upper-left bounding rectangle of the last item (screen space)
[DEBUG] returns English name of the key. Those names a provided for debugging purpose and are not meant to be saved persistently not compared.
uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate
return primary/default viewport. This can never be NULL.
return the number of successive mouse-clicks at the time where a click happen (otherwise 0).
get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you
return the delta from the initial clicking position while the mouse button is pressed or was just released. This is locked and return 0.0f until the mouse moves past a distance threshold at least once (if lock_threshold < -1.0f, uses io.MouseDraggingThreshold)
shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
retrieve mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user backing that value themselves)
get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x
get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - DecorationsSize.y
access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style mid-frame!
get a string corresponding to the enum value (for display, saving, etc.).
retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(), otherwise use GetColorU32() to get style color with style alpha baked in.
~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)
horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode
get the compiled version string e.g. "1.80 WIP" (essentially the value for IMGUI_VERSION from the compiled version of imgui.cpp)
content boundaries max for the full window (roughly (0,0)+Size-Scroll) where Size can be overridden with SetNextWindowContentSize(), in window coordinates
content boundaries min for the full window (roughly (0,0)-Scroll), in window coordinates
get draw list associated to the current window, to append your own drawing primitives
get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetCursorScreenPos())
get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead)
move content position toward the right, by indent_w, or style.IndentSpacing if indent_w <= 0
flexible button behavior without the visuals, frequently useful to build custom behaviors using the public api (along with IsItemActive, IsItemHovered, etc.)
[WILL OBSOLETE] is any mouse button held? This was designed for backends, but prefer having backend maintain a mask of held mouse buttons, because upcoming input queue system will make this invalid.
was the last item just made active (item was previously inactive).
is the last item active? (e.g. button being held, text field being edited. This will continuously return true while holding mouse button on an item. Items that don't interact will always return false)
is the last item hovered and mouse clicked on? () == IsMouseClicked(mouse_button) && IsItemHovered()Important. () this is NOT equivalent to the behavior of e.g. Button(). Read comments in function definition.
was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that require continuous editing.
was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag moved). Useful for Undo/Redo patterns with widgets that require continuous editing. Note that you may get false positives (some widgets such as Combo()/ListBox()/Selectable() will return true even when clicking an already selected item).
did the last item modify its underlying value this frame? or was pressed? This is generally the same as the "bool" return value of many widgets.
is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for more options.
is the last item visible? (items may be out of sight because of clipping/scrolling)
was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord. This doesn't do any routing or focus check, please consider using Shortcut() function instead.
was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate
was key released (went from Down to !Down)?
did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1.
did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will also report IsMouseClicked() == true)
is mouse dragging? (if lock_threshold < -1.0f, uses io.MouseDraggingThreshold)
is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block.
by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse available
did mouse button released? (went from Down to !Down)
return true if the popup is open.
test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
test if rectangle (of given size, starting from cursor position) is visible / not clipped.
is current window focused? or its root/child, depending on flags. see flags for options.
is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for options. IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app, you should not use this function! Use the 'io.WantCaptureMouse' boolean for that! Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details.
display text+label aligned the same way as value+label widgets
Calls .begin_list_box
, conditionally yields to the block, then conditionally calls .end_list_box
.
call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls LoadIniSettingsFromDisk(io.IniFilename).
call after CreateContext() and before the first call to NewFrame() to provide .ini data from your own data source.
pass text data straight to log (without being displayed)
start logging to file
start a new Dear ImGui frame, you can submit any command from this point until Render()/EndFrame().
undo a SameLine() or force a new line when in a horizontal-layout context.
next column, defaults to current row or next row if the current row is finished
call to mark popup as open (don't call every frame!).
id overload to facilitate calling from nested stacks
helper to open popup when clicked on last item. Default to ImGuiPopupFlags_MouseButtonRight == 1. (note: actually triggers on the mouse released event to be consistent with popup behaviors)
Calls .begin_popup
, conditionally yields to the block, then conditionally calls .end_popup
.
Calls .begin_popup_context_item
, conditionally yields to the block, then conditionally calls .end_popup
.
Calls .begin_popup_context_void
, conditionally yields to the block, then conditionally calls .end_popup
.
Calls .begin_popup_context_window
, conditionally yields to the block, then conditionally calls .end_popup
.
Calls .begin_popup_modal
, conditionally yields to the block, then conditionally calls .end_popup
.
in 'repeat' mode, Button*() functions return repeated true in a typematic manner (using io.KeyRepeatDelay/io.KeyRepeatRate setting). Note that you can call IsItemActive() after any Button() to tell if the button is held in the current frame.
use NULL as a shortcut to push default font
push string into the ID stack (will hash string).
push pointer into the ID stack (will hash pointer).
push width of items for common large "item+label" widgets. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -FLT_MIN always align width to the right side).
modify a style color. always use this if you modify the style after NewFrame().
modify a style float variable. always use this if you modify the style after NewFrame().
modify a style ImVec2 variable. always use this if you modify the style after NewFrame().
== tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets
push word-wrapping position for Text*() commands. < 0.0f: no wrapping; 0.0f: wrap to end of window (or column); > 0.0f: wrap at 'wrap_pos_x' position in window local space
shortcut to handle the above pattern when value is an integer
use with e.g. if (RadioButton("one", my_value==1)) { my_value = 1; }
ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData().
call between widgets or groups to layout them horizontally. X position given in window coordinates.
this is automatically called (if io.IniFilename is not empty) a few seconds after any modification that should be reflected in the .ini file (and also by DestroyContext).
return a zero-terminated string with the .ini data which you can save by your own mean. call when io.WantSaveIniSettings is set, then save data by your own mean and clear io.WantSaveIniSettings.
"bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you can modify your selection state. size.x==0.0: use remaining width, size.x>0.0: specify width. size.y==0.0: use label height, size.y>0.0: specify height
"bool* p_selected" point to the selection state (read-write), as a convenient helper.
separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.
initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls.
set position of column line (in pixels, from the left side of the contents region). pass -1 to use current column
set column width (in pixels). pass -1 to use current column
[window-local] "
cursor position in absolute coordinates
type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui. Return true when payload has been accepted.
set a text-only tooltip if preceeding item was hovered. override any previous call to SetTooltip().
focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use -1 to access previous widget.
Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard"; after the next NewFrame() call.
Override io.WantCaptureMouse flag next frame (said flag is left for your application to handle, typical when true it instucts your app to ignore inputs). This is equivalent to setting "io.WantCaptureMouse = want_capture_mouse;" after the next NewFrame() call.
allow next item to be overlapped by a subsequent item. Useful with invisible buttons, selectable, treenode covering an area where subsequent items may need to be added. Note that both Selectable() and TreeNode() have dedicated flags doing this.
set next TreeNode/CollapsingHeader open state.
set width of the next common large "item+label" widget. >0.0f: width in pixels, <0.0f align xx pixels to the right of window (so -FLT_MIN always align width to the right side)
set next window background color alpha. helper to easily override the Alpha component of ImGuiCol_WindowBg/ChildBg/PopupBg. you may also use ImGuiWindowFlags_NoBackground.
set next window collapsed state. call before Begin()
set next window content size (~ scrollable client area, which enforce the range of scrollbars). Not including window decorations (title bar, menu bar, etc.) nor WindowPadding. set an axis to 0.0f to leave it automatic. call before Begin()
set next window to be focused / top-most. call before Begin()
set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc.
set next window scrolling value (use < 0.0f to not affect a given axis).
set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin()
set next window size limits. use 0.0f or FLT_MAX if you don't want limits. Use -1 for both min and max of same axis to preserve current size (which itself is a constraint). Use callback to apply non-trivial programmatic constraints.
adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position.
adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position.
adjust scrolling amount to make current cursor position visible. center_x_ratio=0.0: left, 0.5: center, 1.0: right. When using to make a "default/current item" visible, consider using SetItemDefaultFocus() instead.
adjust 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 SetItemDefaultFocus() instead.
replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)
notify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on reorderable tab bars). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise call with a window name.
set a text-only tooltip. Often used after a ImGui::IsItemHovered() check. Override any previous call to SetTooltip().
(not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed().
set named window collapsed state
set named window to be focused / top-most. use NULL to remove focus.
(not recommended) set current window to be focused / top-most. prefer using SetNextWindowFocus().
[OBSOLETE] set font scale. Adjust IO.FontGlobalScale if you want to scale all windows. This is an old API! For correct scaling, prefer to reload font + rebuild ImFontAtlas + call style.ScaleAllSizes().
(not recommended) set current window position - call within Begin()/End(). prefer using SetNextWindowPos(), as this may incur tearing and side-effects.
set named window position.
(not recommended) set current window size - call within Begin()/End(). set to ImVec2(0, 0) to force an auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects.
set named window size. set axis to 0.0f to force an auto-fit on this axis.
create About window. display Dear ImGui version, credits and build/system information.
create Debug Log window. display a simplified log of important dear imgui events.
create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
add font selector block (not a window), essentially a combo listing the loaded fonts.
create Stack Tool window. hover items with mouse to query information about the source of their unique ID.
create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.
add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
add style selector block (not a window), essentially a combo listing the default styles.
add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard controls).
adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display.
button with (FramePadding.y == 0) to easily embed within text
classic imgui style
new, recommended style (default)
best used with borders and a custom, thicker font
Calls .begin_tab_bar
, conditionally yields to the block, then conditionally calls .end_tab_bar
.
Calls .begin_tab_item
, conditionally yields to the block, then conditionally calls .end_tab_item
.
create a Tab behaving like a button. return true when clicked. cannot be selected in the tab bar.
Calls .begin_table
, conditionally yields to the block, then conditionally calls .end_table
.
submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST BE FIRST ROW.
return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column.
return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column.
get latest sort specs for the table (NULL if not sorting). Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable().
submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu
append into the next column (or first column of next row if currently in last column). Return true when column is visible.
append into the first cell of a new row.
change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.
change user accessible enabled/disabled state of a column. Set to false to hide the column. User can use the context menu to change this themselves (right-click in headers, or right-click in columns body with ImGuiTableFlags_ContextMenuInBody)
append into the specified column. Return true when column is visible.
lock columns/rows so they stay visible when scrolled.
shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor();
shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); PopStyleColor();
raw text without formatting. Roughly equivalent to Text("%s", text) but: A) doesn't require null terminated string if 'text_end' is specified, B) it's faster, no memory copy is done, no buffer size limits, recommended for long chunks of text.
shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size using SetNextWindowSize().
Calls .begin_tooltip
, conditionally yields to the block, then calls .end_tooltip
.
helper variation to easily decorelate the id from the displayed string. Read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet().
Calls .tree_node
, conditionally yields to the block, then conditionally calls .tree_pop
.
Calls .tree_node
, conditionally yields to the block, then conditionally calls .tree_pop
.
Calls .tree_node
, conditionally yields to the block, then conditionally calls .tree_pop
.
Calls .tree_node_ex
, conditionally yields to the block, then conditionally calls .tree_pop
.
Calls .tree_node_ex
, conditionally yields to the block, then conditionally calls .tree_pop
.
Calls .tree_node_ex
, conditionally yields to the block, then conditionally calls .tree_pop
.
~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.
move content position back to the left, by indent_w, or style.IndentSpacing if indent_w <= 0
Calls .push_button_repeat
, yields to the block, then calls .pop_button_repeat
.
Calls .push_clip_rect
, yields to the block, then calls .pop_clip_rect
.
Calls .push_font
, yields to the block, then calls .pop_font
.
Calls .push_item_width
, yields to the block, then calls .pop_item_width
.
Calls .push_style_color
, yields to the block, then calls .pop_style_color
.
Calls .push_style_color
, yields to the block, then calls .pop_style_color
.
Calls .push_style_var
, yields to the block, then calls .pop_style_var
.
Calls .push_style_var
, yields to the block, then calls .pop_style_var
.
Calls .push_tab_stop
, yields to the block, then calls .pop_tab_stop
.
Calls .push_text_wrap_pos
, yields to the block, then calls .pop_text_wrap_pos
.
Calls .tree_push
, yields to the block, then calls .tree_pop
.
Calls .tree_push
, yields to the block, then calls .tree_pop
.
Macro Detail
return true if the modal is open, and you can start outputting to it.
when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right of the header which will set the bool to false when clicked, if '*p_visible==false' don't display the header.
Calls .begin_popup_modal
, conditionally yields to the block, then conditionally calls .end_popup
.
shortcut to handle the above pattern when value is an integer
"bool* p_selected" point to the selection state (read-write), as a convenient helper.
create About window. display Dear ImGui version, credits and build/system information.
create Debug Log window. display a simplified log of important dear imgui events.
create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
create Stack Tool window. hover items with mouse to query information about the source of their unique ID.
create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.
adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display.
Calls .begin_tab_item
, conditionally yields to the block, then conditionally calls .end_tab_item
.