module ImGui

Included Modules

Defined in:

custom.cr
imgui.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

Macro Summary

Class Method Detail

def self.accept_drag_drop_payload(type : String, flags : ImGuiDragDropFlags = ImGuiDragDropFlags.new(0)) : ImGuiPayload | Nil #

accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the payload before the mouse button is released.

ImGui::AcceptDragDropPayload()


[View source]
def self.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)

ImGui::AlignTextToFramePadding()


[View source]
def self.arrow_button(str_id : String, dir : ImGuiDir) : Bool #

square button with an arrow shape

ImGui::ArrowButton()


[View source]
def self.begin(name : String, p_open : Pointer(Bool) = Pointer(Bool).null, flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0)) : Bool #

[View source]
def self.begin_child(str_id : String, size : ImVec2 = ImVec2.new(0, 0), child_flags : ImGuiChildFlags = ImGuiChildFlags.new(0), window_flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0)) : Bool #

[View source]
def self.begin_child(id : ImGuiID, size : ImVec2 = ImVec2.new(0, 0), child_flags : ImGuiChildFlags = ImGuiChildFlags.new(0), window_flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0)) : Bool #

[View source]
def self.begin_combo(label : String, preview_value : String, flags : ImGuiComboFlags = ImGuiComboFlags.new(0)) : Bool #

[View source]
def self.begin_disabled(disabled : Bool = true) : Void #

[View source]
def self.begin_drag_drop_source(flags : ImGuiDragDropFlags = ImGuiDragDropFlags.new(0)) : Bool #

call after submitting an item which may be dragged. when this return true, you can call SetDragDropPayload() + EndDragDropSource()

ImGui::BeginDragDropSource()


[View source]
def self.begin_drag_drop_target : Bool #

call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload() + EndDragDropTarget()

ImGui::BeginDragDropTarget()


[View source]
def self.begin_group : Void #

lock horizontal starting position

ImGui::BeginGroup()


[View source]
def self.begin_item_tooltip : Bool #

begin/append a tooltip window if preceding item was hovered.

ImGui::BeginItemTooltip()


[View source]
def self.begin_list_box(label : String, size : ImVec2 = ImVec2.new(0, 0)) : Bool #

open a framed scrolling region

ImGui::BeginListBox()


[View source]
def self.begin_main_menu_bar : Bool #

create and append to a full screen menu-bar.

ImGui::BeginMainMenuBar()


[View source]
def self.begin_menu(label : String, enabled : Bool = true) : Bool #

create a sub-menu entry. only call EndMenu() if this returns true!

ImGui::BeginMenu()


[View source]
def self.begin_menu_bar : Bool #

append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window).

ImGui::BeginMenuBar()


[View source]
def self.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.

ImGui::BeginPopup()


[View source]
def self.begin_popup_context_item(str_id : String | Nil = nil, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(1)) : Bool #

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!

ImGui::BeginPopupContextItem()


[View source]
def self.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).

ImGui::BeginPopupContextVoid()


[View source]
def self.begin_popup_context_window(str_id : String | Nil = nil, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(1)) : Bool #

open+begin popup when clicked on current window.

ImGui::BeginPopupContextWindow()


[View source]
def self.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.

ImGui::BeginPopupModal()


[View source]
def self.begin_tab_bar(str_id : String, flags : ImGuiTabBarFlags = ImGuiTabBarFlags.new(0)) : Bool #

create and append into a TabBar

ImGui::BeginTabBar()


[View source]
def self.begin_tab_item(label : String, p_open : Pointer(Bool) = Pointer(Bool).null, flags : ImGuiTabItemFlags = ImGuiTabItemFlags.new(0)) : Bool #

create a Tab. Returns true if the Tab is selected.

ImGui::BeginTabItem()


[View source]
def self.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 #

[View source]
def self.begin_tooltip : Bool #

begin/append a tooltip window.

ImGui::BeginTooltip()


[View source]
def self.bullet : Void #

draw a small circle + keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses

ImGui::Bullet()


[View source]
def self.bullet_text(fmt : String, *args) : Void #

shortcut for Bullet()+Text()

ImGui::BulletText()


[View source]
def self.button(label : String, size : ImVec2 = ImVec2.new(0, 0)) : Bool #

[View source]
def self.calc_item_width : Float32 #

width of item given pushed settings and current cursor position. NOT necessarily the width of last item unlike most 'Item' functions.

ImGui::CalcItemWidth()


[View source]
def self.calc_text_size(text : Bytes | String, hide_text_after_double_hash : Bool = false, wrap_width : Float32 = -1.0) : ImGui::ImVec2 #

[View source]
def self.checkbox(label : String, v : Pointer(Bool)) : Bool #

[View source]
def self.checkbox_flags(label : String, flags : Pointer(Int32), flags_value : Int32) : Bool #

[View source]
def self.checkbox_flags(label : String, flags : Pointer(UInt32), flags_value : UInt32) : Bool #

[View source]
def self.checkbox_flags(label : String, flags : Pointer(T), flags_value : T) : Bool forall T #

[View source]
def self.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.


[View source]
def self.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.


[View source]
def self.close_current_popup : Void #

manually close the popup we have begin-ed into.

ImGui::CloseCurrentPopup()


[View source]
def self.col32(r : Int, g : Int, b : Int, a : Int = 255) : UInt32 #

[View source]
def self.col32(color : ImVec4) : UInt32 #

[View source]
def self.collapsing_header(label : String, flags : ImGuiTreeNodeFlags = ImGuiTreeNodeFlags.new(0)) : Bool #

if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop().

ImGui::CollapsingHeader()


[View source]
def self.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.

ImGui::CollapsingHeader()


[View source]
def self.color(r : Int, g : Int, b : Int, a : Int = 255) : ImVec4 #

[View source]
def self.color(col32 : UInt32) : ImVec4 #

[View source]
def self.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.

ImGui::ColorButton()


[View source]
def self.color_convert_float4_to_u32(in_ : ImVec4) : UInt32 #

[View source]
def self.color_convert_hsv_to_rgb(h : Float32, s : Float32, v : Float32) : Tuple(LibC::Float, LibC::Float, LibC::Float) #

[View source]
def self.color_convert_rgb_to_hsv(r : Float32, g : Float32, b : Float32) : Tuple(LibC::Float, LibC::Float, LibC::Float) #

[View source]
def self.color_convert_u32_to_float4(in_ : UInt32) : ImGui::ImVec4 #

[View source]
def self.color_edit3(label : String, col : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), flags : ImGuiColorEditFlags = ImGuiColorEditFlags.new(0)) : Bool #

[View source]
def self.color_edit4(label : String, col : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), flags : ImGuiColorEditFlags = ImGuiColorEditFlags.new(0)) : Bool #

[View source]
def self.color_picker3(label : String, col : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), flags : ImGuiColorEditFlags = ImGuiColorEditFlags.new(0)) : Bool #

[View source]
def self.color_picker4(label : String, col : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), flags : ImGuiColorEditFlags = ImGuiColorEditFlags.new(0), ref_col : Pointer(Float32) = Pointer(Float32).null) : Bool #

[View source]
def self.columns(count : Int32 = 1, id : String | Nil = nil, border : Bool = true) : Void #

[View source]
def self.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.


[View source]
def self.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 #

[View source]
def self.combo(label : String, current_item : Pointer(Int32) | Pointer, items : Indexable(Pointer(LibC::Char)), popup_max_height_in_items : Int32 = -1) : Bool #

[View source]
def self.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. e.g. "One\0Two\0Three\0"

ImGui::Combo()


[View source]
def self.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 #

def self.combo(label : String, current_item : Pointer(Int32) | Pointer, items : Indexable(String), popup_max_height_in_items : Int32 = -1) #

[View source]
def self.create_context(shared_font_atlas : ImFontAtlas | Nil = nil) : ImGuiContext #

[View source]
def self.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.

ImGui::DebugCheckVersionAndDataLayout()


[View source]
def self.debug_flash_style_color(idx : ImGuiCol) : Void #

[View source]
def self.debug_start_item_picker : Void #

[View source]
def self.debug_text_encoding(text : String) : Void #

[View source]
def self.destroy_context(ctx : ImGuiContext | Nil = nil) : Void #

NULL = destroy current context

ImGui::DestroyContext()


[View source]
def self.disabled(disabled : Bool = true, &) : Nil #

Calls .begin_disabled, yields to the block, then calls .end_disabled.


[View source]
def self.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.


[View source]
def self.drag_drop_target(&) : Nil #

Calls .begin_drag_drop_target, conditionally yields to the block, then conditionally calls .end_drag_drop_target.


[View source]
def self.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

ImGui::DragFloat()


[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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

ImGui::DragInt()


[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.dummy(size : ImVec2) : Void #

add a dummy item of given size. unlike InvisibleButton(), Dummy() won't take the mouse click or be navigable into.

ImGui::Dummy()


[View source]
def self.end : Void #

[View source]
def self.end_child : Void #

[View source]
def self.end_combo : Void #

only call EndCombo() if BeginCombo() returns true!

ImGui::EndCombo()


[View source]
def self.end_disabled : Void #

[View source]
def self.end_drag_drop_source : Void #

only call EndDragDropSource() if BeginDragDropSource() returns true!

ImGui::EndDragDropSource()


[View source]
def self.end_drag_drop_target : Void #

only call EndDragDropTarget() if BeginDragDropTarget() returns true!

ImGui::EndDragDropTarget()


[View source]
def self.end_frame : Void #

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!

ImGui::EndFrame()


[View source]
def self.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.)

ImGui::EndGroup()


[View source]
def self.end_list_box : Void #

only call EndListBox() if BeginListBox() returned true!

ImGui::EndListBox()


[View source]
def self.end_main_menu_bar : Void #

only call EndMainMenuBar() if BeginMainMenuBar() returns true!

ImGui::EndMainMenuBar()


[View source]
def self.end_menu : Void #

only call EndMenu() if BeginMenu() returns true!

ImGui::EndMenu()


[View source]
def self.end_menu_bar : Void #

only call EndMenuBar() if BeginMenuBar() returns true!

ImGui::EndMenuBar()


[View source]
def self.end_popup : Void #

only call EndPopup() if BeginPopupXXX() returns true!

ImGui::EndPopup()


[View source]
def self.end_tab_bar : Void #

only call EndTabBar() if BeginTabBar() returns true!

ImGui::EndTabBar()


[View source]
def self.end_tab_item : Void #

only call EndTabItem() if BeginTabItem() returns true!

ImGui::EndTabItem()


[View source]
def self.end_table : Void #

only call EndTable() if BeginTable() returns true!

ImGui::EndTable()


[View source]
def self.end_tooltip : Void #

only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns true!

ImGui::EndTooltip()


[View source]
def self.get_allocator_functions(p_alloc_func : Pointer(ImGuiMemAllocFunc), p_free_func : Pointer(ImGuiMemFreeFunc), p_user_data : Pointer(Pointer(Void))) : Void #

[View source]
def self.get_background_draw_list : ImDrawList #

this draw list will be the first rendered one. Useful to quickly draw shapes/text behind dear imgui contents.

ImGui::GetBackgroundDrawList()


[View source]
def self.get_clipboard_text : String #

[View source]
def self.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

ImGui::GetColorU32()


[View source]
def self.get_color_u32(col : ImVec4) : UInt32 #

retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList

ImGui::GetColorU32()


[View source]
def self.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

ImGui::GetColorU32()


[View source]
def self.get_column_index : Int32 #

get current column index

ImGui::GetColumnIndex()


[View source]
def self.get_column_offset(column_index : Int32 = -1) : Float32 #

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

ImGui::GetColumnOffset()


[View source]
def self.get_column_width(column_index : Int32 = -1) : Float32 #

get column width (in pixels). pass -1 to use current column

ImGui::GetColumnWidth()


[View source]
def self.get_columns_count : Int32 #

[View source]
def self.get_content_region_avail : ImGui::ImVec2 #

== GetContentRegionMax() - GetCursorPos()

ImGui::GetContentRegionAvail()


[View source]
def self.get_content_region_max : ImGui::ImVec2 #

current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates

ImGui::GetContentRegionMax()


[View source]
def self.get_current_context : ImGuiContext #

[View source]
def self.get_cursor_pos : ImGui::ImVec2 #

[window-local] cursor position in window coordinates (relative to window position)

ImGui::GetCursorPos()


[View source]
def self.get_cursor_pos_x : Float32 #

[window-local] "

ImGui::GetCursorPosX()


[View source]
def self.get_cursor_pos_y : Float32 #

[window-local] "

ImGui::GetCursorPosY()


[View source]
def self.get_cursor_screen_pos : ImGui::ImVec2 #

cursor position in absolute coordinates (prefer using this, also more useful to work with ImDrawList API).

ImGui::GetCursorScreenPos()


[View source]
def self.get_cursor_start_pos : ImGui::ImVec2 #

[window-local] initial cursor position, in window coordinates

ImGui::GetCursorStartPos()


[View source]
def self.get_drag_drop_payload : ImGuiPayload | Nil #

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.

ImGui::GetDragDropPayload()


[View source]
def self.get_draw_data : ImDrawData #

valid after Render() and until the next call to NewFrame(). this is what you have to render.

ImGui::GetDrawData()


[View source]
def self.get_draw_list_shared_data : ImDrawListSharedData #

you may use this when creating your own ImDrawList instances.

ImGui::GetDrawListSharedData()


[View source]
def self.get_font : ImFont #

get current font

ImGui::GetFont()


[View source]
def self.get_font_size : Float32 #

get current font size (= height in pixels) of current font with current scale applied

ImGui::GetFontSize()


[View source]
def self.get_font_tex_uv_white_pixel : ImGui::ImVec2 #

get UV coordinate for a while pixel, useful to draw custom shapes via the ImDrawList API

ImGui::GetFontTexUvWhitePixel()


[View source]
def self.get_foreground_draw_list : ImDrawList #

this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.

ImGui::GetForegroundDrawList()


[View source]
def self.get_frame_count : Int32 #

get global imgui frame count. incremented by 1 every frame.

ImGui::GetFrameCount()


[View source]
def self.get_frame_height : Float32 #

~ FontSize + style.FramePadding.y * 2

ImGui::GetFrameHeight()


[View source]
def self.get_frame_height_with_spacing : Float32 #

~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets)

ImGui::GetFrameHeightWithSpacing()


[View source]
def self.get_id(str_id : String) : ImGuiID #

calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself

ImGui::GetID()


[View source]
def self.get_id(str_id : Bytes | String) : ImGuiID #

[View source]
def self.get_id(int_id : Int) : ImGuiID #

[View source]
def self.get_id(ptr_id : Reference | ClassType | Int | Pointer(Void)) : ImGuiID #

[View source]
def self.get_io : ImGuiIO #

access the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)

ImGui::GetIO()


[View source]
def self.get_item_id : ImGuiID #

get ID of last item (~~ often same ImGui::GetID(label) beforehand)

ImGui::GetItemID()


[View source]
def self.get_item_rect_max : ImGui::ImVec2 #

get lower-right bounding rectangle of the last item (screen space)

ImGui::GetItemRectMax()


[View source]
def self.get_item_rect_min : ImGui::ImVec2 #

get upper-left bounding rectangle of the last item (screen space)

ImGui::GetItemRectMin()


[View source]
def self.get_item_rect_size : ImGui::ImVec2 #

get size of last item

ImGui::GetItemRectSize()


[View source]
def self.get_key_name(key : ImGuiKey) : String #

[DEBUG] returns English name of the key. Those names a provided for debugging purpose and are not meant to be saved persistently not compared.

ImGui::GetKeyName()


[View source]
def self.get_key_pressed_amount(key : ImGuiKey, repeat_delay : Float32, rate : Float32) : Int32 #

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

ImGui::GetKeyPressedAmount()


[View source]
def self.get_main_viewport : ImGuiViewport #

return primary/default viewport. This can never be NULL.

ImGui::GetMainViewport()


[View source]
def self.get_mouse_clicked_count(button : ImGuiMouseButton) : Int32 #

return the number of successive mouse-clicks at the time where a click happen (otherwise 0).

ImGui::GetMouseClickedCount()


[View source]
def self.get_mouse_cursor : ImGuiMouseCursor #

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

ImGui::GetMouseCursor()


[View source]
def self.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. 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)

ImGui::GetMouseDragDelta()


[View source]
def self.get_mouse_pos : ImGui::ImVec2 #

shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls

ImGui::GetMousePos()


[View source]
def self.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)

ImGui::GetMousePosOnOpeningCurrentPopup()


[View source]
def self.get_rgba(color : ImVec4) : Tuple(UInt8, UInt8, UInt8, UInt8) #

[View source]
def self.get_scroll_max_x : Float32 #

get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x

ImGui::GetScrollMaxX()


[View source]
def self.get_scroll_max_y : Float32 #

get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - DecorationsSize.y

ImGui::GetScrollMaxY()


[View source]
def self.get_scroll_x : Float32 #

get scrolling amount [0 .. GetScrollMaxX()]

ImGui::GetScrollX()


[View source]
def self.get_scroll_y : Float32 #

get scrolling amount [0 .. GetScrollMaxY()]

ImGui::GetScrollY()


[View source]
def self.get_state_storage : ImGuiStorage #

[View source]
def self.get_style : ImGuiStyle #

access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style mid-frame!

ImGui::GetStyle()


[View source]
def self.get_style_color_name(idx : ImGuiCol) : String #

get a string corresponding to the enum value (for display, saving, etc.).

ImGui::GetStyleColorName()


[View source]
def self.get_style_color_vec4(idx : ImGuiCol) : ImVec4 #

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.

ImGui::GetStyleColorVec4()


[View source]
def self.get_text_line_height : Float32 #

[View source]
def self.get_text_line_height_with_spacing : Float32 #

~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)

ImGui::GetTextLineHeightWithSpacing()


[View source]
def self.get_time : Float64 #

get global imgui time. incremented by io.DeltaTime every frame.

ImGui::GetTime()


[View source]
def self.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

ImGui::GetTreeNodeToLabelSpacing()


[View source]
def self.get_version : String #

get the compiled version string e.g. "1.80 WIP" (essentially the value for IMGUI_VERSION from the compiled version of imgui.cpp)

ImGui::GetVersion()


[View source]
def self.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

ImGui::GetWindowContentRegionMax()


[View source]
def self.get_window_content_region_min : ImGui::ImVec2 #

content boundaries min for the full window (roughly (0,0)-Scroll), in window coordinates

ImGui::GetWindowContentRegionMin()


[View source]
def self.get_window_draw_list : ImDrawList #

get draw list associated to the current window, to append your own drawing primitives

ImGui::GetWindowDrawList()


[View source]
def self.get_window_height : Float32 #

get current window height (shortcut for GetWindowSize().y)

ImGui::GetWindowHeight()


[View source]
def self.get_window_pos : ImGui::ImVec2 #

get current window position in screen space (note: it is unlikely you need to use this. Consider using current layout pos instead, GetCursorScreenPos())

ImGui::GetWindowPos()


[View source]
def self.get_window_size : ImGui::ImVec2 #

get current window size (note: it is unlikely you need to use this. Consider using GetCursorScreenPos() and e.g. GetContentRegionAvail() instead)

ImGui::GetWindowSize()


[View source]
def self.get_window_width : Float32 #

get current window width (shortcut for GetWindowSize().x)

ImGui::GetWindowWidth()


[View source]
def self.group(&) : Nil #

Calls .begin_group, yields to the block, then calls .end_group.


[View source]
def self.hsv(h : Number, s : Number, v : Number, a : Number = 1.0) : ImVec4 #

[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.indent(indent_w : Float32 = 0.0) : Void #

move content position toward the right, by indent_w, or style.IndentSpacing if indent_w <= 0

ImGui::Indent()


[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.input_float2(label : String, v : Pointer(ImVec2) | Indexable(Float32) | Pointer(Float32), format : String = "%.3f", flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool #

[View source]
def self.input_float3(label : String, v : Indexable(Float32) | Pointer(Float32), format : String = "%.3f", flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool #

[View source]
def self.input_float4(label : String, v : Pointer(ImVec4) | Indexable(Float32) | Pointer(Float32), format : String = "%.3f", flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool #

[View source]
def self.input_int(label : String, v : Pointer(Int32), step : Int32 = 1, step_fast : Int32 = 100, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool #

[View source]
def self.input_int2(label : String, v : Indexable(Int32) | Pointer(Int32), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool #

[View source]
def self.input_int3(label : String, v : Indexable(Int32) | Pointer(Int32), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool #

[View source]
def self.input_int4(label : String, v : Indexable(Int32) | Pointer(Int32), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool #

[View source]
def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.input_text(label : String, buf : Bytes, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0), callback : ImGuiInputTextCallback | Nil = nil, user_data : Pointer(Void) = Pointer(Void).null) : Bool #

[View source]
def self.input_text(label : String, buf : TextBuffer, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0), &block : ImGuiInputTextCallbackData -> Int32) : Bool #

[View source]
def self.input_text(label : String, buf : TextBuffer, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool #

[View source]
def self.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 #

[View source]
def self.input_text_multiline(label : String, buf : TextBuffer, size : ImVec2 = ImVec2.new(0, 0), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0), &block : ImGuiInputTextCallbackData -> Int32) : Bool #

[View source]
def self.input_text_multiline(label : String, buf : TextBuffer, size : ImVec2 = ImVec2.new(0, 0), flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool #

[View source]
def self.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 #

[View source]
def self.input_text_with_hint(label : String, hint : String, buf : TextBuffer, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0), &block : ImGuiInputTextCallbackData -> Int32) : Bool #

[View source]
def self.input_text_with_hint(label : String, hint : String, buf : TextBuffer, flags : ImGuiInputTextFlags = ImGuiInputTextFlags.new(0)) : Bool #

[View source]
def self.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.)

ImGui::InvisibleButton()


[View source]
def self.is_any_item_active : Bool #

is any item active?

ImGui::IsAnyItemActive()


[View source]
def self.is_any_item_focused : Bool #

is any item focused?

ImGui::IsAnyItemFocused()


[View source]
def self.is_any_item_hovered : Bool #

is any item hovered?

ImGui::IsAnyItemHovered()


[View source]
def self.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.

ImGui::IsAnyMouseDown()


[View source]
def self.is_item_activated : Bool #

was the last item just made active (item was previously inactive).

ImGui::IsItemActivated()


[View source]
def self.is_item_active : Bool #

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)

ImGui::IsItemActive()


[View source]
def self.is_item_clicked(mouse_button : ImGuiMouseButton = ImGuiMouseButton.new(0)) : Bool #

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.

ImGui::IsItemClicked()


[View source]
def self.is_item_deactivated : Bool #

was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that require continuous editing.

ImGui::IsItemDeactivated()


[View source]
def self.is_item_deactivated_after_edit : Bool #

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).

ImGui::IsItemDeactivatedAfterEdit()


[View source]
def self.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.

ImGui::IsItemEdited()


[View source]
def self.is_item_focused : Bool #

is the last item focused for keyboard/gamepad navigation?

ImGui::IsItemFocused()


[View source]
def self.is_item_hovered(flags : ImGuiHoveredFlags = ImGuiHoveredFlags.new(0)) : Bool #

is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for more options.

ImGui::IsItemHovered()


[View source]
def self.is_item_toggled_open : Bool #

was the last item open state toggled? set by TreeNode().

ImGui::IsItemToggledOpen()


[View source]
def self.is_item_visible : Bool #

is the last item visible? (items may be out of sight because of clipping/scrolling)

ImGui::IsItemVisible()


[View source]
def self.is_key_chord_pressed(key_chord : ImGuiKeyChord) : Bool #

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.

ImGui::IsKeyChordPressed()


[View source]
def self.is_key_down(key : ImGuiKey) : Bool #

is key being held.

ImGui::IsKeyDown()


[View source]
def self.is_key_pressed(key : ImGuiKey, repeat : Bool = true) : Bool #

was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate

ImGui::IsKeyPressed()


[View source]
def self.is_key_released(key : ImGuiKey) : Bool #

was key released (went from Down to !Down)?

ImGui::IsKeyReleased()


[View source]
def self.is_mouse_clicked(button : ImGuiMouseButton, repeat : Bool = false) : Bool #

did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1.

ImGui::IsMouseClicked()


[View source]
def self.is_mouse_double_clicked(button : ImGuiMouseButton) : Bool #

did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will also report IsMouseClicked() == true)

ImGui::IsMouseDoubleClicked()


[View source]
def self.is_mouse_down(button : ImGuiMouseButton) : Bool #

is mouse button held?

ImGui::IsMouseDown()


[View source]
def self.is_mouse_dragging(button : ImGuiMouseButton, lock_threshold : Float32 = -1.0) : Bool #

is mouse dragging? (if lock_threshold < -1.0f, uses io.MouseDraggingThreshold)

ImGui::IsMouseDragging()


[View source]
def self.is_mouse_hovering_rect(r_min : ImVec2, r_max : ImVec2, clip : Bool = true) : Bool #

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.

ImGui::IsMouseHoveringRect()


[View source]
def self.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

ImGui::IsMousePosValid()


[View source]
def self.is_mouse_released(button : ImGuiMouseButton) : Bool #

did mouse button released? (went from Down to !Down)

ImGui::IsMouseReleased()


[View source]
def self.is_popup_open(str_id : String, flags : ImGuiPopupFlags = ImGuiPopupFlags.new(0)) : Bool #

return true if the popup is open.

ImGui::IsPopupOpen()


[View source]
def self.is_rect_visible(rect_min : ImVec2, rect_max : ImVec2) : Bool #

test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.

ImGui::IsRectVisible()


[View source]
def self.is_rect_visible(size : ImVec2) : Bool #

test if rectangle (of given size, starting from cursor position) is visible / not clipped.

ImGui::IsRectVisible()


[View source]
def self.is_window_appearing : Bool #

[View source]
def self.is_window_collapsed : Bool #

[View source]
def self.is_window_focused(flags : ImGuiFocusedFlags = ImGuiFocusedFlags.new(0)) : Bool #

is current window focused? or its root/child, depending on flags. see flags for options.

ImGui::IsWindowFocused()


[View source]
def self.is_window_hovered(flags : ImGuiHoveredFlags = ImGuiHoveredFlags.new(0)) : Bool #

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.

ImGui::IsWindowHovered()


[View source]
def self.label_text(label : String, fmt : String, *args) : Void #

display text+label aligned the same way as value+label widgets

ImGui::LabelText()


[View source]
def self.list_box(label : String, current_item : Pointer(Int32) | Pointer, items_count : Int32, height_in_items : Int32 = -1, &block : Int32 -> Slice(UInt8) | String | Nil) : Bool #

def self.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.


[View source]
def self.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 #

[View source]
def self.list_box(label : String, current_item : Pointer(Int32) | Pointer, items : Indexable(Pointer(LibC::Char)), height_in_items : Int32 = -1) : Bool #

[View source]
def self.list_box(label : String, current_item : Pointer(Int32) | Pointer, items : Indexable(String), height_in_items : Int32 = -1) #

[View source]
def self.load_ini_settings_from_disk(ini_filename : String) : Void #

call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls LoadIniSettingsFromDisk(io.IniFilename).

ImGui::LoadIniSettingsFromDisk()


[View source]
def self.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.

ImGui::LoadIniSettingsFromMemory()


[View source]
def self.log_buttons : Void #

helper to display buttons for logging to tty/file/clipboard

ImGui::LogButtons()


[View source]
def self.log_finish : Void #

stop logging (close file, etc.)

ImGui::LogFinish()


[View source]
def self.log_text(fmt : String, *args) : Void #

pass text data straight to log (without being displayed)

ImGui::LogText()


[View source]
def self.log_to_clipboard(auto_open_depth : Int32 = -1) : Void #

start logging to OS clipboard

ImGui::LogToClipboard()


[View source]
def self.log_to_file(auto_open_depth : Int32 = -1, filename : String | Nil = nil) : Void #

start logging to file

ImGui::LogToFile()


[View source]
def self.log_to_tty(auto_open_depth : Int32 = -1) : Void #

start logging to tty (stdout)

ImGui::LogToTTY()


[View source]
def self.main_menu_bar(&) : Nil #

Calls .begin_main_menu_bar, conditionally yields to the block, then conditionally calls .end_main_menu_bar.


[View source]
def self.mem_alloc(size : LibC::SizeT) : Pointer(Void) #

[View source]
def self.mem_free(ptr : Pointer(Void)) : Void #

[View source]
def self.menu(label : String, enabled : Bool = true, &) : Nil #

Calls .begin_menu, conditionally yields to the block, then conditionally calls .end_menu.


[View source]
def self.menu_bar(&) : Nil #

Calls .begin_menu_bar, conditionally yields to the block, then conditionally calls .end_menu_bar.


[View source]
def self.menu_item(label : String, shortcut : String | Nil = nil, selected : Bool = false, enabled : Bool = true) : Bool #

return true when activated.

ImGui::MenuItem()


[View source]
def self.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

ImGui::MenuItem()


[View source]
def self.new_frame : Void #

start a new Dear ImGui frame, you can submit any command from this point until Render()/EndFrame().

ImGui::NewFrame()


[View source]
def self.new_line : Void #

undo a SameLine() or force a new line when in a horizontal-layout context.

ImGui::NewLine()


[View source]
def self.next_column : Void #

next column, defaults to current row or next row if the current row is finished

ImGui::NextColumn()


[View source]
def self.open_popup(str_id : String, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(0)) : Void #

call to mark popup as open (don't call every frame!).

ImGui::OpenPopup()


[View source]
def self.open_popup(id : ImGuiID, popup_flags : ImGuiPopupFlags = ImGuiPopupFlags.new(0)) : Void #

id overload to facilitate calling from nested stacks

ImGui::OpenPopup()


[View source]
def self.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. Default to ImGuiPopupFlags_MouseButtonRight == 1. (note: actually triggers on the mouse released event to be consistent with popup behaviors)

ImGui::OpenPopupOnItemClick()


[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.pop_button_repeat : Void #

[View source]
def self.pop_clip_rect : Void #

[View source]
def self.pop_font : Void #

[View source]
def self.pop_id : Void #

pop from the ID stack.

ImGui::PopID()


[View source]
def self.pop_item_width : Void #

[View source]
def self.pop_style_color(count : Int32 = 1) : Void #

[View source]
def self.pop_style_var(count : Int32 = 1) : Void #

[View source]
def self.pop_tab_stop : Void #

[View source]
def self.pop_text_wrap_pos : Void #

[View source]
def self.popup(str_id : String, flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0), &) : Nil #

Calls .begin_popup, conditionally yields to the block, then conditionally calls .end_popup.


[View source]
def self.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.


[View source]
def self.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.


[View source]
def self.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.


[View source]
def self.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.


[View source]
def self.progress_bar(fraction : Float32, size_arg : ImVec2 = ImVec2.new(-Float32::MIN_POSITIVE, 0), overlay : String | Nil = nil) : Void #

[View source]
def self.push_button_repeat(repeat : Bool) : Void #

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.

ImGui::PushButtonRepeat()


[View source]
def self.push_clip_rect(clip_rect_min : ImVec2, clip_rect_max : ImVec2, intersect_with_current_clip_rect : Bool) : Void #

[View source]
def self.push_font(font : ImFont) : Void #

use NULL as a shortcut to push default font

ImGui::PushFont()


[View source]
def self.push_id(str_id : String) : Void #

push string into the ID stack (will hash string).

ImGui::PushID()


[View source]
def self.push_id(str_id : Bytes | String) : Void #

push string into the ID stack (will hash string).

ImGui::PushID()


[View source]
def self.push_id(int_id : Int32) : Void #

push integer into the ID stack (will hash integer).

ImGui::PushID()


[View source]
def self.push_id(ptr_id : ClassType) : Void #

[View source]
def self.push_id(ptr_id : Reference | ClassType | Int | Pointer(Void)) : Void #

push pointer into the ID stack (will hash pointer).

ImGui::PushID()


[View source]
def self.push_item_width(item_width : Float32) : Void #

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).

ImGui::PushItemWidth()


[View source]
def self.push_style_color(idx : ImGuiCol, col : UInt32) : Void #

modify a style color. always use this if you modify the style after NewFrame().

ImGui::PushStyleColor()


[View source]
def self.push_style_color(idx : ImGuiCol, col : ImVec4) : Void #

[View source]
def self.push_style_var(idx : ImGuiStyleVar, val : Float32) : Void #

modify a style float variable. always use this if you modify the style after NewFrame().

ImGui::PushStyleVar()


[View source]
def self.push_style_var(idx : ImGuiStyleVar, val : ImVec2) : Void #

modify a style ImVec2 variable. always use this if you modify the style after NewFrame().

ImGui::PushStyleVar()


[View source]
def self.push_tab_stop(tab_stop : Bool) : Void #

== tab stop enable. Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets

ImGui::PushTabStop()


[View source]
def self.push_text_wrap_pos(wrap_local_pos_x : Float32 = 0.0) : Void #

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

ImGui::PushTextWrapPos()


[View source]
def self.radio_button(label : String, v : Pointer(Int32), v_button : Int32) : Bool #

shortcut to handle the above pattern when value is an integer

ImGui::RadioButton()


[View source]
def self.radio_button(label : String, v : Pointer(T), v_button : T) : Bool forall T #

[View source]
def self.radio_button(label : String, active : Bool) : Bool #

use with e.g. if (RadioButton("one", my_value==1)) { my_value = 1; }

ImGui::RadioButton()


[View source]
def self.render : Void #

ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData().

ImGui::Render()


[View source]
def self.reset_mouse_drag_delta(button : ImGuiMouseButton = ImGuiMouseButton.new(0)) : Void #

[View source]
def self.rgb(r : Number, g : Number, b : Number, a : Number = 1.0) : ImVec4 #

[View source]
def self.same_line(offset_from_start_x : Float32 = 0.0, spacing : Float32 = -1.0) : Void #

call between widgets or groups to layout them horizontally. X position given in window coordinates.

ImGui::SameLine()


[View source]
def self.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).

ImGui::SaveIniSettingsToDisk()


[View source]
def self.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. call when io.WantSaveIniSettings is set, then save data by your own mean and clear io.WantSaveIniSettings.

ImGui::SaveIniSettingsToMemory()


[View source]
def self.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() 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

ImGui::Selectable()


[View source]
def self.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.

ImGui::Selectable()


[View source]
def self.separator : Void #

separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical separator.

ImGui::Separator()


[View source]
def self.separator_text(label : String) : Void #

currently: formatted text with an horizontal line

ImGui::SeparatorText()


[View source]
def self.set_allocator_functions(alloc_func : ImGuiMemAllocFunc, free_func : ImGuiMemFreeFunc, user_data : Pointer(Void) = Pointer(Void).null) : Void #

[View source]
def self.set_clipboard_text(text : String) : Void #

[View source]
def self.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. User will be able to change many settings, unless you pass the _NoOptions flag to your calls.

ImGui::SetColorEditOptions()


[View source]
def self.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). pass -1 to use current column

ImGui::SetColumnOffset()


[View source]
def self.set_column_width(column_index : Int32, width : Float32) : Void #

set column width (in pixels). pass -1 to use current column

ImGui::SetColumnWidth()


[View source]
def self.set_current_context(ctx : ImGuiContext) : Void #

[View source]
def self.set_cursor_pos(local_pos : ImVec2) : Void #

[window-local] "

ImGui::SetCursorPos()


[View source]
def self.set_cursor_pos_x(local_x : Float32) : Void #

[window-local] "

ImGui::SetCursorPosX()


[View source]
def self.set_cursor_pos_y(local_y : Float32) : Void #

[window-local] "

ImGui::SetCursorPosY()


[View source]
def self.set_cursor_screen_pos(pos : ImVec2) : Void #

cursor position in absolute coordinates

ImGui::SetCursorScreenPos()


[View source]
def self.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. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui. Return true when payload has been accepted.

ImGui::SetDragDropPayload()


[View source]
def self.set_item_default_focus : Void #

make last item the default focused item of a window.

ImGui::SetItemDefaultFocus()


[View source]
def self.set_item_tooltip(fmt : String, *args) : Void #

set a text-only tooltip if preceeding item was hovered. override any previous call to SetTooltip().

ImGui::SetItemTooltip()


[View source]
def self.set_keyboard_focus_here(offset : Int32 = 0) : Void #

focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple component widget. Use -1 to access previous widget.

ImGui::SetKeyboardFocusHere()


[View source]
def self.set_mouse_cursor(cursor_type : ImGuiMouseCursor) : Void #

set desired mouse cursor shape

ImGui::SetMouseCursor()


[View source]
def self.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). 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.

ImGui::SetNextFrameWantCaptureKeyboard()


[View source]
def self.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). This is equivalent to setting "io.WantCaptureMouse = want_capture_mouse;" after the next NewFrame() call.

ImGui::SetNextFrameWantCaptureMouse()


[View source]
def self.set_next_item_allow_overlap : Void #

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.

ImGui::SetNextItemAllowOverlap()


[View source]
def self.set_next_item_open(is_open : Bool, cond : ImGuiCond = ImGuiCond.new(0)) : Void #

set next TreeNode/CollapsingHeader open state.

ImGui::SetNextItemOpen()


[View source]
def self.set_next_item_width(item_width : Float32) : Void #

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)

ImGui::SetNextItemWidth()


[View source]
def self.set_next_window_bg_alpha(alpha : Float32) : Void #

set next window background color alpha. helper to easily override the Alpha component of ImGuiCol_WindowBg/ChildBg/PopupBg. you may also use ImGuiWindowFlags_NoBackground.

ImGui::SetNextWindowBgAlpha()


[View source]
def self.set_next_window_collapsed(collapsed : Bool, cond : ImGuiCond = ImGuiCond.new(0)) : Void #

set next window collapsed state. call before Begin()

ImGui::SetNextWindowCollapsed()


[View source]
def self.set_next_window_content_size(size : ImVec2) : Void #

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()

ImGui::SetNextWindowContentSize()


[View source]
def self.set_next_window_focus : Void #

set next window to be focused / top-most. call before Begin()

ImGui::SetNextWindowFocus()


[View source]
def self.set_next_window_pos(pos : ImVec2, cond : ImGuiCond = ImGuiCond.new(0), pivot : ImVec2 = ImVec2.new(0, 0)) : Void #

set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc.

ImGui::SetNextWindowPos()


[View source]
def self.set_next_window_scroll(scroll : ImVec2) : Void #

set next window scrolling value (use < 0.0f to not affect a given axis).

ImGui::SetNextWindowScroll()


[View source]
def self.set_next_window_size(size : ImVec2, cond : ImGuiCond = ImGuiCond.new(0)) : Void #

set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin()

ImGui::SetNextWindowSize()


[View source]
def self.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. 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.

ImGui::SetNextWindowSizeConstraints()


[View source]
def self.set_next_window_size_constraints(size_min : ImVec2, size_max : ImVec2, &block : ImGuiSizeCallbackData -> ) : Void #

[View source]
def self.set_scroll_from_pos_x(local_x : Float32, center_x_ratio : Float32 = 0.5) : Void #

adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position.

ImGui::SetScrollFromPosX()


[View source]
def self.set_scroll_from_pos_y(local_y : Float32, center_y_ratio : Float32 = 0.5) : Void #

adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to compute a valid position.

ImGui::SetScrollFromPosY()


[View source]
def self.set_scroll_here_x(center_x_ratio : Float32 = 0.5) : Void #

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.

ImGui::SetScrollHereX()


[View source]
def self.set_scroll_here_y(center_y_ratio : Float32 = 0.5) : Void #

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.

ImGui::SetScrollHereY()


[View source]
def self.set_scroll_x(scroll_x : Float32) : Void #

set scrolling amount [0 .. GetScrollMaxX()]

ImGui::SetScrollX()


[View source]
def self.set_scroll_y(scroll_y : Float32) : Void #

set scrolling amount [0 .. GetScrollMaxY()]

ImGui::SetScrollY()


[View source]
def self.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)

ImGui::SetStateStorage()


[View source]
def self.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). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise call with a window name.

ImGui::SetTabItemClosed()


[View source]
def self.set_tooltip(fmt : String, *args) : Void #

set a text-only tooltip. Often used after a ImGui::IsItemHovered() check. Override any previous call to SetTooltip().

ImGui::SetTooltip()


[View source]
def self.set_window_collapsed(collapsed : Bool, cond : ImGuiCond = ImGuiCond.new(0)) : Void #

(not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed().

ImGui::SetWindowCollapsed()


[View source]
def self.set_window_collapsed(name : String, collapsed : Bool, cond : ImGuiCond = ImGuiCond.new(0)) : Void #

set named window collapsed state

ImGui::SetWindowCollapsed()


[View source]
def self.set_window_focus(name : String) : Void #

set named window to be focused / top-most. use NULL to remove focus.

ImGui::SetWindowFocus()


[View source]
def self.set_window_focus : Void #

(not recommended) set current window to be focused / top-most. prefer using SetNextWindowFocus().

ImGui::SetWindowFocus()


[View source]
def self.set_window_font_scale(scale : Float32) : Void #

[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().

ImGui::SetWindowFontScale()


[View source]
def self.set_window_pos(pos : ImVec2, cond : ImGuiCond = ImGuiCond.new(0)) : Void #

(not recommended) set current window position - call within Begin()/End(). prefer using SetNextWindowPos(), as this may incur tearing and side-effects.

ImGui::SetWindowPos()


[View source]
def self.set_window_pos(name : String, pos : ImVec2, cond : ImGuiCond = ImGuiCond.new(0)) : Void #

set named window position.

ImGui::SetWindowPos()


[View source]
def self.set_window_size(size : ImVec2, cond : ImGuiCond = ImGuiCond.new(0)) : Void #

(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.

ImGui::SetWindowSize()


[View source]
def self.set_window_size(name : String, size : ImVec2, cond : ImGuiCond = ImGuiCond.new(0)) : Void #

set named window size. set axis to 0.0f to force an auto-fit on this axis.

ImGui::SetWindowSize()


[View source]
def self.show_about_window(p_open : Pointer(Bool) = Pointer(Bool).null) : Void #

create About window. display Dear ImGui version, credits and build/system information.

ImGui::ShowAboutWindow()


[View source]
def self.show_debug_log_window(p_open : Pointer(Bool) = Pointer(Bool).null) : Void #

create Debug Log window. display a simplified log of important dear imgui events.

ImGui::ShowDebugLogWindow()


[View source]
def self.show_demo_window(p_open : Pointer(Bool) = Pointer(Bool).null) : Void #

create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!

ImGui::ShowDemoWindow()


[View source]
def self.show_font_selector(label : String) : Void #

add font selector block (not a window), essentially a combo listing the loaded fonts.

ImGui::ShowFontSelector()


[View source]
def self.show_id_stack_tool_window(p_open : Pointer(Bool) = Pointer(Bool).null) : Void #

create Stack Tool window. hover items with mouse to query information about the source of their unique ID.

ImGui::ShowIDStackToolWindow()


[View source]
def self.show_metrics_window(p_open : Pointer(Bool) = Pointer(Bool).null) : Void #

create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.

ImGui::ShowMetricsWindow()


[View source]
def self.show_style_editor(ref : ImGuiStyle | Nil = nil) : Void #

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)

ImGui::ShowStyleEditor()


[View source]
def self.show_style_selector(label : String) : Bool #

add style selector block (not a window), essentially a combo listing the default styles.

ImGui::ShowStyleSelector()


[View source]
def self.show_user_guide : Void #

add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard controls).

ImGui::ShowUserGuide()


[View source]
def self.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 #

[View source]
def self.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.

ImGui::SliderFloat()


[View source]
def self.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 #

[View source]
def self.slider_float3(label : String, v : Indexable(Float32) | Pointer(Float32), v_min : Float32, v_max : Float32, format : String = "%.3f", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

[View source]
def self.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 #

[View source]
def self.slider_int(label : String, v : Pointer(Int32), v_min : Int32, v_max : Int32, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

[View source]
def self.slider_int2(label : String, v : Indexable(Int32) | Pointer(Int32), v_min : Int32, v_max : Int32, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

[View source]
def self.slider_int3(label : String, v : Indexable(Int32) | Pointer(Int32), v_min : Int32, v_max : Int32, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

[View source]
def self.slider_int4(label : String, v : Indexable(Int32) | Pointer(Int32), v_min : Int32, v_max : Int32, format : String = "%d", flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

[View source]
def self.slider_scalar(label : String, p_data : Pointer(Int8), p_min : Int8, p_max : Int8, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

def self.slider_scalar(label : String, p_data : Pointer(UInt8), p_min : UInt8, p_max : UInt8, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

def self.slider_scalar(label : String, p_data : Pointer(Int16), p_min : Int16, p_max : Int16, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

def self.slider_scalar(label : String, p_data : Pointer(UInt16), p_min : UInt16, p_max : UInt16, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

def self.slider_scalar(label : String, p_data : Pointer(Int32), p_min : Int32, p_max : Int32, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

def self.slider_scalar(label : String, p_data : Pointer(UInt32), p_min : UInt32, p_max : UInt32, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

def self.slider_scalar(label : String, p_data : Pointer(Int64), p_min : Int64, p_max : Int64, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

def self.slider_scalar(label : String, p_data : Pointer(UInt64), p_min : UInt64, p_max : UInt64, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

def self.slider_scalar(label : String, p_data : Pointer(Float32), p_min : Float32, p_max : Float32, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

def self.slider_scalar(label : String, p_data : Pointer(Float64), p_min : Float64, p_max : Float64, format : String | Nil = nil, flags : ImGuiSliderFlags = ImGuiSliderFlags.new(0)) : Bool #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.small_button(label : String) : Bool #

button with (FramePadding.y == 0) to easily embed within text

ImGui::SmallButton()


[View source]
def self.spacing : Void #

add vertical spacing.

ImGui::Spacing()


[View source]
def self.style_colors_classic(dst : ImGuiStyle | Nil = nil) : Void #

classic imgui style

ImGui::StyleColorsClassic()


[View source]
def self.style_colors_dark(dst : ImGuiStyle | Nil = nil) : Void #

new, recommended style (default)

ImGui::StyleColorsDark()


[View source]
def self.style_colors_light(dst : ImGuiStyle | Nil = nil) : Void #

best used with borders and a custom, thicker font

ImGui::StyleColorsLight()


[View source]
def self.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.


[View source]
def self.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.


[View source]
def self.tab_item_button(label : String, flags : ImGuiTabItemFlags = ImGuiTabItemFlags.new(0)) : Bool #

create a Tab behaving like a button. return true when clicked. cannot be selected in the tab bar.

ImGui::TabItemButton()


[View source]
def self.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.


[View source]
def self.table_angled_headers_row : Void #

submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST BE FIRST ROW.

ImGui::TableAngledHeadersRow()


[View source]
def self.table_get_column_count : Int32 #

return number of columns (value passed to BeginTable)

ImGui::TableGetColumnCount()


[View source]
def self.table_get_column_flags(column_n : Int32 = -1) : ImGuiTableColumnFlags #

return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column.

ImGui::TableGetColumnFlags()


[View source]
def self.table_get_column_index : Int32 #

return current column index.

ImGui::TableGetColumnIndex()


[View source]
def self.table_get_column_name(column_n : Int32 = -1) : String #

return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column.

ImGui::TableGetColumnName()


[View source]
def self.table_get_row_index : Int32 #

return current row index.

ImGui::TableGetRowIndex()


[View source]
def self.table_get_sort_specs : ImGuiTableSortSpecs | Nil #

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().

ImGui::TableGetSortSpecs()


[View source]
def self.table_header(label : String) : Void #

submit one header cell manually (rarely used)

ImGui::TableHeader()


[View source]
def self.table_headers_row : Void #

submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu

ImGui::TableHeadersRow()


[View source]
def self.table_next_column : Bool #

append into the next column (or first column of next row if currently in last column). Return true when column is visible.

ImGui::TableNextColumn()


[View source]
def self.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.

ImGui::TableNextRow()


[View source]
def self.table_set_bg_color(target : ImGuiTableBgTarget, color : UInt32, column_n : Int32 = -1) : Void #

change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.

ImGui::TableSetBgColor()


[View source]
def self.table_set_column_enabled(column_n : Int32, v : Bool) : Void #

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)

ImGui::TableSetColumnEnabled()


[View source]
def self.table_set_column_index(column_n : Int32) : Bool #

append into the specified column. Return true when column is visible.

ImGui::TableSetColumnIndex()


[View source]
def self.table_setup_column(label : String, flags : ImGuiTableColumnFlags = ImGuiTableColumnFlags.new(0), init_width_or_weight : Float32 = 0.0, user_id : ImGuiID = 0) : Void #

[View source]
def self.table_setup_scroll_freeze(cols : Int32, rows : Int32) : Void #

lock columns/rows so they stay visible when scrolled.

ImGui::TableSetupScrollFreeze()


[View source]
def self.text(fmt : String, *args) : Void #

formatted text

ImGui::Text()


[View source]
def self.text_colored(col : ImVec4, fmt : String, *args) : Void #

shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor();

ImGui::TextColored()


[View source]
def self.text_disabled(fmt : String, *args) : Void #

shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...); PopStyleColor();

ImGui::TextDisabled()


[View source]
def self.text_unformatted(text : Bytes | String) : Void #

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.

ImGui::TextUnformatted()


[View source]
def self.text_wrapped(fmt : String, *args) : Void #

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().

ImGui::TextWrapped()


[View source]
def self.tooltip(&) : Nil #

Calls .begin_tooltip, conditionally yields to the block, then calls .end_tooltip.


[View source]
def self.tree_node(str_id : String, fmt : String, *args) : Bool #

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().

ImGui::TreeNode()


[View source]
def self.tree_node(ptr_id : Reference | ClassType | Int | Pointer(Void), fmt : String, *args) : Bool #

[View source]
def self.tree_node(label : String) : Bool #

[View source]
def self.tree_node(str_id : String, fmt : String, *args, &) : Nil #

Calls .tree_node, conditionally yields to the block, then conditionally calls .tree_pop.


[View source]
def self.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.


[View source]
def self.tree_node(label : String, &) : Nil #

Calls .tree_node, conditionally yields to the block, then conditionally calls .tree_pop.


[View source]
def self.tree_node_ex(str_id : String, flags : ImGuiTreeNodeFlags, fmt : String, *args) : Bool #

[View source]
def self.tree_node_ex(ptr_id : Reference | ClassType | Int | Pointer(Void), flags : ImGuiTreeNodeFlags, fmt : String, *args) : Bool #

[View source]
def self.tree_node_ex(label : String, flags : ImGuiTreeNodeFlags = ImGuiTreeNodeFlags.new(0)) : Bool #

[View source]
def self.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.


[View source]
def self.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.


[View source]
def self.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.


[View source]
def self.tree_pop : Void #

~ Unindent()+PopID()

ImGui::TreePop()


[View source]
def self.tree_push(str_id : String) : Void #

~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop yourself if desired.

ImGui::TreePush()


[View source]
def self.tree_push(ptr_id : Reference | ClassType | Int | Pointer(Void)) : Void #

[View source]
def self.unindent(indent_w : Float32 = 0.0) : Void #

move content position back to the left, by indent_w, or style.IndentSpacing if indent_w <= 0

ImGui::Unindent()


[View source]
def self.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 #

[View source]
def self.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 #

[View source]
def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.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 #

def self.value(prefix : String, b : Bool) : Void #

[View source]
def self.value(prefix : String, v : Int32) : Void #

[View source]
def self.value(prefix : String, v : UInt32) : Void #

[View source]
def self.value(prefix : String, v : Float32, float_format : String | Nil = nil) : Void #

[View source]
def self.window(name : String, p_open : Pointer(Bool) = Pointer(Bool).null, flags : ImGuiWindowFlags = ImGuiWindowFlags.new(0), &) : Nil #

Calls .begin, conditionally yields to the block, then calls .end.


[View source]
def self.with_button_repeat(repeat : Bool, &) : Nil #

Calls .push_button_repeat, yields to the block, then calls .pop_button_repeat.


[View source]
def self.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.


[View source]
def self.with_font(font : ImFont, &) : Nil #

Calls .push_font, yields to the block, then calls .pop_font.


[View source]
def self.with_id(str_id : String, &) : Nil #

Calls .push_id, yields to the block, then calls .pop_id.


[View source]
def self.with_id(str_id : Bytes | String, &) : Nil #

Calls .push_id, yields to the block, then calls .pop_id.


[View source]
def self.with_id(int_id : Int32, &) : Nil #

Calls .push_id, yields to the block, then calls .pop_id.


[View source]
def self.with_id(ptr_id : Reference | ClassType | Int | Pointer(Void), &) : Nil #

Calls .push_id, yields to the block, then calls .pop_id.


[View source]
def self.with_item_width(item_width : Float32, &) : Nil #

Calls .push_item_width, yields to the block, then calls .pop_item_width.


[View source]
def self.with_style_color(idx : ImGuiCol, col : UInt32, &) : Nil #

Calls .push_style_color, yields to the block, then calls .pop_style_color.


[View source]
def self.with_style_color(idx : ImGuiCol, col : ImVec4, &) : Nil #

Calls .push_style_color, yields to the block, then calls .pop_style_color.


[View source]
def self.with_style_var(idx : ImGuiStyleVar, val : Float32, &) : Nil #

Calls .push_style_var, yields to the block, then calls .pop_style_var.


[View source]
def self.with_style_var(idx : ImGuiStyleVar, val : ImVec2, &) : Nil #

Calls .push_style_var, yields to the block, then calls .pop_style_var.


[View source]
def self.with_tab_stop(tab_stop : Bool, &) : Nil #

Calls .push_tab_stop, yields to the block, then calls .pop_tab_stop.


[View source]
def self.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.


[View source]
def self.with_tree(str_id : String, &) : Nil #

Calls .tree_push, yields to the block, then calls .tree_pop.


[View source]
def self.with_tree(ptr_id : Reference | ClassType | Int | Pointer(Void), &) : Nil #

Calls .tree_push, yields to the block, then calls .tree_pop.


[View source]

Macro Detail

macro begin(*args, **kwargs, &block) #

[View source]
macro begin_popup_modal(*args, **kwargs, &block) #

return true if the modal is open, and you can start outputting to it.

ImGui::BeginPopupModal()


[View source]
macro begin_tab_item(*args, **kwargs, &block) #

create a Tab. Returns true if the Tab is selected.

ImGui::BeginTabItem()


[View source]
macro checkbox(*args, **kwargs, &block) #

[View source]
macro checkbox_flags(*args, **kwargs, &block) #

[View source]
macro 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.

ImGui::CollapsingHeader()


[View source]
macro color_edit3(*args, **kwargs, &block) #

[View source]
macro color_edit4(*args, **kwargs, &block) #

[View source]
macro color_picker3(*args, **kwargs, &block) #

[View source]
macro color_picker4(*args, **kwargs, &block) #

[View source]
macro combo(*args, **kwargs, &block) #

[View source]
macro drag_float(*args, **kwargs, &block) #

If v_min >= v_max we have no bound

ImGui::DragFloat()


[View source]
macro drag_float2(*args, **kwargs, &block) #

[View source]
macro drag_float3(*args, **kwargs, &block) #

[View source]
macro drag_float4(*args, **kwargs, &block) #

[View source]
macro drag_float_range2(*args, **kwargs, &block) #

[View source]
macro drag_int(*args, **kwargs, &block) #

If v_min >= v_max we have no bound

ImGui::DragInt()


[View source]
macro drag_int2(*args, **kwargs, &block) #

[View source]
macro drag_int3(*args, **kwargs, &block) #

[View source]
macro drag_int4(*args, **kwargs, &block) #

[View source]
macro drag_int_range2(*args, **kwargs, &block) #

[View source]
macro drag_scalar(*args, **kwargs, &block) #

macro drag_scalar_n(*args, **kwargs, &block) #

macro get_allocator_functions(*args, **kwargs, &block) #

[View source]
macro input_double(*args, **kwargs, &block) #

[View source]
macro input_float(*args, **kwargs, &block) #

[View source]
macro input_float2(*args, **kwargs, &block) #

[View source]
macro input_float3(*args, **kwargs, &block) #

[View source]
macro input_float4(*args, **kwargs, &block) #

[View source]
macro input_int(*args, **kwargs, &block) #

[View source]
macro input_int2(*args, **kwargs, &block) #

[View source]
macro input_int3(*args, **kwargs, &block) #

[View source]
macro input_int4(*args, **kwargs, &block) #

[View source]
macro input_scalar(*args, **kwargs, &block) #

macro input_scalar_n(*args, **kwargs, &block) #

macro list_box(*args, **kwargs, &block) #

[View source]
macro menu_item(*args, **kwargs, &block) #

return true when activated + toggle (*p_selected) if p_selected != NULL

ImGui::MenuItem()


[View source]
macro popup_modal(*args, **kwargs, &block) #

Calls .begin_popup_modal, conditionally yields to the block, then conditionally calls .end_popup.


[View source]
macro radio_button(*args, **kwargs, &block) #

shortcut to handle the above pattern when value is an integer

ImGui::RadioButton()


[View source]
macro selectable(*args, **kwargs, &block) #

"bool* p_selected" point to the selection state (read-write), as a convenient helper.

ImGui::Selectable()


[View source]
macro show_about_window(*args, **kwargs, &block) #

create About window. display Dear ImGui version, credits and build/system information.

ImGui::ShowAboutWindow()


[View source]
macro show_debug_log_window(*args, **kwargs, &block) #

create Debug Log window. display a simplified log of important dear imgui events.

ImGui::ShowDebugLogWindow()


[View source]
macro show_demo_window(*args, **kwargs, &block) #

create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!

ImGui::ShowDemoWindow()


[View source]
macro show_id_stack_tool_window(*args, **kwargs, &block) #

create Stack Tool window. hover items with mouse to query information about the source of their unique ID.

ImGui::ShowIDStackToolWindow()


[View source]
macro show_metrics_window(*args, **kwargs, &block) #

create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.

ImGui::ShowMetricsWindow()


[View source]
macro slider_angle(*args, **kwargs, &block) #

[View source]
macro slider_float(*args, **kwargs, &block) #

adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display.

ImGui::SliderFloat()


[View source]
macro slider_float2(*args, **kwargs, &block) #

[View source]
macro slider_float3(*args, **kwargs, &block) #

[View source]
macro slider_float4(*args, **kwargs, &block) #

[View source]
macro slider_int(*args, **kwargs, &block) #

[View source]
macro slider_int2(*args, **kwargs, &block) #

[View source]
macro slider_int3(*args, **kwargs, &block) #

[View source]
macro slider_int4(*args, **kwargs, &block) #

[View source]
macro slider_scalar(*args, **kwargs, &block) #

macro slider_scalar_n(*args, **kwargs, &block) #

macro tab_item(*args, **kwargs, &block) #

Calls .begin_tab_item, conditionally yields to the block, then conditionally calls .end_tab_item.


[View source]
macro v_slider_float(*args, **kwargs, &block) #

[View source]
macro v_slider_int(*args, **kwargs, &block) #

[View source]
macro v_slider_scalar(*args, **kwargs, &block) #

macro window(*args, **kwargs, &block) #

Calls .begin, conditionally yields to the block, then calls .end.


[View source]