ImGuiIO
Static Members
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)
| Name | Type |
|---|---|
self |
cpp.Star |
key |
Int |
down |
Bool |
addKeyAnalogEvent(self: cpp.Star, key: Int, down: Bool, v: cpp.Float32): VoidQueue a new key down/up event for analog values (e.g. ImGuiKey_Gamepad_ values). Dead-zones should be handled by the backend.
| Name | Type |
|---|---|
self |
cpp.Star |
key |
Int |
down |
Bool |
v |
cpp.Float32 |
addMousePosEvent(self: cpp.Star, x: cpp.Float32, y: cpp.Float32): VoidQueue a mouse position update. Use -FLT_MAX,-FLT_MAX to signify no mouse (e.g. app not focused and not hovered)
| Name | Type |
|---|---|
self |
cpp.Star |
x |
cpp.Float32 |
y |
cpp.Float32 |
Queue a mouse button change
| Name | Type |
|---|---|
self |
cpp.Star |
button |
Int |
down |
Bool |
addMouseWheelEvent(self: cpp.Star, wheelX: cpp.Float32, wheelY: cpp.Float32): VoidQueue a mouse wheel update. wheel_y<0: scroll down, wheel_y>0: scroll up, wheel_x<0: scroll right, wheel_x>0: scroll left.
| Name | Type |
|---|---|
self |
cpp.Star |
wheelX |
cpp.Float32 |
wheelY |
cpp.Float32 |
Queue a mouse source change (Mouse/TouchScreen/Pen)
| Name | Type |
|---|---|
self |
cpp.Star |
source |
Int |
Queue a mouse hovered viewport. Requires backend to set ImGuiBackendFlags_HasMouseHoveredViewport to call this (for multi-viewport support).
| Name | Type |
|---|---|
self |
cpp.Star |
id |
UInt |
Queue a gain/loss of focus for the application (generally based on OS/platform focus of your window)
| Name | Type |
|---|---|
self |
cpp.Star |
focused |
Bool |
Queue a new character input
| Name | Type |
|---|---|
self |
cpp.Star |
c |
UInt |
addInputCharacterUTF16(self: cpp.Star, c: cpp.UInt16): VoidQueue a new character input from a UTF-16 character, it can be a surrogate
| Name | Type |
|---|---|
self |
cpp.Star |
c |
cpp.UInt16 |
addInputCharactersUTF8(self: cpp.Star, str: cpp.ConstCharStar): VoidQueue a new characters input from a UTF-8 string
| Name | Type |
|---|---|
self |
cpp.Star |
str |
cpp.ConstCharStar |
setKeyEventNativeDataEx(self: cpp.Star, key: Int, nativeKeycode: Int, nativeScancode: Int, ?nativeLegacyIndex: Int = -1): Void[Optional] Specify index for legacy <1.87 IsKeyXXX() functions with native indices + specify native keycode, scancode.
| Name | Type | Default |
|---|---|---|
self |
cpp.Star | |
key |
Int | |
nativeKeycode |
Int | |
nativeScancode |
Int | |
nativeLegacyIndex |
Int | -1 |
Implied native_legacy_index = -1
| Name | Type |
|---|---|
self |
cpp.Star |
key |
Int |
nativeKeycode |
Int |
nativeScancode |
Int |
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.
| Name | Type |
|---|---|
self |
cpp.Star |
acceptingEvents |
Bool |
Clear all incoming events.
| Name | Type |
|---|---|
self |
cpp.Star |
Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all keys/buttons.
| Name | Type |
|---|---|
self |
cpp.Star |
Clear current mouse state.
| Name | Type |
|---|---|
self |
cpp.Star |
Instance Members
configFlags: Int= 0 // See ImGuiConfigFlags_ enum. Set by user/application. Keyboard/Gamepad navigation options, etc.
backendFlags: Int= 0 // See ImGuiBackendFlags_ enum. Set by backend (imgui_impl_xxx files or custom backend) to communicate features supported by the backend.
displaySize: ImVec2displayFramebufferScale: ImVec2= (1, 1) // Main display density. For retina display where window coordinates are different from framebuffer coordinates. This will affect font density + will end up in ImDrawData::FramebufferScale.
deltaTime: cpp.Float32= 1.0f/60.0f // Time elapsed since last frame, in seconds. May change every frame.
iniSavingRate: cpp.Float32= 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds.
iniFilename: cpp.ConstCharStar= "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.
logFilename: cpp.ConstCharStar= "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
userData: cpp.RawPointer<cpp.Void>= NULL // Store your own data.
fonts: cpp.StarfontDefault: cpp.Star= NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0].
fontAllowUserScaling: Bool= false // Allow user scaling text of individual window with Ctrl+Wheel.
= false // Swap Activate<>Cancel (A<>B) buttons, matching typical "Nintendo/Japanese style" gamepad layout.
= false // Directional/tabbing navigation teleports the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is difficult. Will update io.MousePos and set io.WantSetMousePos=true.
= true // Sets io.WantCaptureKeyboard when io.NavActive is set.
= true // Pressing Escape can clear focused item + navigation id/highlight. Set to false if you want to always keep highlight on.
= false // Pressing Escape can clear focused window as well (super set of io.ConfigNavEscapeClearFocusItem).
= true // Using directional navigation key makes the cursor visible. Mouse click hides the cursor.
= false // Navigation cursor is always visible.
configDockingNoSplit: Bool= false // Simplified docking mode: disable window splitting, so docking is limited to merging multiple windows together into tab-bars.
configDockingNoDockingOver: Bool= false // Simplified docking mode: disable window merging into a same tab-bar, so docking is limited to splitting windows.
configDockingWithShift: Bool= false // Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space)
configDockingAlwaysTabBar: Bool= false // [BETA] [FIXME: This currently creates regression with auto-sizing and general overhead] Make every single floating window display within a docking node.
configDockingTransparentPayload: Bool= false // [BETA] Make window or viewport transparent when docking and only display docking boxes on the target viewport. Useful if rendering of multiple viewport cannot be synced. Best used with ConfigViewportsNoAutoMerge.
configViewportsNoAutoMerge: Bool= false; // Set to make all floating imgui windows always create their own viewport. Otherwise, they are merged into the main host viewports when overlapping it. May also set ImGuiViewportFlags_NoAutoMerge on individual viewport.
configViewportsNoTaskBarIcon: Bool= false // Disable default OS task bar icon flag for secondary viewports. When a viewport doesn't want a task bar icon, ImGuiViewportFlags_NoTaskBarIcon will be set on it.
configViewportsNoDecoration: Bool= true // Disable default OS window decoration flag for secondary viewports. When a viewport doesn't want window decorations, ImGuiViewportFlags_NoDecoration will be set on it. Enabling decoration can create subsequent issues at OS levels (e.g. minimum window size).
configViewportsNoDefaultParent: Bool= true // Disable setting OS window parent to main viewport by default. The platform backend is expected to honor viewport->ParentViewportID to setup a parent/child relationship between the OS windows (supported if ImGuiBackendFlags_HasParentViewport is set). When parented: child windows always appear in front of their parent. Set to false if you want viewports to automatically be parent of main viewport, otherwise all viewports will be top-level OS windows. Parent/child relationship may be set on a per-window basis using ImGuiWindowClass.
configViewportsPlatformFocusSetsImGuiFocus: Bool= true // When a platform window is focused (e.g. using Alt+Tab, clicking Platform Title Bar), apply corresponding focus on imgui windows (may clear focus/active id from imgui windows location in other platform windows). In principle this is better enabled but we provide an opt-out, because some Linux window managers tend to eagerly focus windows (e.g. on mouse hover, or even a simple window pos/size change).
configDpiScaleFonts: Bool= false // [EXPERIMENTAL] Automatically overwrite style.FontScaleDpi when Monitor DPI changes. This will scale fonts but NOT scale sizes/padding for now.
configDpiScaleViewports: Bool= false // [EXPERIMENTAL] Scale Dear ImGui and Platform Windows when Monitor DPI changes.
mouseDrawCursor: 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.
configMacOSXBehaviors: Bool= defined(APPLE) // Swap Cmd<>Ctrl keys + 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.
configInputTrickleEventQueue: 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.
configInputTextCursorBlink: Bool= true // Enable blinking cursor (optional as some users consider it to be distracting).
configInputTextEnterKeepActive: Bool= false // [BETA] Pressing Enter will reactivate item and select all text (single-line only).
configDragClickToInputText: 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.
configWindowsResizeFromEdges: Bool= true // Enable resizing of windows from their edges and from the lower-left corner. This requires ImGuiBackendFlags_HasMouseCursors for better mouse cursor feedback. (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag)
configWindowsMoveFromTitleBarOnly: Bool= false // Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar.
configWindowsCopyContentsWithCtrlC: Bool= false // [EXPERIMENTAL] Ctrl+C copy the contents of focused window into the clipboard. Experimental because: (1) has known issues with nested Begin/End pairs (2) text output quality varies (3) text output is in submission order rather than spatial order.
configScrollbarScrollByPage: Bool= true // Enable scrolling page by page when clicking outside the scrollbar grab. When disabled, always scroll to clicked location. When enabled, Shift+Click scrolls to clicked location.
configMemoryCompactTimer: cpp.Float32= 60.0f // Timer (in seconds) to free transient windows/tables memory buffers when unused. Set to -1.0f to disable.
mouseDoubleClickTime: cpp.Float32= 0.30f // Time for a double-click, in seconds.
mouseDoubleClickMaxDist: cpp.Float32= 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
mouseDragThreshold: cpp.Float32= 6.0f // Distance threshold before considering we are dragging.
keyRepeatDelay: cpp.Float32= 0.275f // When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
keyRepeatRate: cpp.Float32= 0.050f // When holding a key/button, rate at which it repeats, in seconds.
configErrorRecovery: Bool= true // Enable error recovery support. Some errors won't be detected and lead to direct crashes if recovery is disabled.
configErrorRecoveryEnableAssert: Bool= true // Enable asserts on recoverable error. By default call IM_ASSERT() when returning from a failing IM_ASSERT_USER_ERROR()
configErrorRecoveryEnableDebugLog: Bool= true // Enable debug log output on recoverable errors.
configErrorRecoveryEnableTooltip: Bool= true // Enable tooltip on recoverable errors. The tooltip include a way to enable asserts if they were disabled.
configDebugIsDebuggerPresent: Bool= false // Enable various tools calling IM_DEBUG_BREAK().
configDebugHighlightIdConflicts: Bool= true // Highlight and show an error message popup when multiple items have conflicting identifiers.
configDebugHighlightIdConflictsShowItemPicker: Bool=true // Show "Item Picker" button in aforementioned popup.
configDebugBeginReturnValueOnce: Bool= false // First-time calls to Begin()/BeginChild() will return false. NEEDS TO BE SET AT APPLICATION BOOT TIME if you don't want to miss windows.
configDebugBeginReturnValueLoop: Bool= false // Some calls to Begin()/BeginChild() will return false. Will cycle through window depths then repeat. Suggested use: add "io.ConfigDebugBeginReturnValue = io.KeyShift" in your main loop then occasionally press SHIFT. Windows should be flickering while running.
configDebugIgnoreFocusLoss: Bool= false // Ignore io.AddFocusEvent(false), consequently not calling io.ClearInputKeys()/io.ClearInputMouse() in input processing.
configDebugIniSettings: Bool= false // Save .ini data with extra comments (particularly helpful for Docking, but makes saving slower)
backendPlatformName: cpp.ConstCharStar= NULL
backendRendererName: cpp.ConstCharStar= NULL
backendPlatformUserData: cpp.RawPointer<cpp.Void>= NULL // User data for platform backend
backendRendererUserData: cpp.RawPointer<cpp.Void>= NULL // User data for renderer backend
backendLanguageUserData: cpp.RawPointer<cpp.Void>= NULL // User data for non C++ programming language backend
wantCaptureMouse: BoolSet 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.).
wantCaptureKeyboard: BoolSet 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.).
wantTextInput: BoolMobile/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).
wantSetMousePos: BoolMousePos has been altered, backend should reposition mouse on next frame. Rarely used! Set only when io.ConfigNavMoveSetMousePos is enabled.
wantSaveIniSettings: BoolWhen 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!
Keyboard/Gamepad navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
Keyboard/Gamepad navigation highlight is visible and allowed (will handle ImGuiKey_NavXXX events).
framerate: cpp.Float32Estimate of application framerate (rolling average over 60 frames, based on io.DeltaTime), in frame per second. Solely for convenience. Slow applications may not want to use a moving average or may want to reset underlying buffers occasionally.
metricsRenderVertices: IntVertices output during last call to Render()
metricsRenderIndices: IntIndices output during last call to Render() = number of triangles * 3
metricsRenderWindows: IntNumber of visible windows
metricsActiveWindows: IntNumber of active windows
mouseDelta: ImVec2Mouse 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.
ctx: cpp.StarParent UI context (needs to be set explicitly by parent).
mousePos: ImVec2Mouse position, in pixels. Set to ImVec2(-FLT_MAX, -FLT_MAX) if mouse is unavailable (on another screen, etc.)
mouseWheel: cpp.Float32Mouse wheel Vertical: 1 unit scrolls about 5 lines text. >0 scrolls Up, <0 scrolls Down. Hold Shift to turn vertical scroll into horizontal scroll.
mouseWheelH: cpp.Float32Mouse wheel Horizontal. >0 scrolls Left, <0 scrolls Right. Most users don't have a mouse with a horizontal wheel, may not be filled by all backends.
mouseSource: IntMouse actual input peripheral (Mouse/TouchScreen/Pen).
mouseHoveredViewport: UInt(Optional) Modify using io.AddMouseViewportEvent(). With multi-viewports: viewport the OS mouse is hovering. If possible IGNORING viewports with the ImGuiViewportFlags_NoInputs flag is much better (few backends can handle that). Set io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport if you can provide this info. If you don't imgui will infer the value using the rectangles and last focused time of the viewports it knows about (ignoring other OS windows).
keyCtrl: BoolKeyboard modifier down: Ctrl (non-macOS), Cmd (macOS)
keyShift: BoolKeyboard modifier down: Shift
keyAlt: BoolKeyboard modifier down: Alt
keySuper: BoolKeyboard modifier down: Windows/Super (non-macOS), Ctrl (macOS)
keyMods: IntKey mods flags (any of ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Alt/ImGuiMod_Super flags, same as io.KeyCtrl/KeyShift/KeyAlt/KeySuper but merged into flags). Read-only, updated by NewFrame()
wantCaptureMouseUnlessPopupClose: BoolAlternative to WantCaptureMouse: (WantCaptureMouse == true && WantCaptureMouseUnlessPopupClose == false) when a click over void is expected to close a popup.
mousePosPrev: ImVec2Previous mouse position (note that MouseDelta is not necessary == MousePos-MousePosPrev, in case either position is invalid)
mouseWheelRequestAxisSwap: BoolOn a non-Mac system, holding Shift requests WheelY to perform the equivalent of a WheelX event. On a Mac system this is already enforced by the system.
mouseCtrlLeftAsRightClick: Bool(OSX) Set to true when the current click was a Ctrl+Click that spawned a simulated right click
penPressure: cpp.Float32Touch/Pen pressure (0.0f to 1.0f, should be >0.0f only when MouseDown[0] == true). Helper storage currently unused by Dear ImGui.
appFocusLost: BoolOnly modify via AddFocusEvent()
appAcceptingEvents: BoolOnly modify via SetAppAcceptingEvents()
inputQueueSurrogate: cpp.UInt16For AddInputCharacterUTF16()
inputQueueCharacters: ImVector_ImWcharQueue of characters input (obtained by platform backend). Fill using AddInputCharacter() helper.
Metadata
| Name | Parameters |
|---|---|
:structAccess |
- |
:include |
"linc_imgui.h" |