IM_ASSERT(&g.IO==this&&"Can only add events to current context.");
IM_ASSERT(ImGui::IsNamedKey(key));// Backend needs to pass a valid ImGuiKey_ constant. 0..511 values are legacy native key codes which are not accepted by this API.
// Verify that backend isn't mixing up using new io.AddKeyEvent() api and old io.KeysDown[] + io.KeyMap[] data.
// - trickle_fast_inputs = false : process all events, turn into flattened input state (e.g. successive down/up/down/up will be lost)
// - trickle_fast_inputs = true : process as many events as possible (successive down/up/down/up will be trickled over several frames so nothing is lost) (new feature in 1.87)
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals. Work in progress versions typically starts at XYY99 then bounce up to XYY00, XYY01 etc. when release tagging happens)
boolMouseDrawCursor;// = 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.
boolConfigMacOSXBehaviors;// = 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.
boolConfigInputEventQueue;// = 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.
boolConfigInputTextCursorBlink;// = true // Enable blinking cursor (optional as some users consider it to be distracting).
boolConfigDragClickToInputText;// = false // [BETA] Enable turning DragXXX widgets into text input with a simple mouse click-release (without moving). Not desirable on devices without a keyboard.
boolConfigWindowsResizeFromEdges;// = 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)
ImGui::SameLine();HelpMarker("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.");
ImGuiInputEventMousePosMousePos;// if Type == ImGuiInputEventType_MousePos
ImGuiInputEventMouseWheelMouseWheel;// if Type == ImGuiInputEventType_MouseWheel
ImGuiInputEventMouseButtonMouseButton;// if Type == ImGuiInputEventType_MouseButton
ImGuiInputEventKeyKey;// if Type == ImGuiInputEventType_Key
ImGuiInputEventKeyModsKeyMods;// if Type == ImGuiInputEventType_Modifiers
ImGuiInputEventTextText;// if Type == ImGuiInputEventType_Text
ImGuiInputEventAppFocusedAppFocused;// if Type == ImGuiInputEventType_Focus
};
ImGuiInputEvent(){memset(this,0,sizeof(*this));}
};
// FIXME-NAV: Clarify/expose various repeat delay/rate
enumImGuiInputReadMode
{
@ -1498,6 +1541,8 @@ struct ImGuiContext
boolInitialized;
boolFontAtlasOwnedByContext;// IO.Fonts-> is owned by the ImGuiContext and will be destructed along with it.
ImGuiIOIO;
ImVector<ImGuiInputEvent>InputEventsQueue;// Input events which will be tricked/written into IO structure.
ImVector<ImGuiInputEvent>InputEventsTrail;// Past input events processed in NewFrame(). This is to allow domain-specific application to access e.g mouse/pen trail.
floatFontSize;// (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window.
@ -2453,6 +2498,7 @@ namespace ImGui
IMGUI_APIvoidShutdown(ImGuiContext*context);// Since 1.60 this is a _private_ function. You can call DestroyContext() to destroy the context created by CreateContext().