struct ImGuiIO

Overview

#include <imgui.h>

struct ImGuiIO
{
    // fields

    ImGuiConfigFlags ConfigFlags;
    ImGuiBackendFlags BackendFlags;
    ImVec2 DisplaySize;
    ImVec2 DisplayFramebufferScale;
    float DeltaTime;
    float IniSavingRate;
    const char* IniFilename;
    const char* LogFilename;
    void* UserData;
    ImFontAtlas* Fonts;
    ImFont* FontDefault;
    bool FontAllowUserScaling;
    bool ConfigNavSwapGamepadButtons;
    bool ConfigNavMoveSetMousePos;
    bool ConfigNavCaptureKeyboard;
    bool ConfigNavEscapeClearFocusItem;
    bool ConfigNavEscapeClearFocusWindow;
    bool ConfigNavCursorVisibleAuto;
    bool ConfigNavCursorVisibleAlways;
    bool ConfigDockingNoSplit;
    bool ConfigDockingNoDockingOver;
    bool ConfigDockingWithShift;
    bool ConfigDockingAlwaysTabBar;
    bool ConfigDockingTransparentPayload;
    bool ConfigViewportsNoAutoMerge;
    bool ConfigViewportsNoTaskBarIcon;
    bool ConfigViewportsNoDecoration;
    bool ConfigViewportsNoDefaultParent;
    bool ConfigViewportsPlatformFocusSetsImGuiFocus;
    bool ConfigDpiScaleFonts;
    bool ConfigDpiScaleViewports;
    bool MouseDrawCursor;
    bool ConfigMacOSXBehaviors;
    bool ConfigInputTrickleEventQueue;
    bool ConfigInputTextCursorBlink;
    bool ConfigInputTextEnterKeepActive;
    bool ConfigDragClickToInputText;
    bool ConfigWindowsResizeFromEdges;
    bool ConfigWindowsMoveFromTitleBarOnly;
    bool ConfigWindowsCopyContentsWithCtrlC;
    bool ConfigScrollbarScrollByPage;
    float ConfigMemoryCompactTimer;
    float MouseDoubleClickTime;
    float MouseDoubleClickMaxDist;
    float MouseDragThreshold;
    float KeyRepeatDelay;
    float KeyRepeatRate;
    bool ConfigErrorRecovery;
    bool ConfigErrorRecoveryEnableAssert;
    bool ConfigErrorRecoveryEnableDebugLog;
    bool ConfigErrorRecoveryEnableTooltip;
    bool ConfigDebugIsDebuggerPresent;
    bool ConfigDebugHighlightIdConflicts;
    bool ConfigDebugHighlightIdConflictsShowItemPicker;
    bool ConfigDebugBeginReturnValueOnce;
    bool ConfigDebugBeginReturnValueLoop;
    bool ConfigDebugIgnoreFocusLoss;
    bool ConfigDebugIniSettings;
    const char* BackendPlatformName;
    const char* BackendRendererName;
    void* BackendPlatformUserData;
    void* BackendRendererUserData;
    void* BackendLanguageUserData;
    bool WantCaptureMouse;
    bool WantCaptureKeyboard;
    bool WantTextInput;
    bool WantSetMousePos;
    bool WantSaveIniSettings;
    bool NavActive;
    bool NavVisible;
    float Framerate;
    int MetricsRenderVertices;
    int MetricsRenderIndices;
    int MetricsRenderWindows;
    int MetricsActiveWindows;
    ImVec2 MouseDelta;
    ImGuiContext* Ctx;
    ImVec2 MousePos;
    bool MouseDown[5];
    float MouseWheel;
    float MouseWheelH;
    ImGuiMouseSource MouseSource;
    ImGuiID MouseHoveredViewport;
    bool KeyCtrl;
    bool KeyShift;
    bool KeyAlt;
    bool KeySuper;
    ImGuiKeyChord KeyMods;
    ImGuiKeyData KeysData[ImGuiKey_NamedKey_COUNT];
    bool WantCaptureMouseUnlessPopupClose;
    ImVec2 MousePosPrev;
    ImVec2 MouseClickedPos[5];
    double MouseClickedTime[5];
    bool MouseClicked[5];
    bool MouseDoubleClicked[5];
    ImU16 MouseClickedCount[5];
    ImU16 MouseClickedLastCount[5];
    bool MouseReleased[5];
    double MouseReleasedTime[5];
    bool MouseDownOwned[5];
    bool MouseDownOwnedUnlessPopupClose[5];
    bool MouseWheelRequestAxisSwap;
    bool MouseCtrlLeftAsRightClick;
    float MouseDownDuration[5];
    float MouseDownDurationPrev[5];
    ImVec2 MouseDragMaxDistanceAbs[5];
    float MouseDragMaxDistanceSqr[5];
    float PenPressure;
    bool AppFocusLost;
    bool AppAcceptingEvents;
    ImWchar16 InputQueueSurrogate;
    ImVector<ImWchar> InputQueueCharacters;
    float FontGlobalScale;
    const char*(* GetClipboardTextFn)(void *user_data);
    void(* SetClipboardTextFn)(void *user_data, const char *text);
    void* ClipboardUserData;

    // methods

    IMGUI_API void AddKeyEvent(
        ImGuiKey key,
        bool down
        );

    IMGUI_API void AddKeyAnalogEvent(
        ImGuiKey key,
        bool down,
        float v
        );

    IMGUI_API void AddMousePosEvent(
        float x,
        float y
        );

    IMGUI_API void AddMouseButtonEvent(
        int button,
        bool down
        );

    IMGUI_API void AddMouseWheelEvent(
        float wheel_x,
        float wheel_y
        );

    IMGUI_API void AddMouseSourceEvent(ImGuiMouseSource source);
    IMGUI_API void AddMouseViewportEvent(ImGuiID id);
    IMGUI_API void AddFocusEvent(bool focused);
    IMGUI_API void AddInputCharacter(unsigned int c);
    IMGUI_API void AddInputCharacterUTF16(ImWchar16 c);
    IMGUI_API void AddInputCharactersUTF8(const char* str);

    IMGUI_API void SetKeyEventNativeData(
        ImGuiKey key,
        int native_keycode,
        int native_scancode,
        int native_legacy_index = -1
        );

    IMGUI_API void SetAppAcceptingEvents(bool accepting_events);
    IMGUI_API void ClearEventsQueue();
    IMGUI_API void ClearInputKeys();
    IMGUI_API void ClearInputMouse();
};