IM_ASSERT(ImIsPowerOfTwo(flags&ImGuiInputFlags_RouteTypeMask_));// Check that only 1 routing flag is used
if((flags&ImGuiInputFlags_RouteTypeMask_)==0)
flags|=ImGuiInputFlags_RouteGlobal|ImGuiInputFlags_RouteOverFocused|ImGuiInputFlags_RouteOverActive;// IMPORTANT: This is the default for SetShortcutRouting() but NOT Shortcut()
else
IM_ASSERT(ImIsPowerOfTwo(flags&ImGuiInputFlags_RouteTypeMask_));// Check that only 1 routing flag is used
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.90.7 WIP"
#define IMGUI_VERSION "1.90.7"
#define IMGUI_VERSION_NUM 19067
#define IMGUI_VERSION_NUM 19070
#define IMGUI_HAS_TABLE
#define IMGUI_HAS_TABLE
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
#define IMGUI_HAS_VIEWPORT // Viewport WIP branch
#define IMGUI_HAS_DOCK // Docking WIP branch
#define IMGUI_HAS_DOCK // Docking WIP branch
@ -970,7 +970,7 @@ namespace ImGui
IMGUI_APIconstchar*GetKeyName(ImGuiKeykey);// [DEBUG] returns English name of the key. Those names a provided for debugging purpose and are not meant to be saved persistently not compared.
IMGUI_APIconstchar*GetKeyName(ImGuiKeykey);// [DEBUG] returns English name of the key. Those names a provided for debugging purpose and are not meant to be saved persistently not compared.
IMGUI_APIvoidSetNextFrameWantCaptureKeyboard(boolwant_capture_keyboard);// Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard"; after the next NewFrame() call.
IMGUI_APIvoidSetNextFrameWantCaptureKeyboard(boolwant_capture_keyboard);// Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle, typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard"; after the next NewFrame() call.
IMGUI_APIboolIsAnyMouseDown();// [WILL OBSOLETE] is any mouse button held? This was designed for backends, but prefer having backend maintain a mask of held mouse buttons, because upcoming input queue system will make this invalid.
IMGUI_APIboolIsAnyMouseDown();// [WILL OBSOLETE] is any mouse button held? This was designed for backends, but prefer having backend maintain a mask of held mouse buttons, because upcoming input queue system will make this invalid.
IMGUI_APIImVec2GetMousePos();// shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
IMGUI_APIImVec2GetMousePos();// shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
IMGUI_APIImVec2GetMousePosOnOpeningCurrentPopup();// retrieve mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user backing that value themselves)
IMGUI_APIImVec2GetMousePosOnOpeningCurrentPopup();// retrieve mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user backing that value themselves)
IMGUI_APIboolIsMouseDragging(ImGuiMouseButtonbutton,floatlock_threshold=-1.0f);// is mouse dragging? (if lock_threshold < -1.0f, uses io.MouseDraggingThreshold)
IMGUI_APIboolIsMouseDragging(ImGuiMouseButtonbutton,floatlock_threshold=-1.0f);// is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold < 0.0f)
IMGUI_APIImVec2GetMouseDragDelta(ImGuiMouseButtonbutton=0,floatlock_threshold=-1.0f);// return the delta from the initial clicking position while the mouse button is pressed or was just released. This is locked and return 0.0f until the mouse moves past a distance threshold at least once (if lock_threshold < -1.0f, uses io.MouseDraggingThreshold)
IMGUI_APIImVec2GetMouseDragDelta(ImGuiMouseButtonbutton=0,floatlock_threshold=-1.0f);// return the delta from the initial clicking position while the mouse button is pressed or was just released. This is locked and return 0.0f until the mouse moves past a distance threshold at least once (uses io.MouseDraggingThreshold if lock_threshold < 0.0f)
IMGUI_APIImGuiMouseCursorGetMouseCursor();// get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you
IMGUI_APIImGuiMouseCursorGetMouseCursor();// get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you
IMGUI_APIvoidSetMouseCursor(ImGuiMouseCursorcursor_type);// set desired mouse cursor shape
IMGUI_APIvoidSetMouseCursor(ImGuiMouseCursorcursor_type);// set desired mouse cursor shape
@ -1546,7 +1546,7 @@ enum ImGuiInputFlags_
ImGuiInputFlags_Repeat=1<<0,// Enable repeat. Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1.
ImGuiInputFlags_Repeat=1<<0,// Enable repeat. Return true on successive repeats. Default for legacy IsKeyPressed(). NOT Default for legacy IsMouseClicked(). MUST BE == 1.
// Flags for Shortcut(), SetNextItemShortcut()
// Flags for Shortcut(), SetNextItemShortcut()
// - Routing policies: RouteGlobalOverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobalOverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal.
// - Routing policies: RouteGlobal+OverActive >> RouteActive or RouteFocused (if owner is active item) >> RouteGlobal+OverFocused >> RouteFocused (if in focused window stack) >> RouteGlobal.
// - Default policy is RouteFocused. Can select only 1 policy among all available.
// - Default policy is RouteFocused. Can select only 1 policy among all available.
ImGuiInputFlags_RouteActive=1<<10,// Route to active item only.
ImGuiInputFlags_RouteActive=1<<10,// Route to active item only.
ImGuiInputFlags_RouteFocused=1<<11,// Route to windows in the focus stack (DEFAULT). Deep-most focused window takes inputs. Active item takes inputs over deep-most focused window.
ImGuiInputFlags_RouteFocused=1<<11,// Route to windows in the focus stack (DEFAULT). Deep-most focused window takes inputs. Active item takes inputs over deep-most focused window.
@ -1559,7 +1559,7 @@ enum ImGuiInputFlags_
ImGuiInputFlags_RouteFromRootWindow=1<<17,// Option: route evaluated from the point of view of root window rather than current window.
ImGuiInputFlags_RouteFromRootWindow=1<<17,// Option: route evaluated from the point of view of root window rather than current window.
// Flags for SetNextItemShortcut()
// Flags for SetNextItemShortcut()
ImGuiInputFlags_Tooltip=1<<18,// Automatically display a tooltip when hovering item.
ImGuiInputFlags_Tooltip=1<<18,// Automatically display a tooltip when hovering item [BETA] Unsure of right api (opt-in/opt-out)
IMGUI_APIboolImageButton(ImTextureIDuser_texture_id,constImVec2&size,constImVec2&uv0=ImVec2(0,0),constImVec2&uv1=ImVec2(1,1),intframe_padding=-1,constImVec4&bg_col=ImVec4(0,0,0,0),constImVec4&tint_col=ImVec4(1,1,1,1));// Use new ImageButton() signature (explicit item id, regular FramePadding)
IMGUI_APIboolImageButton(ImTextureIDuser_texture_id,constImVec2&size,constImVec2&uv0=ImVec2(0,0),constImVec2&uv1=ImVec2(1,1),intframe_padding=-1,constImVec4&bg_col=ImVec4(0,0,0,0),constImVec4&tint_col=ImVec4(1,1,1,1));// Use new ImageButton() signature (explicit item id, regular FramePadding)
// OBSOLETED in 1.88 (from May 2022)
staticinlinevoidCaptureKeyboardFromApp(boolwant_capture_keyboard=true){SetNextFrameWantCaptureKeyboard(want_capture_keyboard);}// Renamed as name was misleading + removed default value.
staticinlinevoidCaptureMouseFromApp(boolwant_capture_mouse=true){SetNextFrameWantCaptureMouse(want_capture_mouse);}// Renamed as name was misleading + removed default value.
// OBSOLETED in 1.87 (from February 2022)
// OBSOLETED in 1.87 (from February 2022)
IMGUI_APIImGuiKeyGetKeyIndex(ImGuiKeykey);// Map ImGuiKey_* values into legacy native key index. == io.KeyMap[key]. When using a 1.87+ backend using io.AddKeyEvent(), calling GetKeyIndex() with ANY ImGuiKey_XXXX values will return the same value!
IMGUI_APIImGuiKeyGetKeyIndex(ImGuiKeykey);// Map ImGuiKey_* values into legacy native key index. == io.KeyMap[key]. When using a 1.87+ backend using io.AddKeyEvent(), calling GetKeyIndex() with ANY ImGuiKey_XXXX values will return the same value!
// Some of the older obsolete names along with their replacement (commented out so they are not reported in IDE)
// Some of the older obsolete names along with their replacement (commented out so they are not reported in IDE)
//-- OBSOLETED in 1.88 (from May 2022)
//static inline void CaptureKeyboardFromApp(bool want_capture_keyboard = true) { SetNextFrameWantCaptureKeyboard(want_capture_keyboard); } // Renamed as name was misleading + removed default value.
//static inline void CaptureMouseFromApp(bool want_capture_mouse = true) { SetNextFrameWantCaptureMouse(want_capture_mouse); } // Renamed as name was misleading + removed default value.
//-- OBSOLETED in 1.86 (from November 2021)
//-- OBSOLETED in 1.86 (from November 2021)
//IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // Code removed, see 1.90 for last version of the code. Calculate range of visible items for large list of evenly sized items. Prefer using ImGuiListClipper.
//IMGUI_API void CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); // Code removed, see 1.90 for last version of the code. Calculate range of visible items for large list of evenly sized items. Prefer using ImGuiListClipper.
// - Repeat mode: Specify when repeating key pressed can be interrupted.
// - Repeat mode: Specify when repeating key pressed can be interrupted.
// - In theory ImGuiInputFlags_RepeatUntilOtherKeyPress may be a desirable default, but it would break too many behavior so everything is opt-in.
// - In theory ImGuiInputFlags_RepeatUntilOtherKeyPress may be a desirable default, but it would break too many behavior so everything is opt-in.
ImGuiInputFlags_RepeatUntilRelease=1<<4,// Stop repeating when released (default for all functions except Shortcut). This only exists to allow overriding Shortcut() default behavior.
ImGuiInputFlags_RepeatUntilRelease=1<<4,// Stop repeating when released (default for all functions except Shortcut). This only exists to allow overriding Shortcut() default behavior.
ImGuiInputFlags_RepeatUntilKeyModsChange=1<<5,// Stop repeating when released OR if keyboard mods are changed (default for Shortcut)
ImGuiInputFlags_RepeatUntilKeyModsChange=1<<5,// Stop repeating when released OR if keyboard mods are changed (default for Shortcut)
ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone=1<<6,// Stop repeating when released OR if keyboard mods are leaving the None state. Allows going from Mod+Key to Key by releasing Mod.
ImGuiInputFlags_RepeatUntilKeyModsChangeFromNone=1<<6,// Stop repeating when released OR if keyboard mods are leaving the None state. Allows going from Mod+Key to Key by releasing Mod.
ImGuiInputFlags_RepeatUntilOtherKeyPress=1<<7,// Stop repeating when released OR if any other keyboard key is pressed during the repeat
ImGuiInputFlags_RepeatUntilOtherKeyPress=1<<7,// Stop repeating when released OR if any other keyboard key is pressed during the repeat
// Flags for SetKeyOwner(), SetItemKeyOwner()
// Flags for SetKeyOwner(), SetItemKeyOwner()
// - Locking key away from non-input aware code. Locking is useful to make input-owner-aware code steal keys from non-input-owner-aware code. If all code is input-owner-aware locking would never be necessary.
// - Locking key away from non-input aware code. Locking is useful to make input-owner-aware code steal keys from non-input-owner-aware code. If all code is input-owner-aware locking would never be necessary.
ImGuiInputFlags_LockThisFrame=1<<20,// Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared at end of frame.
ImGuiInputFlags_LockThisFrame=1<<20,// Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared at end of frame.
ImGuiInputFlags_LockUntilRelease=1<<21,// Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared when the key is released or at end of each frame if key is released.
ImGuiInputFlags_LockUntilRelease=1<<21,// Further accesses to key data will require EXPLICIT owner ID (ImGuiKeyOwner_Any/0 will NOT accepted for polling). Cleared when the key is released or at end of each frame if key is released.
// - Condition for SetItemKeyOwner()
// - Condition for SetItemKeyOwner()
ImGuiInputFlags_CondHovered=1<<22,// Only set if item is hovered (default to both)
ImGuiInputFlags_CondHovered=1<<22,// Only set if item is hovered (default to both)
ImGuiInputFlags_CondActive=1<<23,// Only set if item is active (default to both)
ImGuiInputFlags_CondActive=1<<23,// Only set if item is active (default to both)
IMGUI_APIboolSetShortcutRouting(ImGuiKeyChordkey_chord,ImGuiInputFlagsflags,ImGuiIDowner_id);// routing policy and owner_id needs to be explicit and cannot be 0
IMGUI_APIboolSetShortcutRouting(ImGuiKeyChordkey_chord,ImGuiInputFlagsflags,ImGuiIDowner_id);// owner_id needs to be explicit and cannot be 0
inlineboolIsKeyPressedMap(ImGuiKeykey,boolrepeat=true){IM_ASSERT(IsNamedKey(key));returnIsKeyPressed(key,repeat);}// Removed in 1.87: Mapping from named key is always identity!