struct ImGui::ImGuiIO

Overview

struct ImGuiIO

Included Modules

Defined in:

obj.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new : ImGuiIO #

[View source]

Instance Method Detail

def add_focus_event(focused : Bool) : Void #

Queue a gain/loss of focus for the application (generally based on OS/platform focus of your window)

ImGuiIO::AddFocusEvent()


[View source]
def add_input_character(c : UInt32) : Void #

Queue a new character input

ImGuiIO::AddInputCharacter()


[View source]
def add_input_character_utf16(c : ImWchar16) : Void #

Queue a new character input from an UTF-16 character, it can be a surrogate

ImGuiIO::AddInputCharacterUTF16()


[View source]
def add_input_characters_utf8(str : String) : Void #

Queue a new characters input from an UTF-8 string

ImGuiIO::AddInputCharactersUTF8()


[View source]
def add_key_analog_event(key : ImGuiKey, down : Bool, v : Float32) : Void #

Queue a new key down/up event for analog values (e.g. ImGuiKey_Gamepad_ values). Dead-zones should be handled by the backend.

ImGuiIO::AddKeyAnalogEvent()


[View source]
def add_key_event(key : ImGuiKey, down : Bool) : Void #

Queue a new key down/up event. Key should be "translated" (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character)

ImGuiIO::AddKeyEvent()


[View source]
def add_mouse_button_event(button : Int32, down : Bool) : Void #

Queue a mouse button change

ImGuiIO::AddMouseButtonEvent()


[View source]
def add_mouse_pos_event(x : Float32, y : Float32) : Void #

Queue a mouse position update. Use -FLT_MAX,-FLT_MAX to signify no mouse (e.g. app not focused and not hovered)

ImGuiIO::AddMousePosEvent()


[View source]
def add_mouse_wheel_event(wh_x : Float32, wh_y : Float32) : Void #

Queue a mouse wheel update

ImGuiIO::AddMouseWheelEvent()


[View source]
def app_accepting_events : Bool #

Only modify via SetAppAcceptingEvents()


[View source]
def app_accepting_events=(app_accepting_events : Bool) #

[View source]
def app_focus_lost : Bool #

Only modify via AddFocusEvent()


[View source]
def app_focus_lost=(app_focus_lost : Bool) #

[View source]
def backend_flags : ImGuiBackendFlags #

= 0 See ImGuiBackendFlags_ enum. Set by backend (imgui_impl_xxx files or custom backend) to communicate features supported by the backend.


[View source]
def backend_flags=(backend_flags : ImGuiBackendFlags) #

[View source]
def backend_language_user_data : Pointer(Void) #

= NULL User data for non C++ programming language backend


[View source]
def backend_language_user_data=(backend_language_user_data : Pointer(Void)) #

[View source]
def backend_platform_name : String? #

= NULL


[View source]
def backend_platform_name=(backend_platform_name : String?) #

[View source]
def backend_platform_user_data : Pointer(Void) #

= NULL User data for platform backend


[View source]
def backend_platform_user_data=(backend_platform_user_data : Pointer(Void)) #

[View source]
def backend_renderer_name : String? #

= NULL


[View source]
def backend_renderer_name=(backend_renderer_name : String?) #

[View source]
def backend_renderer_user_data : Pointer(Void) #

= NULL User data for renderer backend


[View source]
def backend_renderer_user_data=(backend_renderer_user_data : Pointer(Void)) #

[View source]
def backend_using_legacy_key_arrays : Int8 #

-1: unknown, 0: using AddKeyEvent(), 1: using legacy io.KeysDown[]


[View source]
def backend_using_legacy_key_arrays=(backend_using_legacy_key_arrays : Int8) #

[View source]
def backend_using_legacy_nav_input_array : Bool #

0: using AddKeyAnalogEvent(), 1: writing to legacy io.NavInputs[] directly


[View source]
def backend_using_legacy_nav_input_array=(backend_using_legacy_nav_input_array : Bool) #

[View source]
def clear_input_characters : Void #

[Internal] Clear the text input buffer manually

ImGuiIO::ClearInputCharacters()


[View source]
def clear_input_keys : Void #

[Internal] Release all keys

ImGuiIO::ClearInputKeys()


[View source]
def clipboard_user_data : Pointer(Void) #

[View source]
def clipboard_user_data=(clipboard_user_data : Pointer(Void)) #

[View source]
def config_drag_click_to_input_text : Bool #

= false [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard.


[View source]
def config_drag_click_to_input_text=(config_drag_click_to_input_text : Bool) #

[View source]
def config_flags : ImGuiConfigFlags #

= 0 See ImGuiConfigFlags_ enum. Set by user/application. Gamepad/keyboard navigation options, etc.


[View source]
def config_flags=(config_flags : ImGuiConfigFlags) #

[View source]
def config_input_text_cursor_blink : Bool #

= true Enable blinking cursor (optional as some users consider it to be distracting).


[View source]
def config_input_text_cursor_blink=(config_input_text_cursor_blink : Bool) #

[View source]
def config_input_trickle_event_queue : Bool #

= true Enable input queue trickling: some types of events submitted during the same frame (e.g. button down + up) will be spread over multiple frames, improving interactions with low framerates.


[View source]
def config_input_trickle_event_queue=(config_input_trickle_event_queue : Bool) #

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


[View source]
def config_mac_osx_behaviors=(config_mac_osx_behaviors : Bool) #

[View source]
def config_memory_compact_timer : Float32 #

= 60.0f Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0f to disable.


[View source]
def config_memory_compact_timer=(config_memory_compact_timer : Float32) #

[View source]
def config_windows_move_from_title_bar_only : Bool #

= false Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar.


[View source]
def config_windows_move_from_title_bar_only=(config_windows_move_from_title_bar_only : Bool) #

[View source]
def config_windows_resize_from_edges : Bool #

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


[View source]
def config_windows_resize_from_edges=(config_windows_resize_from_edges : Bool) #

[View source]
def delta_time : Float32 #

= 1.0f/60.0f Time elapsed since last frame, in seconds. May change every frame.


[View source]
def delta_time=(delta_time : Float32) #

[View source]
def display_framebuffer_scale : ImVec2 #

= (1, 1) For retina display or other situations where window coordinates are different from framebuffer coordinates. This generally ends up in ImDrawData::FramebufferScale.


[View source]
def display_framebuffer_scale=(display_framebuffer_scale : ImVec2) #

[View source]
def display_size : ImVec2 #
Main display size, in pixels (generally == GetMainViewport()->Size). May change every frame.

[View source]
def display_size=(display_size : ImVec2) #

[View source]
def font_allow_user_scaling : Bool #

= false Allow user scaling text of individual window with CTRL+Wheel.


[View source]
def font_allow_user_scaling=(font_allow_user_scaling : Bool) #

[View source]
def font_default : ImFont #

= NULL Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0].


[View source]
def font_default=(font_default : ImFont) #

[View source]
def font_global_scale : Float32 #

= 1.0f Global scale all fonts


[View source]
def font_global_scale=(font_global_scale : Float32) #

[View source]
def fonts : ImFontAtlas #
Font atlas: load, rasterize and pack one or more fonts into a single texture.

[View source]
def fonts=(fonts : ImFontAtlas) #

[View source]
def framerate : Float32 #

Rough estimate of application framerate, in frame per second. Solely for convenience. Rolling average estimation based on io.DeltaTime over 120 frames.


[View source]
def framerate=(framerate : Float32) #

[View source]
def get_clipboard_text_fn : Pointer(Void) -> String #

[View source]
def get_clipboard_text_fn=(get_clipboard_text_fn : Pointer(Void) -> String) #

[View source]
def ini_filename : String? #

= "imgui.ini" Path to .ini file (important: default "imgui.ini" is relative to current working dir!). Set NULL to disable automatic .ini loading/saving or if you want to manually call LoadIniSettingsXXX() / SaveIniSettingsXXX() functions.


[View source]
def ini_filename=(ini_filename : String?) #

[View source]
def ini_saving_rate : Float32 #

= 5.0f Minimum time between saving positions/sizes to .ini file, in seconds.


[View source]
def ini_saving_rate=(ini_saving_rate : Float32) #

[View source]
def input_queue_characters : ImVector(ImWchar) #

Queue of characters input (obtained by platform backend). Fill using AddInputCharacter() helper.


[View source]
def input_queue_characters=(input_queue_characters : ImVector(ImWchar)) #

[View source]
def input_queue_surrogate : ImWchar16 #

For AddInputCharacterUTF16()


[View source]
def input_queue_surrogate=(input_queue_surrogate : ImWchar16) #

[View source]
def key_alt : Bool #

Keyboard modifier down: Alt


[View source]
def key_alt=(key_alt : Bool) #

[View source]
def key_ctrl : Bool #

Keyboard modifier down: Control


[View source]
def key_ctrl=(key_ctrl : Bool) #

[View source]
def key_map : Slice(Int32) #

[LEGACY] Input: map of indices into the KeysDown[512] entries array which represent your "native" keyboard state. The first 512 are now unused and should be kept zero. Legacy backend will write into KeyMap[] using ImGuiKey_ indices which are always >512.


[View source]
def key_map=(key_map : Slice(Int32)) #

[View source]
def key_mods : ImGuiModFlags #

Key mods flags (same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags), updated by NewFrame()


[View source]
def key_mods=(key_mods : ImGuiModFlags) #

[View source]
def key_repeat_delay : Float32 #

= 0.250f When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).


[View source]
def key_repeat_delay=(key_repeat_delay : Float32) #

[View source]
def key_repeat_rate : Float32 #

= 0.050f When holding a key/button, rate at which it repeats, in seconds.


[View source]
def key_repeat_rate=(key_repeat_rate : Float32) #

[View source]
def key_shift : Bool #

Keyboard modifier down: Shift


[View source]
def key_shift=(key_shift : Bool) #

[View source]
def key_super : Bool #

Keyboard modifier down: Cmd/Super/Windows


[View source]
def key_super=(key_super : Bool) #

[View source]
def keys_data : Slice(ImGuiKeyData) #

Key state for all known keys. Use IsKeyXXX() functions to access this.


[View source]
def keys_data=(keys_data : Slice(ImGuiKeyData)) #

[View source]
def keys_down : Slice(Bool) #

[LEGACY] Input: 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). This used to be [512] sized. It is now ImGuiKey_COUNT to allow legacy io.KeysDown[GetKeyIndex(...)] to work without an overflow.


[View source]
def keys_down=(keys_down : Slice(Bool)) #

[View source]
def log_filename : String? #

= "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified).


[View source]
def log_filename=(log_filename : String?) #

[View source]
def metrics_active_allocations : Int32 #

Number of active allocations, updated by MemAlloc/MemFree based on current context. May be off if you have multiple imgui contexts.


[View source]
def metrics_active_allocations=(metrics_active_allocations : Int32) #

[View source]
def metrics_active_windows : Int32 #

Number of active windows


[View source]
def metrics_active_windows=(metrics_active_windows : Int32) #

[View source]
def metrics_render_indices : Int32 #

Indices output during last call to Render() = number of triangles * 3


[View source]
def metrics_render_indices=(metrics_render_indices : Int32) #

[View source]
def metrics_render_vertices : Int32 #

Vertices output during last call to Render()


[View source]
def metrics_render_vertices=(metrics_render_vertices : Int32) #

[View source]
def metrics_render_windows : Int32 #

Number of visible windows


[View source]
def metrics_render_windows=(metrics_render_windows : Int32) #

[View source]
def mouse_clicked : Slice(Bool) #

Mouse button went from !Down to Down (same as MouseClickedCount[x] != 0)


[View source]
def mouse_clicked=(mouse_clicked : Slice(Bool)) #

[View source]
def mouse_clicked_count : Slice(UInt16) #

== 0 (not clicked), == 1 (same as MouseClicked[]), == 2 (double-clicked), == 3 (triple-clicked) etc. when going from !Down to Down


[View source]
def mouse_clicked_count=(mouse_clicked_count : Slice(UInt16)) #

[View source]
def mouse_clicked_last_count : Slice(UInt16) #

Count successive number of clicks. Stays valid after mouse release. Reset after another click is done.


[View source]
def mouse_clicked_last_count=(mouse_clicked_last_count : Slice(UInt16)) #

[View source]
def mouse_clicked_pos : Slice(ImVec2) #

Position at time of clicking


[View source]
def mouse_clicked_pos=(mouse_clicked_pos : Slice(ImVec2)) #

[View source]
def mouse_clicked_time : Slice(Float64) #

Time of last click (used to figure out double-click)


[View source]
def mouse_clicked_time=(mouse_clicked_time : Slice(Float64)) #

[View source]
def mouse_delta : ImVec2 #

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.


[View source]
def mouse_delta=(mouse_delta : ImVec2) #

[View source]
def mouse_double_click_max_dist : Float32 #

= 6.0f Distance threshold to stay in to validate a double-click, in pixels.


[View source]
def mouse_double_click_max_dist=(mouse_double_click_max_dist : Float32) #

[View source]
def mouse_double_click_time : Float32 #

= 0.30f Time for a double-click, in seconds.


[View source]
def mouse_double_click_time=(mouse_double_click_time : Float32) #

[View source]
def mouse_double_clicked : Slice(Bool) #

Has mouse button been double-clicked? (same as MouseClickedCount[x] == 2)


[View source]
def mouse_double_clicked=(mouse_double_clicked : Slice(Bool)) #

[View source]
def mouse_down : Slice(Bool) #

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.


[View source]
def mouse_down=(mouse_down : Slice(Bool)) #

[View source]
def mouse_down_duration : Slice(Float32) #

Duration the mouse button has been down (0.0f == just clicked)


[View source]
def mouse_down_duration=(mouse_down_duration : Slice(Float32)) #

[View source]
def mouse_down_duration_prev : Slice(Float32) #

Previous time the mouse button has been down


[View source]
def mouse_down_duration_prev=(mouse_down_duration_prev : Slice(Float32)) #

[View source]
def mouse_down_owned : Slice(Bool) #

Track if button was clicked inside a dear imgui window or over void blocked by a popup. We don't request mouse capture from the application if click started outside ImGui bounds.


[View source]
def mouse_down_owned=(mouse_down_owned : Slice(Bool)) #

[View source]
def mouse_down_owned_unless_popup_close : Slice(Bool) #

Track if button was clicked inside a dear imgui window.


[View source]
def mouse_down_owned_unless_popup_close=(mouse_down_owned_unless_popup_close : Slice(Bool)) #

[View source]
def mouse_drag_max_distance_sqr : Slice(Float32) #

Squared maximum distance of how much mouse has traveled from the clicking point (used for moving thresholds)


[View source]
def mouse_drag_max_distance_sqr=(mouse_drag_max_distance_sqr : Slice(Float32)) #

[View source]
def mouse_drag_threshold : Float32 #

= 6.0f Distance threshold before considering we are dragging.


[View source]
def mouse_drag_threshold=(mouse_drag_threshold : Float32) #

[View source]
def mouse_draw_cursor : Bool #

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


[View source]
def mouse_draw_cursor=(mouse_draw_cursor : Bool) #

[View source]
def mouse_pos : ImVec2 #

Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.)


[View source]
def mouse_pos=(mouse_pos : ImVec2) #

[View source]
def mouse_pos_prev : ImVec2 #

Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)


[View source]
def mouse_pos_prev=(mouse_pos_prev : ImVec2) #

[View source]
def mouse_released : Slice(Bool) #

Mouse button went from Down to !Down


[View source]
def mouse_released=(mouse_released : Slice(Bool)) #

[View source]
def mouse_wheel : Float32 #

Mouse wheel Vertical: 1 unit scrolls about 5 lines text.


[View source]
def mouse_wheel=(mouse_wheel : Float32) #

[View source]
def mouse_wheel_h : Float32 #

Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all backends.


[View source]
def mouse_wheel_h=(mouse_wheel_h : Float32) #

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


[View source]
def nav_active=(nav_active : Bool) #

[View source]
def nav_inputs : Slice(Float32) #

Gamepad inputs. Cleared back to zero by EndFrame(). Keyboard keys will be auto-mapped and be written here by NewFrame().


[View source]
def nav_inputs=(nav_inputs : Slice(Float32)) #

[View source]
def nav_inputs_down_duration : Slice(Float32) #

[View source]
def nav_inputs_down_duration=(nav_inputs_down_duration : Slice(Float32)) #

[View source]
def nav_inputs_down_duration_prev : Slice(Float32) #

[View source]
def nav_inputs_down_duration_prev=(nav_inputs_down_duration_prev : Slice(Float32)) #

[View source]
def nav_visible : Bool #

Keyboard/Gamepad navigation is visible and allowed (will handle ImGuiKey_NavXXX events).


[View source]
def nav_visible=(nav_visible : Bool) #

[View source]
def pen_pressure : Float32 #

Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.


[View source]
def pen_pressure=(pen_pressure : Float32) #

[View source]
def set_app_accepting_events(accepting_events : Bool) : Void #

Set master flag for accepting key/mouse/text events (default to true). Useful if you have native dialog boxes that are interrupting your application loop/refresh, and you want to disable events being queued while your app is frozen.

ImGuiIO::SetAppAcceptingEvents()


[View source]
def set_clipboard_text_fn : Pointer(Void), String -> Void #

[View source]
def set_clipboard_text_fn=(set_clipboard_text_fn : Pointer(Void), String -> Void) #

[View source]
def set_key_event_native_data(key : ImGuiKey, native_keycode : Int32, native_scancode : Int32, native_legacy_index : Int32 = -1) : Void #

[Optional] Specify index for legacy <1.87 IsKeyXXX() functions with native indices + specify native keycode, scancode.

ImGuiIO::SetKeyEventNativeData()


[View source]
def set_platform_ime_data_fn : ImGuiViewport, ImGuiPlatformImeData -> Void #

[View source]
def set_platform_ime_data_fn=(set_platform_ime_data_fn : ImGuiViewport, ImGuiPlatformImeData -> Void) #

[View source]
def to_unsafe : Pointer(T) #

[View source]
def user_data : Pointer(Void) #

= NULL Store your own data for retrieval by callbacks.


[View source]
def user_data=(user_data : Pointer(Void)) #

[View source]
def 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). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).


[View source]
def want_capture_keyboard=(want_capture_keyboard : Bool) #

[View source]
def 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). (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).


[View source]
def want_capture_mouse=(want_capture_mouse : Bool) #

[View source]
def want_capture_mouse_unless_popup_close : Bool #

Alternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose == false) when a click over void is expected to close a popup.


[View source]
def want_capture_mouse_unless_popup_close=(want_capture_mouse_unless_popup_close : Bool) #

[View source]
def 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. Important: clear io.WantSaveIniSettings yourself after saving!


[View source]
def want_save_ini_settings=(want_save_ini_settings : Bool) #

[View source]
def want_set_mouse_pos : Bool #

MousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled.


[View source]
def want_set_mouse_pos=(want_set_mouse_pos : Bool) #

[View source]
def want_text_input : Bool #

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


[View source]
def want_text_input=(want_text_input : Bool) #

[View source]