struct ImGui::ImGuiIO
- ImGui::ImGuiIO
- Struct
- Value
- Object
Overview
Included Modules
- ImGui::ClassType(LibImGui::ImGuiIO)
Defined in:
obj.crConstructors
Instance Method Summary
-
#add_input_character(c : UInt32) : Void
Queue new character input
-
#add_input_character_utf16(c : ImWchar16) : Void
Queue new character input from an UTF-16 character, it can be a surrogate
-
#add_input_characters_utf8(str : String) : Void
Queue new characters input from an UTF-8 string
-
#backend_flags : ImGuiBackendFlags
= 0 See ImGuiBackendFlags_ enum.
- #backend_flags=(backend_flags : ImGuiBackendFlags)
-
#backend_language_user_data : Pointer(Void)
= NULL User data for non C++ programming language backend
- #backend_language_user_data=(backend_language_user_data : Pointer(Void))
-
#backend_platform_name : String | Nil
= NULL
- #backend_platform_name=(backend_platform_name : String | Nil)
-
#backend_platform_user_data : Pointer(Void)
= NULL User data for platform backend
- #backend_platform_user_data=(backend_platform_user_data : Pointer(Void))
-
#backend_renderer_name : String | Nil
= NULL
- #backend_renderer_name=(backend_renderer_name : String | Nil)
-
#backend_renderer_user_data : Pointer(Void)
= NULL User data for renderer backend
- #backend_renderer_user_data=(backend_renderer_user_data : Pointer(Void))
-
#clear_input_characters : Void
Clear the text input buffer manually
- #clipboard_user_data : Pointer(Void)
- #clipboard_user_data=(clipboard_user_data : Pointer(Void))
-
#config_drag_click_to_input_text : Bool
= false [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving).
- #config_drag_click_to_input_text=(config_drag_click_to_input_text : Bool)
-
#config_flags : ImGuiConfigFlags
= 0 See ImGuiConfigFlags_ enum.
- #config_flags=(config_flags : ImGuiConfigFlags)
-
#config_input_text_cursor_blink : Bool
= true Enable blinking cursor (optional as some users consider it to be distracting).
- #config_input_text_cursor_blink=(config_input_text_cursor_blink : Bool)
-
#config_mac_osx_behaviors : Bool
= defined(APPLE) OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl.
- #config_mac_osx_behaviors=(config_mac_osx_behaviors : Bool)
-
#config_memory_compact_timer : Float32
= 60.0f Timer (in seconds) to free transient windows/tables memory buffers when unused.
- #config_memory_compact_timer=(config_memory_compact_timer : Float32)
-
#config_windows_move_from_title_bar_only : Bool
= false Enable allowing to move windows only when clicking on their title bar.
- #config_windows_move_from_title_bar_only=(config_windows_move_from_title_bar_only : Bool)
-
#config_windows_resize_from_edges : Bool
= true Enable resizing of windows from their edges and from the lower-left corner.
- #config_windows_resize_from_edges=(config_windows_resize_from_edges : Bool)
-
#delta_time : Float32
= 1.0f/60.0f Time elapsed since last frame, in seconds.
- #delta_time=(delta_time : Float32)
-
#display_framebuffer_scale : ImVec2
= (1, 1) For retina display or other situations where window coordinates are different from framebuffer coordinates.
- #display_framebuffer_scale=(display_framebuffer_scale : ImVec2)
-
#display_size : ImVec2
Main display size, in pixels (generally == GetMainViewport()->Size) - #display_size=(display_size : ImVec2)
-
#font_allow_user_scaling : Bool
= false Allow user scaling text of individual window with CTRL+Wheel.
- #font_allow_user_scaling=(font_allow_user_scaling : Bool)
-
#font_default : ImFont
= NULL Font to use on NewFrame().
- #font_default=(font_default : ImFont)
-
#font_global_scale : Float32
= 1.0f Global scale all fonts
- #font_global_scale=(font_global_scale : Float32)
-
#fonts : ImFontAtlas
Font atlas: load, rasterize and pack one or more fonts into a single texture. - #fonts=(fonts : ImFontAtlas)
-
#framerate : Float32
Application framerate estimate, in frame per second.
- #framerate=(framerate : Float32)
- #get_clipboard_text_fn : Pointer(Void) -> String
- #get_clipboard_text_fn=(get_clipboard_text_fn : Pointer(Void) -> String)
- #ime_set_input_screen_pos_fn : Int32, Int32 -> Void
- #ime_set_input_screen_pos_fn=(ime_set_input_screen_pos_fn : Int32, Int32 -> Void)
-
#ime_window_handle : Pointer(Void)
= NULL (Windows) Set this to your HWND to get automatic IME cursor positioning.
- #ime_window_handle=(ime_window_handle : Pointer(Void))
-
#ini_filename : String | Nil
= "imgui.ini" Path to .ini file.
- #ini_filename=(ini_filename : String | Nil)
-
#ini_saving_rate : Float32
= 5.0f Minimum time between saving positions/sizes to .ini file, in seconds.
- #ini_saving_rate=(ini_saving_rate : Float32)
-
#input_queue_characters : ImVector(ImWchar)
Queue of characters input (obtained by platform backend).
- #input_queue_characters=(input_queue_characters : ImVector(ImWchar))
-
#input_queue_surrogate : ImWchar16
For AddInputCharacterUTF16
- #input_queue_surrogate=(input_queue_surrogate : ImWchar16)
-
#key_alt : Bool
Keyboard modifier pressed: Alt
- #key_alt=(key_alt : Bool)
-
#key_ctrl : Bool
Keyboard modifier pressed: Control
- #key_ctrl=(key_ctrl : Bool)
-
#key_map : Slice(Int32)
Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state. - #key_map=(key_map : Slice(Int32))
-
#key_mods : ImGuiKeyModFlags
Key mods flags (same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags), updated by NewFrame()
- #key_mods=(key_mods : ImGuiKeyModFlags)
-
#key_repeat_delay : Float32
= 0.250f When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
- #key_repeat_delay=(key_repeat_delay : Float32)
-
#key_repeat_rate : Float32
= 0.050f When holding a key/button, rate at which it repeats, in seconds.
- #key_repeat_rate=(key_repeat_rate : Float32)
-
#key_shift : Bool
Keyboard modifier pressed: Shift
- #key_shift=(key_shift : Bool)
-
#key_super : Bool
Keyboard modifier pressed: Cmd/Super/Windows
- #key_super=(key_super : Bool)
-
#keys_down : Slice(Bool)
Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
- #keys_down=(keys_down : Slice(Bool))
-
#keys_down_duration : Slice(Float32)
Duration the keyboard key has been down (0.0f == just pressed)
- #keys_down_duration=(keys_down_duration : Slice(Float32))
-
#keys_down_duration_prev : Slice(Float32)
Previous duration the key has been down
- #keys_down_duration_prev=(keys_down_duration_prev : Slice(Float32))
-
#log_filename : String | Nil
= "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
- #log_filename=(log_filename : String | Nil)
-
#metrics_active_allocations : Int32
Number of active allocations, updated by MemAlloc/MemFree based on current context.
- #metrics_active_allocations=(metrics_active_allocations : Int32)
-
#metrics_active_windows : Int32
Number of active windows
- #metrics_active_windows=(metrics_active_windows : Int32)
-
#metrics_render_indices : Int32
Indices output during last call to Render() = number of triangles * 3
- #metrics_render_indices=(metrics_render_indices : Int32)
-
#metrics_render_vertices : Int32
Vertices output during last call to Render()
- #metrics_render_vertices=(metrics_render_vertices : Int32)
-
#metrics_render_windows : Int32
Number of visible windows
- #metrics_render_windows=(metrics_render_windows : Int32)
-
#mouse_clicked : Slice(Bool)
Mouse button went from !Down to Down
- #mouse_clicked=(mouse_clicked : Slice(Bool))
-
#mouse_clicked_pos : Slice(ImVec2)
Position at time of clicking
- #mouse_clicked_pos=(mouse_clicked_pos : Slice(ImVec2))
-
#mouse_clicked_time : Slice(Float64)
Time of last click (used to figure out double-click)
- #mouse_clicked_time=(mouse_clicked_time : Slice(Float64))
-
#mouse_delta : ImVec2
Mouse delta.
- #mouse_delta=(mouse_delta : ImVec2)
-
#mouse_double_click_max_dist : Float32
= 6.0f Distance threshold to stay in to validate a double-click, in pixels.
- #mouse_double_click_max_dist=(mouse_double_click_max_dist : Float32)
-
#mouse_double_click_time : Float32
= 0.30f Time for a double-click, in seconds.
- #mouse_double_click_time=(mouse_double_click_time : Float32)
-
#mouse_double_clicked : Slice(Bool)
Has mouse button been double-clicked?
- #mouse_double_clicked=(mouse_double_clicked : Slice(Bool))
-
#mouse_down : Slice(Bool)
Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton_COUNT == 5).
- #mouse_down=(mouse_down : Slice(Bool))
-
#mouse_down_duration : Slice(Float32)
Duration the mouse button has been down (0.0f == just clicked)
- #mouse_down_duration=(mouse_down_duration : Slice(Float32))
-
#mouse_down_duration_prev : Slice(Float32)
Previous time the mouse button has been down
- #mouse_down_duration_prev=(mouse_down_duration_prev : Slice(Float32))
-
#mouse_down_owned : Slice(Bool)
Track if button was clicked inside a dear imgui window.
- #mouse_down_owned=(mouse_down_owned : Slice(Bool))
-
#mouse_down_was_double_click : Slice(Bool)
Track if button down was a double-click
- #mouse_down_was_double_click=(mouse_down_was_double_click : Slice(Bool))
-
#mouse_drag_max_distance_abs : Slice(ImVec2)
Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point
- #mouse_drag_max_distance_abs=(mouse_drag_max_distance_abs : Slice(ImVec2))
-
#mouse_drag_max_distance_sqr : Slice(Float32)
Squared maximum distance of how much mouse has traveled from the clicking point
- #mouse_drag_max_distance_sqr=(mouse_drag_max_distance_sqr : Slice(Float32))
-
#mouse_drag_threshold : Float32
= 6.0f Distance threshold before considering we are dragging.
- #mouse_drag_threshold=(mouse_drag_threshold : Float32)
-
#mouse_draw_cursor : Bool
= false Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor).
- #mouse_draw_cursor=(mouse_draw_cursor : Bool)
-
#mouse_pos : ImVec2
Mouse position, in pixels.
- #mouse_pos=(mouse_pos : ImVec2)
-
#mouse_pos_prev : ImVec2
Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
- #mouse_pos_prev=(mouse_pos_prev : ImVec2)
-
#mouse_released : Slice(Bool)
Mouse button went from Down to !Down
- #mouse_released=(mouse_released : Slice(Bool))
-
#mouse_wheel : Float32
Mouse wheel Vertical: 1 unit scrolls about 5 lines text.
- #mouse_wheel=(mouse_wheel : Float32)
-
#mouse_wheel_h : Float32
Mouse wheel Horizontal.
- #mouse_wheel_h=(mouse_wheel_h : Float32)
-
#nav_active : Bool
Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
- #nav_active=(nav_active : Bool)
-
#nav_inputs : Slice(Float32)
Gamepad inputs.
- #nav_inputs=(nav_inputs : Slice(Float32))
- #nav_inputs_down_duration : Slice(Float32)
- #nav_inputs_down_duration=(nav_inputs_down_duration : Slice(Float32))
- #nav_inputs_down_duration_prev : Slice(Float32)
- #nav_inputs_down_duration_prev=(nav_inputs_down_duration_prev : Slice(Float32))
-
#nav_visible : Bool
Keyboard/Gamepad navigation is visible and allowed (will handle ImGuiKey_NavXXX events).
- #nav_visible=(nav_visible : Bool)
-
#pen_pressure : Float32
Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true).
- #pen_pressure=(pen_pressure : Float32)
- #set_clipboard_text_fn : Pointer(Void), String -> Void
- #set_clipboard_text_fn=(set_clipboard_text_fn : Pointer(Void), String -> Void)
- #to_unsafe : Pointer(T)
-
#user_data : Pointer(Void)
= NULL Store your own data for retrieval by callbacks.
- #user_data=(user_data : Pointer(Void))
-
#want_capture_keyboard : Bool
Set when Dear ImGui will use keyboard inputs, in this case do not dispatch them to your main game/application (either way, always pass keyboard inputs to imgui).
- #want_capture_keyboard=(want_capture_keyboard : Bool)
-
#want_capture_mouse : Bool
Set when Dear ImGui will use mouse inputs, in this case do not dispatch them to your main game/application (either way, always pass on mouse inputs to imgui).
- #want_capture_mouse=(want_capture_mouse : Bool)
-
#want_save_ini_settings : Bool
When manual .ini load/save is active (io.IniFilename == NULL), this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself.
- #want_save_ini_settings=(want_save_ini_settings : Bool)
-
#want_set_mouse_pos : Bool
MousePos has been altered, backend should reposition mouse on next frame.
- #want_set_mouse_pos=(want_set_mouse_pos : Bool)
-
#want_text_input : Bool
Mobile/console: when set, you may display an on-screen keyboard.
- #want_text_input=(want_text_input : Bool)
Constructor Detail
Instance Method Detail
Queue new character input from an UTF-16 character, it can be a surrogate
Queue new characters input from an UTF-8 string
= 0 See ImGuiBackendFlags_ enum. Set by backend (imgui_impl_xxx files or custom backend) to communicate features supported by the backend.
= NULL User data for non C++ programming language backend
= false [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard.
= 0 See ImGuiConfigFlags_ enum. Set by user/application. Gamepad/keyboard navigation options, etc.
= true Enable blinking cursor (optional as some users consider it to be distracting).
= defined(APPLE) OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl.
= 60.0f Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0f to disable.
= false Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar.
= true Enable resizing of windows from their edges and from the lower-left corner. This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback. (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag)
= (1, 1) For retina display or other situations where window coordinates are different from framebuffer coordinates. This generally ends up in ImDrawData::FramebufferScale.
= false Allow user scaling text of individual window with CTRL+Wheel.
= NULL Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0].
Application framerate estimate, in frame per second. Solely for convenience. Rolling average estimation based on io.DeltaTime over 120 frames.
= NULL (Windows) Set this to your HWND to get automatic IME cursor positioning.
= "imgui.ini" Path to .ini file. Set NULL to disable automatic .ini loading/saving, if e.g. you want to manually load/save from memory.
= 5.0f Minimum time between saving positions/sizes to .ini file, in seconds.
Queue of characters input (obtained by platform backend). Fill using AddInputCharacter() helper.
Key mods flags (same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags), updated by NewFrame()
= 0.250f When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
= 0.050f When holding a key/button, rate at which it repeats, in seconds.
Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
Duration the keyboard key has been down (0.0f == just pressed)
= "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.
Indices output during last call to Render() = number of triangles * 3
Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
= 6.0f Distance threshold to stay in to validate a double-click, in pixels.
Mouse buttons: 0=left, 1=right, 2=middle + extras (ImGuiMouseButton_COUNT == 5). Dear ImGui mostly uses left and right buttons. Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
Duration the mouse button has been down (0.0f == just clicked)
Track if button was clicked inside a dear imgui window. We don't request mouse capture from the application if click started outside ImGui bounds.
Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point
Squared maximum distance of how much mouse has traveled from the clicking point
= false Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by backend implementations.
Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.)
Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all backends.
Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.
Set when Dear ImGui will use keyboard inputs, in this case do not dispatch them to your main game/application (either way, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
Set when Dear ImGui will use mouse inputs, in this case do not dispatch them to your main game/application (either way, always pass on mouse inputs to imgui). (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
When manual .ini load/save is active (io.IniFilename == NULL), this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. Important: clear io.WantSaveIniSettings yourself after saving!
MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled.
Mobile/console: when set, you may display an on-screen keyboard. This is set by Dear ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).