// - Software using Dear ImGui https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui
// - Issues & support ........... https://github.com/ocornut/imgui/issues
// - Test Engine & Automation ... https://github.com/ocornut/imgui_test_engine (test suite, test engine to automate your apps)
// - Web version of the Demo .... https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html (w/ source code browser)
// - Web version of the Demo .... https://pthom.github.io/imgui_manual (w/ source code browser)
// For FIRST-TIME users having issues compiling/linking/running:
// please post in https://github.com/ocornut/imgui/discussions if you cannot find a solution in resources above.
@ -29,8 +29,8 @@
// Library Version
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
#define IMGUI_VERSION "1.92.6 WIP"
#define IMGUI_VERSION_NUM 19258
#define IMGUI_VERSION "1.92.7 WIP"
#define IMGUI_VERSION_NUM 19266
#define IMGUI_HAS_TABLE // Added BeginTable() - from IMGUI_VERSION_NUM >= 18000
#define IMGUI_HAS_TEXTURES // Added ImGuiBackendFlags_RendererHasTextures - from IMGUI_VERSION_NUM >= 19198
@ -340,7 +340,9 @@ IM_MSVC_RUNTIME_CHECKS_RESTORE
typedefImU64ImTextureID;// Default: store up to 64-bits (any pointer or integer). A majority of backends are ok with that.
#endif
// Define this if you need 0 to be a valid ImTextureID for your backend.
// Define this if you need to change the invalid value for your backend.
// - If your backend is using ImTextureID to store an index/offset and you need 0 to be valid, You can add '#define ImTextureID_Invalid ((ImTextureID)-1)' in your imconfig.h file.
// - From 2026/03/12 to 2026/03/19 we experimented with changing to default to -1, but I worried it would cause too many issues in third-party code so it was reverted.
#ifndef ImTextureID_Invalid
#define ImTextureID_Invalid ((ImTextureID)0)
#endif
@ -757,6 +759,7 @@ namespace ImGui
IMGUI_APIboolCollapsingHeader(constchar*label,bool*p_visible,ImGuiTreeNodeFlagsflags=0);// when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right of the header which will set the bool to false when clicked, if '*p_visible==false' don't display the header.
IMGUI_APIvoidSetNextItemOpen(boolis_open,ImGuiCondcond=0);// set next TreeNode/CollapsingHeader open state.
IMGUI_APIvoidSetNextItemStorageID(ImGuiIDstorage_id);// set id to use for open/close storage (default to same as item id).
IMGUI_APIboolTreeNodeGetOpen(ImGuiIDstorage_id);// retrieve tree node open/close state.
// Widgets: Selectables
// - A selectable highlights when hovered, and can display another color when selected.
@ -854,20 +857,23 @@ namespace ImGui
// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options).
// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup().
// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened.
// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter
IMGUI_APIvoidOpenPopup(constchar*str_id,ImGuiPopupFlagspopup_flags=0);// call to mark popup as open (don't call every frame!).
IMGUI_APIvoidOpenPopup(ImGuiIDid,ImGuiPopupFlagspopup_flags=0);// id overload to facilitate calling from nested stacks
IMGUI_APIvoidOpenPopupOnItemClick(constchar*str_id=NULL,ImGuiPopupFlagspopup_flags=1);// helper to open popup when clicked on last item. Default to ImGuiPopupFlags_MouseButtonRight == 1. (note: actually triggers on the mouse _released_ event to be consistent with popup behaviors)
IMGUI_APIvoidOpenPopupOnItemClick(constchar*str_id=NULL,ImGuiPopupFlagspopup_flags=0);// helper to open popup when clicked on last item. Default to ImGuiPopupFlags_MouseButtonRight == 1. (note: actually triggers on the mouse _released_ event to be consistent with popup behaviors)
IMGUI_APIvoidCloseCurrentPopup();// manually close the popup we have begin-ed into.
// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking.
// - They are convenient to easily create context menus, hence the name.
// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future.
// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight.
IMGUI_APIboolBeginPopupContextItem(constchar*str_id=NULL,ImGuiPopupFlagspopup_flags=1);// open+begin popup when clicked on last item. Use str_id==NULL to associate the popup to previous item. If you want to use that on a non-interactive item such as Text() you need to pass in an explicit ID here. read comments in .cpp!
IMGUI_APIboolBeginPopupContextWindow(constchar*str_id=NULL,ImGuiPopupFlagspopup_flags=1);// open+begin popup when clicked on current window.
IMGUI_APIboolBeginPopupContextVoid(constchar*str_id=NULL,ImGuiPopupFlagspopup_flags=1);// open+begin popup when clicked in void (where there are no windows).
// - IMPORTANT: If you ever used the left mouse button with BeginPopupContextXXX() helpers before 1.92.6:
// - Before this version, OpenPopupOnItemClick(), BeginPopupContextItem(), BeginPopupContextWindow(), BeginPopupContextVoid() had 'a ImGuiPopupFlags popup_flags = 1' default value in their function signature.
// - Before: Explicitly passing a literal 0 meant ImGuiPopupFlags_MouseButtonLeft. The default = 1 meant ImGuiPopupFlags_MouseButtonRight.
// - After: The default = 0 means ImGuiPopupFlags_MouseButtonRight. Explicitly passing a literal 1 also means ImGuiPopupFlags_MouseButtonRight (if legacy behavior are enabled) or will assert (if legacy behavior are disabled).
// - TL;DR: if you don't want to use right mouse button for popups, always specify it explicitly using a named ImGuiPopupFlags_MouseButtonXXXX value.
// - Read "API BREAKING CHANGES" 2026/01/07 (1.92.6) entry in imgui.cpp or GitHub topic #9157 for all details.
IMGUI_APIboolBeginPopupContextItem(constchar*str_id=NULL,ImGuiPopupFlagspopup_flags=0);// open+begin popup when clicked on last item. Use str_id==NULL to associate the popup to previous item. If you want to use that on a non-interactive item such as Text() you need to pass in an explicit ID here. read comments in .cpp!
IMGUI_APIboolBeginPopupContextWindow(constchar*str_id=NULL,ImGuiPopupFlagspopup_flags=0);// open+begin popup when clicked on current window.
IMGUI_APIboolBeginPopupContextVoid(constchar*str_id=NULL,ImGuiPopupFlagspopup_flags=0);// open+begin popup when clicked in void (where there are no windows).
// Popups: query functions
// - IsPopupOpen(): return true if the popup is open at the current BeginPopup() level of the popup stack.
@ -978,7 +984,7 @@ namespace ImGui
// Disabling [BETA API]
// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled)
// - Tooltips windows are automatically opted out of disabling. Note that IsItemHovered() by default returns false on disabled items, unless using ImGuiHoveredFlags_AllowWhenDisabled.
// - Tooltips windows are automatically opted out of disabling. Note that IsItemHovered() by default returns false on disabled items, unless using ImGuiHoveredFlags_AllowWhenDisabled.
// - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls)
IMGUI_APIvoidBeginDisabled(booldisabled=true);
IMGUI_APIvoidEndDisabled();
@ -996,7 +1002,7 @@ namespace ImGui
IMGUI_APIvoidSetNavCursorVisible(boolvisible);// alter visibility of keyboard/gamepad cursor. by default: show when using an arrow key, hide when clicking with mouse.
// Overlapping mode
IMGUI_APIvoidSetNextItemAllowOverlap();// allow next item to be overlapped by a subsequent item. Useful with invisible buttons, selectable, treenode covering an area where subsequent items may need to be added. Note that both Selectable() and TreeNode() have dedicated flags doing this.
IMGUI_APIvoidSetNextItemAllowOverlap();// allow next item to be overlapped by a subsequent item. Typically useful with InvisibleButton(), Selectable(), TreeNode() covering an area where subsequent items may need to be added. Note that both Selectable() and TreeNode() have dedicated flags doing this.
// Item/Widgets Utilities and Query Functions
// - Most of the functions are referring to the previous Item that has been submitted.
// Inputs Utilities: Raw Keyboard/Mouse/Gamepad Access
// - Consider using the Shortcut() function instead of IsKeyPressed()/IsKeyChordPressed()! Shortcut() is easier to use and better featured (can do focus routing check).
// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
// - (legacy: any use of ImGuiKey will assert when key < 512 to detect passing legacy native/user indices)
// - (legacy: before v1.87 (2022-02), we used ImGuiKey < 512 values to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
IMGUI_APIboolIsKeyDown(ImGuiKeykey);// is key being held.
IMGUI_APIboolIsKeyPressed(ImGuiKeykey,boolrepeat=true);// was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate
IMGUI_APIboolIsKeyPressed(ImGuiKeykey,boolrepeat=true);// was key pressed (went from !Down to Down)? Repeat rate uses io.KeyRepeatDelay / KeyRepeatRate.
IMGUI_APIboolIsKeyReleased(ImGuiKeykey);// was key released (went from Down to !Down)?
IMGUI_APIboolIsKeyChordPressed(ImGuiKeyChordkey_chord);// was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord. This doesn't do any routing or focus check, please consider using Shortcut() function instead.
IMGUI_APIintGetKeyPressedAmount(ImGuiKeykey,floatrepeat_delay,floatrate);// uses provided repeat rate/delay. return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate
IMGUI_APIconstchar*GetKeyName(ImGuiKeykey);// [DEBUG] returns English name of the key. Those names are provided for debugging purpose and are not meant to be saved persistently nor 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.
// The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical.
// This is an important property as it facilitate working with foreign code or larger codebase.
// - To understand the difference:
// - IsKeyChordPressed() compares mods and call IsKeyPressed() -> function has no side-effect.
// - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed() -> function has (desirable) side-effects as it can prevents another call from getting the route.
// - IsKeyChordPressed() compares mods and call IsKeyPressed()
// -> the function has no side-effect.
// - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed()
// -> the function has (desirable) side-effects as it can prevents another call from getting the route.
// - Visualize registered routes in 'Metrics/Debugger->Inputs'.
IMGUI_APIconstchar*SaveIniSettingsToMemory(size_t*out_ini_size=NULL);// return a zero-terminated string with the .ini data which you can save by your own mean. call when io.WantSaveIniSettings is set, then save data by your own mean and clear io.WantSaveIniSettings.
// Debug Utilities
// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo->Tools->Metrics Debugger
// - Your main debugging friend is the ShowMetricsWindow() function.
// - Interactive tools are all accessible from the 'Dear ImGui Demo->Tools' menu.
// - Read https://github.com/ocornut/imgui/wiki/Debug-Tools for a description of all available debug tools.
IMGUI_APIvoidDebugTextEncoding(constchar*text);
IMGUI_APIvoidDebugFlashStyleColor(ImGuiColidx);
IMGUI_APIvoidDebugStartItemPicker();
@ -1231,7 +1244,7 @@ enum ImGuiItemFlags_
ImGuiItemFlags_ButtonRepeat=1<<3,// false // Any button-like behavior will have repeat mode enabled (based on io.KeyRepeatDelay and io.KeyRepeatRate values). Note that you can also call IsItemActive() after any button to tell if it is being held.
ImGuiItemFlags_AutoClosePopups=1<<4,// true // MenuItem()/Selectable() automatically close their parent popup window.
ImGuiItemFlags_AllowDuplicateId=1<<5,// false // Allow submitting an item with the same identifier as an item already submitted this frame without triggering a warning tooltip if io.ConfigDebugHighlightIdConflicts is set.
ImGuiItemFlags_Disabled=1<<6,// false // [Internal] Disable interactions. DOES NOT affect visuals. This is used by BeginDisabled()/EndDisabled() and only provided here so you can read back via GetItemFlags().
ImGuiItemFlags_Disabled=1<<6,// false // [Internal] Disable interactions. DOES NOT affect visuals. This is used by BeginDisabled()/EndDisabled() and only provided here so you can read back via GetItemFlags().
};
// Flags for ImGui::InputText()
@ -1250,7 +1263,7 @@ enum ImGuiInputTextFlags_
ImGuiInputTextFlags_AllowTabInput=1<<5,// Pressing TAB input a '\t' character into the text field
ImGuiInputTextFlags_EnterReturnsTrue=1<<6,// Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider using IsItemDeactivatedAfterEdit() instead!
ImGuiInputTextFlags_EscapeClearsAll=1<<7,// Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
ImGuiInputTextFlags_CtrlEnterForNewLine=1<<8,// In multi-line mode, validate with Enter, add new line with Ctrl+Enter (default is opposite: validate with Ctrl+Enter, add line with Enter).
ImGuiInputTextFlags_CtrlEnterForNewLine=1<<8,// In multi-line mode: validate with Enter, add new line with Ctrl+Enter (default is opposite: validate with Ctrl+Enter, add line with Enter). Note that Shift+Enter always enter a new line either way.
ImGuiTreeNodeFlags_Selected=1<<0,// Draw as selected
ImGuiTreeNodeFlags_Framed=1<<1,// Draw frame with background (e.g. for CollapsingHeader)
ImGuiTreeNodeFlags_AllowOverlap=1<<2,// Hit testing to allow subsequent widgets to overlap this one
ImGuiTreeNodeFlags_AllowOverlap=1<<2,// Hit testing will allow subsequent widgets to overlap this one. Require previous frame HoveredId to match before being usable. Shortcut to calling SetNextItemAllowOverlap().
ImGuiTreeNodeFlags_NoTreePushOnOpen=1<<3,// Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack
ImGuiTreeNodeFlags_NoAutoOpenOnLog=1<<4,// Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes)
ImGuiTreeNodeFlags_DefaultOpen=1<<5,// Default node to be open
ImGuiTreeNodeFlags_OpenOnDoubleClick=1<<6,// Open on double-click instead of simple click (default for multi-select unless any _OpenOnXXX behavior is set explicitly). Both behaviors may be combined.
ImGuiTreeNodeFlags_OpenOnArrow=1<<7,// Open when clicking on the arrow part (default for multi-select unless any _OpenOnXXX behavior is set explicitly). Both behaviors may be combined.
ImGuiTreeNodeFlags_Leaf=1<<8,// No collapsing, no arrow (use as a convenience for leaf nodes).
ImGuiTreeNodeFlags_Leaf=1<<8,// No collapsing, no arrow (use as a convenience for leaf nodes). Note: will always open a tree/id scope and return true. If you never use that scope, add ImGuiTreeNodeFlags_NoTreePushOnOpen.
ImGuiTreeNodeFlags_Bullet=1<<9,// Display a bullet instead of arrow. IMPORTANT: node can still be marked open/close if you don't set the _Leaf flag!
ImGuiTreeNodeFlags_FramePadding=1<<10,// Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding() before the node.
ImGuiTreeNodeFlags_SpanAvailWidth=1<<11,// Extend hit box to the right-most edge, even if not framed. This is not the default in order to allow adding other items on the same line without using AllowOverlap mode.
@ -1324,21 +1337,14 @@ enum ImGuiTreeNodeFlags_
};
// Flags for OpenPopup*(), BeginPopupContext*(), IsPopupOpen() functions.
// - To be backward compatible with older API which took an 'int mouse_button = 1' argument instead of 'ImGuiPopupFlags flags',
// we need to treat small flags values as a mouse button index, so we encode the mouse button in the first few bits of the flags.
// It is therefore guaranteed to be legal to pass a mouse button index in ImGuiPopupFlags.
// - For the same reason, we exceptionally default the ImGuiPopupFlags argument of BeginPopupContextXXX functions to 1 instead of 0.
// IMPORTANT: because the default parameter is 1 (==ImGuiPopupFlags_MouseButtonRight), if you rely on the default parameter
// and want to use another flag, you need to pass in the ImGuiPopupFlags_MouseButtonRight flag explicitly.
// - IMPORTANT: If you ever used the left mouse button with BeginPopupContextXXX() helpers before 1.92.6: Read "API BREAKING CHANGES" 2026/01/07 (1.92.6) entry in imgui.cpp or GitHub topic #9157.
// - Multiple buttons currently cannot be combined/or-ed in those functions (we could allow it later).
enumImGuiPopupFlags_
{
ImGuiPopupFlags_None=0,
ImGuiPopupFlags_MouseButtonLeft=0,// For BeginPopupContext*(): open on Left Mouse release. Guaranteed to always be == 0 (same as ImGuiMouseButton_Left)
ImGuiPopupFlags_MouseButtonRight=1,// For BeginPopupContext*(): open on Right Mouse release. Guaranteed to always be == 1 (same as ImGuiMouseButton_Right)
ImGuiPopupFlags_MouseButtonMiddle=2,// For BeginPopupContext*(): open on Middle Mouse release. Guaranteed to always be == 2 (same as ImGuiMouseButton_Middle)
ImGuiPopupFlags_MouseButtonMask_=0x1F,
ImGuiPopupFlags_MouseButtonDefault_=1,
ImGuiPopupFlags_MouseButtonLeft=1<<2,// For BeginPopupContext*(): open on Left Mouse release. Only one button allowed!
ImGuiPopupFlags_MouseButtonRight=2<<2,// For BeginPopupContext*(): open on Right Mouse release. Only one button allowed! (default)
ImGuiPopupFlags_MouseButtonMiddle=3<<2,// For BeginPopupContext*(): open on Middle Mouse release. Only one button allowed!
ImGuiPopupFlags_NoReopen=1<<5,// For OpenPopup*(), BeginPopupContext*(): don't reopen same popup if already open (won't reposition, won't reinitialize navigation)
//ImGuiPopupFlags_NoReopenAlwaysNavInit = 1 << 6, // For OpenPopup*(), BeginPopupContext*(): focus and initialize navigation even when not reopening.
ImGuiPopupFlags_NoOpenOverExistingPopup=1<<7,// For OpenPopup*(), BeginPopupContext*(): don't open if there's already a popup at the same level of the popup stack
@ -1346,6 +1352,9 @@ enum ImGuiPopupFlags_
ImGuiPopupFlags_AnyPopupId=1<<10,// For IsPopupOpen(): ignore the ImGuiID parameter and test for any popup.
ImGuiPopupFlags_AnyPopupLevel=1<<11,// For IsPopupOpen(): search/test at any level of the popup stack (default test in the current level)
ImGuiPopupFlags_InvalidMask_=0x03,// [Internal] Reserve legacy bits 0-1 to detect incorrectly passing 1 or 2 to the function.
};
// Flags for ImGui::Selectable()
@ -1356,7 +1365,7 @@ enum ImGuiSelectableFlags_
ImGuiSelectableFlags_SpanAllColumns=1<<1,// Frame will span all columns of its container table (text will still fit in current column)
ImGuiSelectableFlags_AllowDoubleClick=1<<2,// Generate press events on double clicks too
ImGuiSelectableFlags_Disabled=1<<3,// Cannot be selected, display grayed out text
ImGuiSelectableFlags_AllowOverlap=1<<4,// (WIP) Hit testing to allow subsequent widgets to overlap this one
ImGuiSelectableFlags_AllowOverlap=1<<4,// Hit testing will allow subsequent widgets to overlap this one. Require previous frame HoveredId to match before being usable. Shortcut to calling SetNextItemAllowOverlap().
ImGuiSelectableFlags_Highlight=1<<5,// Make the item be displayed as if it is hovered
ImGuiSelectableFlags_SelectOnNav=1<<6,// Auto-select when moved into, unless Ctrl is held. Automatic when in a BeginMultiSelect() block.
// All our named keys are >= 512. Keys value 0 to 511 are left unused and were legacy native/opaque key values (< 1.87).
// Support for legacy keys was completely removed in 1.91.5.
// Read details about the 1.87+ transition : https://github.com/ocornut/imgui/issues/4921
// Note that "Keys" related to physical keys and are not the same concept as input "Characters", the later are submitted via io.AddInputCharacter().
// Note that "Keys" related to physical keys and are not the same concept as input "Characters", the latter are submitted via io.AddInputCharacter().
// The keyboard key enum values are named after the keys on a standard US keyboard, and on other keyboard types the keys reported may not match the keycaps.
enumImGuiKey:int
{
@ -1611,10 +1620,10 @@ enum ImGuiKey : int
// // XBOX | SWITCH | PLAYSTA. | -> ACTION
ImGuiKey_GamepadStart,// Menu | + | Options |
ImGuiKey_GamepadBack,// View | - | Share |
ImGuiKey_GamepadFaceLeft,// X | Y | Square | Tap: Toggle Menu. Hold: Windowing mode (Focus/Move/Resize windows)
ImGuiKey_GamepadFaceLeft,// X | Y | Square | Toggle Menu. Hold for Windowing mode (Focus/Move/Resize windows)
ImGuiKey_GamepadFaceRight,// B | A | Circle | Cancel / Close / Exit
ImGuiKey_GamepadFaceUp,// Y | X | Triangle | Text Input / On-screen Keyboard
ImGuiKey_GamepadFaceDown,// A | B | Cross | Activate / Open / Toggle / Tweak
ImGuiKey_GamepadFaceUp,// Y | X | Triangle | Open Context Menu
ImGuiKey_GamepadFaceDown,// A | B | Cross | Activate / Open / Toggle. Hold for 0.60f to Activate in Text Input mode (e.g. wired to an on-screen keyboard).
ImGuiKey_GamepadDpadLeft,// D-pad Left | " | " | Move / Tweak / Resize Window (in Windowing mode)
ImGuiKey_GamepadDpadRight,// D-pad Right | " | " | Move / Tweak / Resize Window (in Windowing mode)
ImGuiKey_GamepadDpadUp,// D-pad Up | " | " | Move / Tweak / Resize Window (in Windowing mode)
@ -1699,7 +1708,7 @@ enum ImGuiInputFlags_
enumImGuiConfigFlags_
{
ImGuiConfigFlags_None=0,
ImGuiConfigFlags_NavEnableKeyboard=1<<0,// Master keyboard navigation enable flag. Enable full Tabbing + directional arrows + space/enter to activate.
ImGuiConfigFlags_NavEnableKeyboard=1<<0,// Master keyboard navigation enable flag. Enable full Tabbing + directional arrows + Space/Enter to activate. Note: some features such as basic Tabbing and CtrL+Tab are enabled by regardless of this flag (and may be disabled via other means, see #4828, #9218).
ImGuiConfigFlags_NavEnableGamepad=1<<1,// Master gamepad navigation enable flag. Backend also needs to set ImGuiBackendFlags_HasGamepad.
ImGuiConfigFlags_NoMouse=1<<4,// Instruct dear imgui to disable mouse inputs and interactions.
ImGuiConfigFlags_NoMouseCursorChange=1<<5,// Instruct backend to not alter mouse cursor shape and visibility. Use if the backend cursor changes are interfering with yours and you don't want to use SetMouseCursor() to change mouse cursor. You may want to honor requests from imgui by reading GetMouseCursor() yourself instead.
ImGuiButtonFlags_EnableNav=1<<3,// InvisibleButton(): do not disable navigation/tabbing. Otherwise disabled by default.
ImGuiButtonFlags_AllowOverlap=1<<12,// Hit testing will allow subsequent widgets to overlap this one. Require previous frame HoveredId to match before being usable. Shortcut to calling SetNextItemAllowOverlap().
ImGuiColorEditFlags_NoTooltip=1<<6,// // ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview.
ImGuiColorEditFlags_NoLabel=1<<7,// // ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker).
ImGuiColorEditFlags_NoSidePreview=1<<8,// // ColorPicker: disable bigger color preview on right side of the picker, use small color square preview instead.
ImGuiColorEditFlags_NoDragDrop=1<<9,// // ColorEdit: disable drag and drop target. ColorButton: disable drag and drop source.
ImGuiColorEditFlags_NoDragDrop=1<<9,// // ColorEdit: disable drag and drop target/source. ColorButton: disable drag and drop source.
ImGuiColorEditFlags_NoBorder=1<<10,// // ColorButton: disable border (which is enforced by default)
ImGuiColorEditFlags_NoColorMarkers=1<<11,// // ColorEdit: disable rendering R/G/B/A color marker. May also be disabled globally by setting style.ColorMarkerSize = 0.
@ -2141,7 +2153,7 @@ struct ImGuiTableSortSpecs
intSpecsCount;// Sort spec count. Most often 1. May be > 1 when ImGuiTableFlags_SortMulti is enabled. May be == 0 when ImGuiTableFlags_SortTristate is enabled.
boolSpecsDirty;// Set to true when specs have changed since last time! Use this to sort again, then clear the flag.
ImS16SortOrder;// Index within parent ImGuiTableSortSpecs (always stored in order starting from 0, tables sorted on a single criteria will always have a 0 here)
ImGuiSortDirectionSortDirection;// ImGuiSortDirection_Ascending or ImGuiSortDirection_Descending
floatFontSizeBase;// Current base font size before external global factors are applied. Use PushFont(NULL, size) to modify. Use ImGui::GetFontSize() to obtain scaled value.
floatFontScaleMain;// Main global scale factor. May be set by application once, or exposed to end-user.
floatFontScaleDpi;// Additional global scale factor from viewport/monitor contents scale. When io.ConfigDpiScaleFonts is enabled, this is automatically overwritten when changing monitor DPI.
floatFontScaleDpi;// Additional global scale factor from viewport/monitor contents scale. In docking branch: when io.ConfigDpiScaleFonts is enabled, this is automatically overwritten when changing monitor DPI.
floatAlpha;// Global alpha applies to everything in Dear ImGui.
floatDisabledAlpha;// Additional alpha multiplier applied by BeginDisabled(). Multiply over current value of Alpha.
@ -2305,6 +2317,7 @@ struct ImGuiStyle
floatGrabMinSize;// Minimum width/height of a grab box for slider/scrollbar.
floatGrabRounding;// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
floatLogSliderDeadzone;// The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero.
floatImageRounding;// Rounding of Image() calls.
floatImageBorderSize;// Thickness of border around Image() calls.
floatTabRounding;// Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.
floatTabBorderSize;// Thickness of border around tabs.
@ -2326,6 +2339,7 @@ struct ImGuiStyle
ImGuiDirColorButtonPosition;// Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.
ImVec2ButtonTextAlign;// Alignment of button text when button is larger than text. Defaults to (0.5f, 0.5f) (centered).
ImVec2SelectableTextAlign;// Alignment of selectable text. Defaults to (0.0f, 0.0f) (top-left aligned). It's generally important to keep this left-aligned if you want to lay multiple items on a same line.
floatSeparatorSize;// Thickness of border in Separator()
floatSeparatorTextBorderSize;// Thickness of border in SeparatorText()
ImVec2SeparatorTextAlign;// Alignment of text within the separator. Defaults to (0.0f, 0.5f) (left aligned, center).
ImVec2SeparatorTextPadding;// Horizontal offset of text from each edge of the separator + spacing on other axis. Generally small values. .y is recommended to be == FramePadding.y.
@ -2352,7 +2366,7 @@ struct ImGuiStyle
ImGuiHoveredFlagsHoverFlagsForTooltipNav;// Default flags when using IsItemHovered(ImGuiHoveredFlags_ForTooltip) or BeginItemTooltip()/SetItemTooltip() while using keyboard/gamepad.
// [Internal]
float_MainScale;// FIXME-WIP: Reference scale, as applied by ScaleAllSizes().
float_MainScale;// FIXME-WIP: Reference scale, as applied by ScaleAllSizes(). PLEASE DO NOT USE THIS FOR NOW.
float_NextFrameFontSizeBase;// FIXME: Temporary hack until we finish remaining work.
// Functions
@ -2423,7 +2437,7 @@ struct ImGuiIO
boolConfigMacOSXBehaviors;// = 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.
boolConfigInputTrickleEventQueue;// = 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).
boolConfigInputTextEnterKeepActive;// = false // [BETA] Pressing Enter will keep item active and select contents (single-line only).
boolConfigInputTextEnterKeepActive;// = false // [BETA] Pressing Enter will reactivate item and select all text (single-line only).
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 ImGuiBackendFlags_HasMouseCursors for better mouse cursor feedback. (This used to be a per-window ImGuiWindowFlags_ResizeFromAnySide flag)
boolConfigWindowsMoveFromTitleBarOnly;// = false // Enable allowing to move windows only when clicking on their title bar. Does not apply to windows without a title bar.
@ -2445,7 +2459,7 @@ struct ImGuiIO
// Options to configure Error Handling and how we handle recoverable errors [EXPERIMENTAL]
// - Error recovery is provided as a way to facilitate:
// - Recovery after a programming error (native code or scripting language - the later tends to facilitate iterating on code while running).
// - Recovery after a programming error (native code or scripting language - the latter tends to facilitate iterating on code while running).
// - Recovery after running an exception handler or any error processing which may skip code after an error has been detected.
// - Error recovery is not perfect nor guaranteed! It is a feature to ease development.
// You not are not supposed to rely on it in the course of a normal application run.
ImGuiInputTextFlagsEventFlag;// One ImGuiInputTextFlags_Callback* // Read-only
ImGuiInputTextFlagsFlags;// What user passed to InputText() // Read-only
void*UserData;// What user passed to InputText() // Read-only
ImGuiIDID;// Widget ID // Read-only
// Arguments for the different callback events
// - During Resize callback, Buf will be same as your input buffer.
// - However, during Completion/History/Always callback, Buf always points to our own internal data (it is not the same as your buffer)! Changes to it will be reflected into your own buffer shortly after the callback.
// - To modify the text buffer in a callback, prefer using the InsertChars() / DeleteChars() function. InsertChars() will take care of calling the resize callback if necessary.
// - If you know your edits are not going to resize the underlying buffer allocation, you may modify the contents of 'Buf[]' directly. You need to update 'BufTextLen' accordingly (0 <= BufTextLen < BufSize) and set 'BufDirty'' to true so InputText can update its internal state.
ImWcharEventChar;// Character input // Read-write // [CharFilter] Replace character with another one, or set to zero to drop. return 1 is equivalent to setting EventChar=0;
ImWcharEventChar;// Character input // Read-write // [CharFilter] Replace character with another one, or set to zero to drop. return 1 is equivalent to setting EventChar=0;
boolEventActivated;// Input field just got activated // Read-only // [Always]
boolBufDirty;// Set if you modify Buf/BufTextLen! // Write // [Completion,History,Always]
char*Buf;// Text buffer // Read-write // [Resize] Can replace pointer / [Completion,History,Always] Only write to pointed data, don't replace the actual pointer!
intBufTextLen;// Text length (in bytes) // Read-write // [Resize,Completion,History,Always] Exclude zero-terminator storage. In C land: == strlen(some_text), in C++ land: string.length()
intBufSize;// Buffer size (in bytes) = capacity+1 // Read-only // [Resize,Completion,History,Always] Include zero-terminator storage. In C land: == ARRAYSIZE(my_char_array), in C++ land: string.capacity()+1
boolBufDirty;// Set if you modify Buf/BufTextLen! // Write // [Completion,History,Always]
ImGuiMultiSelectFlags_NoAutoClearOnReselect=1<<5,// Disable clearing selection when clicking/selecting an already selected item.
ImGuiMultiSelectFlags_BoxSelect1d=1<<6,// Enable box-selection with same width and same x pos items (e.g. full row Selectable()). Box-selection works better with little bit of spacing between items hit-box in order to be able to aim at empty space.
ImGuiMultiSelectFlags_BoxSelect2d=1<<7,// Enable box-selection with varying width or varying x pos items support (e.g. different width labels, or 2D layout/grid). This is slower: alters clipping logic so that e.g. horizontal movements will update selection of normally clipped items.
ImGuiMultiSelectFlags_BoxSelectNoScroll=1<<8,// Disable scrolling when box-selecting near edges of scope.
ImGuiMultiSelectFlags_BoxSelectNoScroll=1<<8,// Disable scrolling when box-selecting and moving mouse near edges of scope.
ImGuiMultiSelectFlags_ClearOnEscape=1<<9,// Clear selection when pressing Escape while scope is focused.
ImGuiMultiSelectFlags_ClearOnClickVoid=1<<10,// Clear selection when clicking on empty location within scope.
ImGuiMultiSelectFlags_ScopeWindow=1<<11,// Scope for _BoxSelect and _ClearOnClickVoid is whole window (Default). Use if BeginMultiSelect() covers a whole window or used a single time in same window.
ImGuiMultiSelectFlags_ScopeRect=1<<12,// Scope for _BoxSelect and _ClearOnClickVoid is rectangle encompassing BeginMultiSelect()/EndMultiSelect(). Use if BeginMultiSelect() is called multiple times in same window.
ImGuiMultiSelectFlags_SelectOnClick=1<<13,// Apply selection on mouse down when clicking on unselected item. (Default)
ImGuiMultiSelectFlags_SelectOnClickRelease=1<<14,// Apply selection on mouse release when clicking an unselected item. Allow dragging an unselected item without altering selection.
ImGuiMultiSelectFlags_SelectOnAuto=1<<13,// Apply selection on mouse down when clicking on unselected item, on mouse up when clicking on selected item. (Default)
ImGuiMultiSelectFlags_SelectOnClickAlways=1<<14,// Apply selection on mouse down when clicking on any items. Prevents Drag and Drop from being used on multiple-selection, but allows e.g. BoxSelect to always reselect even when clicking inside an existing selection. (Excel style behavior)
ImGuiMultiSelectFlags_SelectOnClickRelease=1<<15,// Apply selection on mouse release when clicking an unselected item. Allow dragging an unselected item without altering selection.
//ImGuiMultiSelectFlags_RangeSelect2d = 1 << 15, // Shift+Selection uses 2d geometry instead of linear sequence, so possible to use Shift+up/down to select vertically in grid. Analogous to what BoxSelect does.
ImGuiMultiSelectFlags_NavWrapX=1<<16,// [Temporary] Enable navigation wrapping on X axis. Provided as a convenience because we don't have a design for the general Nav API for this yet. When the more general feature be public we may obsolete this flag in favor of new one.
ImGuiMultiSelectFlags_NoSelectOnRightClick=1<<17,// Disable default right-click processing, which selects item on mouse down, and is designed for context-menus.
ImGuiMultiSelectFlags_SelectOnClick=ImGuiMultiSelectFlags_SelectOnAuto,// RENAMED in 1.92.6
#endif
};
// Main IO structure returned by BeginMultiSelect()/EndMultiSelect().
@ -3161,7 +3186,7 @@ struct ImDrawCmd
intUserCallbackDataSize;// 4 // Size of callback user data when using storage, otherwise 0.
intUserCallbackDataOffset;// 4 // [Internal] Offset of callback user data when using storage, otherwise -1.
ImDrawCmd(){memset(this,0,sizeof(*this));}// Also ensure our padding fields are zeroed
ImDrawCmd(){memset((void*)this,0,sizeof(*this));}// Also ensure our padding fields are zeroed
// Since 1.83: returns ImTextureID associated with this draw call. Warning: DO NOT assume this is always same as 'TextureId' (we will change this function for an upcoming feature)
// Since 1.92: removed ImDrawCmd::TextureId field, the getter function must be used!
@ -3207,7 +3232,7 @@ struct ImDrawListSplitter
int_Count;// Number of active channels (1+)
ImVector<ImDrawChannel>_Channels;// Draw channels (not resized down so _Count might be < Channels.Size)
boolMergeMode;// false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights.
boolPixelSnapH;// false // Align every glyph AdvanceX to pixel boundaries. Prevents fractional font size from working correctly! Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1.
boolPixelSnapH;// false // Align every glyph AdvanceX to pixel boundaries. Prevents fractional font size from working correctly! Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, OversampleH/V will default to 1.
ImS8OversampleH;// 0 (2) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1 or 2 depending on size. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.
ImS8OversampleV;// 0 (1) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1. This is not really useful as we don't use sub-pixel positions on the Y axis.
ImWcharEllipsisChar;// 0 // Explicitly specify Unicode codepoint of ellipsis character. When fonts are being merged first specified ellipsis will be used.
@ -3578,7 +3603,7 @@ struct ImFontGlyph
floatU0,V0,U1,V1;// Texture coordinates for the current value of ImFontAtlas->TexRef. Cached equivalent of calling GetCustomRect() with PackId.
intPackId;// [Internal] ImFontAtlasRectId value (FIXME: Cold data, could be moved elsewhere?)
// - Call Build() + GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data.
// - Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture in a format natural to your graphics API.
// Common pitfalls:
// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persist up until the
// - If you pass a 'glyph_ranges' array to AddFont*** functions, you need to make sure that your array persists up until the
// atlas is build (when calling GetTexData*** or Build()). We only copy the pointer, not the data.
// - Important: By default, AddFontFromMemoryTTF() takes ownership of the data. Even though we are not writing to it, we will free the pointer on destruction.
// You can set font_cfg->FontDataOwnedByAtlas=false to keep ownership of your data and it won't be freed,
@ -3812,7 +3837,7 @@ struct ImFontBaked
unsignedintMetricsTotalSurface:26;// 3 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
unsignedintWantDestroy:1;// 0 // // Queued for destroy
unsignedintLoadNoFallback:1;// 0 // // Disable loading fallback in lower-level calls.
unsignedintLoadNoRenderOnLayout:1;// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without* rendering/packing glyphs. Only advantagous if you know that the glyph is unlikely to actually be rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on the first Draw.
unsignedintLoadNoRenderOnLayout:1;// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without* rendering/packing glyphs. Only advantageous if you know that the glyph is unlikely to actually be rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on the first Draw.
intLastUsedFrame;// 4 // // Record of that time this was bounds
ImGuiIDBakedId;// 4 // // Unique ID for this baked storage
ImFont*OwnerFont;// 4-8 // in // Parent font
@ -3856,10 +3881,10 @@ struct ImFont
floatLegacySize;// 4 // in // Font size passed to AddFont(). Use for old code calling PushFont() expecting to use that size. (use ImGui::GetFontBaked() to get font baked at current bound size).
ImVector<ImFontConfig*>Sources;// 16 // in // List of sources. Pointers within OwnerAtlas->Sources[]
floatDefaultWeight;// 4 // in // Default font weight
ImWcharEllipsisChar;// 2-4 // out // Character used for ellipsis rendering ('...').
ImWcharEllipsisChar;// 2-4 // out // Character used for ellipsis rendering ('...'). If you ever want to temporarily swap this for an alternative/dummy char, make sure to clear EllipsisAutoBake.
ImWcharFallbackChar;// 2-4 // out // Character used if a glyph isn't found (U+FFFD, '?')
ImU8Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/8192/8];// 1 bytes if ImWchar=ImWchar16, 16 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 4K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
boolEllipsisAutoBake;// 1 // // Mark when the "..." glyph needs to be generated.
ImU8Used8kPagesMap[(IM_UNICODE_CODEPOINT_MAX+1)/8192/8];// 1 bytes if ImWchar=ImWchar16, 17 bytes if ImWchar==ImWchar32. Store 1-bit for each block of 8K codepoints that has one active glyph. This is mainly used to facilitate iterations across all used codepoints.
boolEllipsisAutoBake;// 1 // // Mark when the "..." glyph (== EllipsisChar) needs to be generated by combining multiple '.'.
ImGuiStorageRemapPairs;// 16 // // Remapping pairs when using AddRemapChar(), otherwise empty.
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
floatScale;// 4 // in // Legacy base font scale (~1.0f), multiplied by the per-window font scale which you can adjust with SetWindowFontScale()
IM_ASSERT(tex_id!=ImTextureID_Invalid&&"ImDrawCmd is referring to ImTextureData that wasn't uploaded to graphics system. Backend must call ImTextureData::SetTexID() after handling ImTextureStatus_WantCreate request!");
@ -3942,7 +3969,7 @@ struct ImGuiViewport
void*PlatformHandle;// void* to hold higher-level, platform window handle (e.g. HWND, GLFWWindow*, SDL_Window*)
void*PlatformHandleRaw;// void* to hold lower-level, platform-native window handle (under Win32 this is expected to be a HWND, unused for other platforms)
// You do not need those functions! See #7838 on GitHub for more info.
IMGUI_APIImVec2GetContentRegionMax();// Content boundaries max (e.g. window boundaries including scrolling, or current column boundaries). You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
IMGUI_APIImVec2GetWindowContentRegionMin();// Content boundaries min for the window (roughly (0,0)-Scroll), in window-local coordinates. You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
IMGUI_APIImVec2GetWindowContentRegionMax();// Content boundaries max for the window (roughly (0,0)+Size-Scroll), in window-local coordinates. You should never need this. Always use GetCursorScreenPos() and GetContentRegionAvail()!
#pragma GCC diagnostic ignored "-Wfloat-equal" // warning: comparing floating-point with '==' or '!=' is unsafe
#pragma GCC diagnostic ignored "-Wclass-memaccess" // [__GNUC__ >= 8] warning: 'memset/memcpy' clearing/writing an object of type 'xxxx' with no trivial copy-assignment; use assignment or value-initialization instead
#pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion" // warning: bitwise operation between different enumeration types ('XXXFlags_' and 'XXXFlagsPrivate_') is deprecated
#pragma GCC diagnostic ignored "-Wsign-conversion" // warning: conversion to 'xxxx' from 'xxxx' may change the sign of the result
#endif
// In 1.89.4, we moved the implementation of "courtesy maths operators" from imgui_internal.h in imgui.h
ImGuiButtonFlags_PressedOnDragDropHold=1<<9,// return true when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
//ImGuiButtonFlags_Repeat = 1 << 10, // hold to repeat -> use ImGuiItemFlags_ButtonRepeat instead.
ImGuiButtonFlags_FlattenChildren=1<<11,// allow interactions even if a child window is overlapping
ImGuiButtonFlags_AllowOverlap=1<<12,// require previous frame HoveredId to either match id or be null before being usable.
//ImGuiButtonFlags_Disabled = 1 << 14, // disable interactions -> use BeginDisabled() or ImGuiItemFlags_Disabled
ImGuiButtonFlags_AlignTextBaseLine=1<<15,// vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
ImGuiInputTextFlagsFlags;// copy of InputText() flags. may be used to check if e.g. ImGuiInputTextFlags_Password is set.
ImGuiIDID;// widget id owning the text state
intTextLen;// UTF-8 length of the string in TextA (in bytes)
constchar*TextSrc;// == TextA.Data unless read-only, in which case == buf passed to InputText(). Field only set and valid _inside_ the call InputText() call.
constchar*TextSrc;// == TextA.Data unless read-only, in which case == buf passed to InputText(). For _ReadOnly fields, pointer will be null outside the InputText() call.
ImVector<char>TextA;// main UTF8 buffer. TextA.Size is a buffer size! Should always be >= buf_size passed by user (and of course >= CurLenA + 1).
ImVector<char>TextToRevertTo;// value to revert to when pressing Escape = backup of end-user buffer at the time of focus (in UTF-8, unaltered)
ImVector<char>CallbackTextBackup;// temporary storage for callback to support automatic reconcile of undo-stack
ImVec2MenuBarOffsetMinVal;// (Always on) This is not exposed publicly, so we don't clear it and it doesn't have a corresponding flag (could we? for consistency?)
boolSingleCharModeLock=false;// After a certain single char repeat count we lock into SingleCharMode. Two benefits: 1) buffer never fill, 2) we can provide an immediate SingleChar mode without timer elapsing.
// Every instance of ImGuiViewport is in fact a ImGuiViewportP.
structImGuiViewportP:publicImGuiViewport
{
int BgFgDrawListsLastFrame[2];// Last frame number the background (0) and foreground (1) draw lists were used
float BgFgDrawListsLastTimeActive[2];// Last frame number the background (0) and foreground (1) draw lists were used
ImDrawList*BgFgDrawLists[2];// Convenience background (0) and foreground (1) draw lists. We use them to draw software mouser cursor when io.MouseDrawCursor is set and to draw most debug overlays.
ImDrawDataDrawDataP;
ImDrawDataBuilderDrawDataBuilder;// Temporary data while building final ImDrawData
@ -1974,7 +1974,7 @@ struct ImGuiViewportP : public ImGuiViewport
ImVec2BuildWorkInsetMin;// Work Area inset accumulator for current frame, to become next frame's WorkInset
// Calculate work rect pos/size given a set of offset (we have 1 pair of offset for rect locked from last frame data, and 1 pair for currently building rect)
@ -2005,7 +2005,7 @@ struct ImGuiWindowSettings
boolWantApply;// Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)
boolWantDelete;// Set to invalidate/delete the settings entry
// - See 'Demo->Configuration->Error Handling' and ImGuiIO definitions for details on error handling.
// - Read https://github.com/ocornut/imgui/wiki/Error-Handling for details on error handling.
#ifndef IM_ASSERT_USER_ERROR
#define IM_ASSERT_USER_ERROR(_EXPR,_MSG) do { if (!(_EXPR) && ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } } while (0) // Recoverable User Error
#define IM_ASSERT_USER_ERROR(_EXPR,_MSG) do { if (!(_EXPR)) { if (ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } } } while (0) // Recoverable User Error
#define IM_ASSERT_USER_ERROR_RET(_EXPR,_MSG) do { if (!(_EXPR)) { if (ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } return; } } while (0) // Recoverable User Error
#define IM_ASSERT_USER_ERROR_RETV(_EXPR,_RETV,_MSG) do { if (!(_EXPR)) { if (ImGui::ErrorLog(_MSG)) { IM_ASSERT((_EXPR) && _MSG); } return _RETV; } } while (0) // Recoverable User Error
#endif
// The error callback is currently not public, as it is expected that only advanced users will rely on it.
@ -2108,7 +2110,7 @@ struct ImGuiDebugAllocInfo
ImS16LastEntriesIdx;// Current index in buffer
ImGuiDebugAllocEntryLastEntriesBuf[6];// Track last 6 frames that had allocations
ImVector<ImGuiFocusScopeData>NavFocusRoute;// Reversed copy focus scope stack for NavId (should contains NavFocusScopeId). This essentially follow the window->ParentWindowForFocusRoute chain.
ImGuiIDNavHighlightActivatedId;
floatNavHighlightActivatedTimer;
ImGuiIDNavOpenContextMenuItemId;
ImGuiIDNavOpenContextMenuWindowId;
ImGuiIDNavNextActivateId;// Set by ActivateItemByID(), queued until next frame.
ImGuiActivateFlagsNavNextActivateFlags;
ImGuiInputSourceNavInputSource;// Keyboard or Gamepad mode? THIS CAN ONLY BE ImGuiInputSource_Keyboard or ImGuiInputSource_Gamepad
@ -2353,7 +2360,7 @@ struct ImGuiContext
ImGuiDirNavMoveDirForDebug;
ImGuiDirNavMoveClipDir;// FIXME-NAV: Describe the purpose of this better. Might want to rename?
ImRectNavScoringRect;// Rectangle used for scoring, in screen space. Based of window->NavRectRel[], modified for directional navigation scoring.
ImRectNavScoringNoClipRect;// Some nav operations (such as PageUp/PageDown) enforce a region which clipper will attempt to always keep submitted
ImRectNavScoringNoClipRect;// Some nav operations (such as PageUp/PageDown) enforce a region which clipper will attempt to always keep submitted. Unset/invalid if inverted.
intNavScoringDebugCount;// Metrics for debugging
intNavTabbingDir;// Generally -1 or +1, 0 when tabbing without a nav id
intNavTabbingCounter;// >0 when counting items for tabbing
@ -2370,10 +2377,15 @@ struct ImGuiContext
boolNavJustMovedToIsTabbing;// Copy of ImGuiNavMoveFlags_IsTabbing. Maybe we should store whole flags.
boolNavJustMovedToHasSelectionData;// Copy of move result's ItemFlags & ImGuiItemFlags_HasSelectionUserData). Maybe we should just store ImGuiNavItemData.
// Navigation: Windowing (Ctrl+Tab for list, or Menu button + keys or directional pads to move/resize)
// Navigation: extra config options (will be made public eventually)
// - Tabbing (Tab, Shift+Tab) and Windowing (Ctrl+Tab, Ctrl+Shift+Tab) are enabled REGARDLESS of ImGuiConfigFlags_NavEnableKeyboard being set.
// - Ctrl+Tab is reconfigurable because it is the only shortcut that may be polled when no window are focused. It also doesn't work e.g. Web platforms.
boolConfigNavEnableTabbing;// = true. Enable tabbing (Tab, Shift+Tab). PLEASE LET ME KNOW IF YOU USE THIS.
boolConfigNavWindowingWithGamepad;// = true. Enable Ctrl+Tab by holding ImGuiKey_GamepadFaceLeft (== ImGuiKey_NavGamepadMenu). When false, the button may still be used to toggle Menu layer.
ImGuiKeyChordConfigNavWindowingKeyNext;// = ImGuiMod_Ctrl | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiKey_Tab on OS X). For reconfiguration (see #4828)
ImGuiKeyChordConfigNavWindowingKeyNext;// = ImGuiMod_Ctrl | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiKey_Tab on OS X). Set to 0 to disable. For reconfiguration (see #4828)
ImGuiKeyChordConfigNavWindowingKeyPrev;// = ImGuiMod_Ctrl | ImGuiMod_Shift | ImGuiKey_Tab (or ImGuiMod_Super | ImGuiMod_Shift | ImGuiKey_Tab on OS X)
// Navigation: Windowing (Ctrl+Tab for list, or Menu button + keys or directional pads to move/resize)
ImGuiWindow*NavWindowingTarget;// Target window when doing Ctrl+Tab (or Pad Menu + FocusPrev/Next), this window is temporarily displayed top-most!
ImGuiWindow*NavWindowingTargetAnim;// Record of last valid NavWindowingTarget until DimBgRatio and NavWindowingHighlightAlpha becomes 0.0f, so the fade-out can stay on it.
ImGuiWindow*NavWindowingListWindow;// Internal window actually listing the Ctrl+Tab contents
// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
floatItemWidth;// Current item width (>0.0: width in pixels, <0.0: align xx pixels to the right of window).
floatItemWidthDefault;
floatTextWrapPos;// Current text wrap pos.
ImVector<float>ItemWidthStack;// Store item widths to restore (attention: .back() is not == ItemWidth)
ImVector<float>TextWrapPosStack;// Store text wrap pos to restore (attention: .back() is not == TextWrapPos)
@ -2720,7 +2737,6 @@ struct IMGUI_API ImGuiWindow
intLastFrameActive;// Last frame number the window was Active.
floatLastTimeActive;// Last timestamp the window was Active (using float as we don't need high precision there)
floatItemWidthDefault;
ImGuiStorageStateStorage;
ImVector<ImGuiOldColumns>ColumnsStorage;
floatFontWindowScale;// User scale multiplier per-window, via SetWindowFontScale()
@ -2796,7 +2812,7 @@ struct ImGuiTabItem
ImGuiTabItemFlagsFlags;
intLastFrameVisible;
intLastFrameSelected;// This allows us to infer an ordered list of the last activated tabs with little maintenance
floatOffset;// Position relative to beginning of tab
floatOffset;// Position relative to beginning of tab bar
floatWidth;// Width currently displayed
floatContentWidth;// Width of label + padding, stored during BeginTabItem() call (misnamed as "Content" would normally imply width of label only)
floatRequestedWidth;// Width optionally requested by caller, -1.0f is unused
@ -2805,7 +2821,7 @@ struct ImGuiTabItem
ImS16IndexDuringLayout;// Index only used during TabBarLayout(). Tabs gets reordered so 'Tabs[n].IndexDuringLayout == n' but may mismatch during additions.
boolWantClose;// Marked as closed by SetTabItemClosed()
ImGuiTableColumnIdxColumnsCountMax;// Maximum number of columns this settings instance can store, we can recycle a settings instance with lower number of columns but not higher
boolWantApply;// Set when loaded from .ini data (to enable merging/loading .ini data into an already running context)
inlinefloatGetScale(){ImGuiContext&g=*GImGui;returng.Style._MainScale;}// FIXME-DPI: I don't want to formalize this just yet. Because reasons. Please don't use.
IMGUI_APIboolTreeNodeUpdateNextOpen(ImGuiIDstorage_id,ImGuiTreeNodeFlagsflags);// Return open state. Consume previous SetNextItemOpen() data, if any. May return true when logging.
// Template functions are instantiated in imgui_widgets.cpp for a finite number of types.
// To use them externally (for custom widget) you may need an "extern template" statement in your code in order to link to existing instances and silence Clang warnings (see #2036).
// e.g. " extern template IMGUI_API float RoundScalarWithFormatT<float, float>(const char* format, ImGuiDataType data_type, float v); "
IMGUI_APIvoidDebugNodeTexture(ImTextureData*tex,intint_id,constImFontAtlasRect*highlight_rect=NULL);// ID used to facilitate persisting the "current" texture.
typedefImFontLoaderImFontBuilderIO;// [renamed/changed in 1.92] The types are not actually compatible but we provide this as a compile-time error report helper.
typedefImFontLoaderImFontBuilderIO;// [renamed/changed in 1.92.0] The types are not actually compatible but we provide this as a compile-time error report helper.
// [SECTION] Default font data (ProggyVector-minimal.ttf)
// [SECTION] Default font data (ProggyForever.ttf)
*/
@ -82,6 +82,7 @@ Index of this file:
#pragma GCC diagnostic ignored "-Wstrict-overflow" // warning: assuming signed overflow does not occur when simplifying division / ..when changing X +- C1 cmp C2 to X cmp C2 -+ C1
#pragma GCC diagnostic ignored "-Wclass-memaccess" // [__GNUC__ >= 8] warning: 'memset/memcpy' clearing/writing an object of type 'xxxx' with no trivial copy-assignment; use assignment or value-initialization instead
#pragma GCC diagnostic ignored "-Wcast-qual" // warning: cast from type 'const xxxx *' to type 'xxxx *' casts away qualifiers
#pragma GCC diagnostic ignored "-Wsign-conversion" // warning: conversion to 'xxxx' from 'xxxx' may change the sign of the result
#pragma warning (disable: 5262) // (stb_truetype) implicit fall-through occurs here; are you missing a break statement?
#pragma warning (disable: 6385) // (stb_truetype) Reading invalid data from 'buffer': the readable size is '_Old_3`kernel_width' bytes, but '3' bytes may be read.
#pragma warning (disable: 28182) // (stb_rectpack) Dereferencing NULL pointer. 'cur' contains the same NULL value as 'cur->next' did.
ImFontAtlasFontDiscardBakes(this,font,0);// Need to discard bakes if the font was already used, because baked->FontLoaderDatas[] will change size. (#9162)
// This duplicates some of the logic in UpdateFontsNewFrame() which is a bit chicken-and-eggy/tricky to extract due to variety of codepaths and possible initialization ordering.
// NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build().
// NB: Transfer ownership of 'font_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build().
if(ctx->FrameCount==0&&old_font==NULL)// While this should work either way, we save ourselves the bother / debugging confusion of running ImGui code so early when it is not needed.
// NB: This is rather brittle and will show artifact when rounding this enabled if rounded corners overlap multiple cells. Caller currently responsible for avoiding that.
// Spent a non reasonable amount of time trying to getting this right for ColorButton with rounding+anti-aliasing+ImGuiColorEditFlags_HalfAlphaPreview flag + various grid sizes and offsets, and eventually gave up... probably more reasonable to disable rounding altogether.
// Based on ProggyVector.ttf, Copyright (c) 2019,2023 Tristan Grimmer / Copyright (c) 2018 Source Foundry Authors / Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved.
// MIT license + public domain, see licenses at https://github.com/bluescan/proggyfonts/tree/master/ProggyVector
// [SECTION] Default font data (ProggyForever-Regular-minimal.ttf)
baked->Ascent=(float)FT_CEIL(metrics.ascender)*scale;// The pixel extents above the baseline in pixels (typically positive).
baked->Descent=(float)FT_CEIL(metrics.descender)*scale;// The extents below the baseline in pixels (typically negative).
//LineSpacing = (float)FT_CEIL(metrics.height) * scale; // The baseline-to-baseline distance. Note that it usually is larger than the sum of the ascender and descender taken as absolute values. There is also no guarantee that no glyphs extend above or below subsequent baselines when using this distance. Think of it as a value the designer of the font finds appropriate.
#pragma GCC diagnostic ignored "-Wformat" // warning: format '%p' expects argument of type 'int'/'void*', but argument X has type 'unsigned int'/'ImGuiWindow*'
#pragma GCC diagnostic ignored "-Wclass-memaccess" // [__GNUC__ >= 8] warning: 'memset/memcpy' clearing/writing an object of type 'xxxx' with no trivial copy-assignment; use assignment or value-initialization instead
#pragma GCC diagnostic ignored "-Wsign-conversion" // warning: conversion to 'xxxx' from 'xxxx' may change the sign of the result
IM_ASSERT(init_width_or_weight<=0.0f&&"Can only specify width/weight if sizing policy is set explicitly in either Table or Column.");
IM_ASSERT_USER_ERROR_RET(init_width_or_weight<=0.0f,"TableSetupColumn(): can only specify width/weight if sizing policy is set explicitly in either Table or Column.");
// When passing a width automatically enforce WidthFixed policy
// (whereas TableSetupColumnFlags would default to WidthAuto if table is not resizable)
@ -1662,12 +1664,8 @@ void ImGui::TableSetupScrollFreeze(int columns, int rows)
{
ImGuiContext&g=*GImGui;
ImGuiTable*table=g.CurrentTable;
if(table==NULL)
{
IM_ASSERT_USER_ERROR(table!=NULL,"Call should only be done while in BeginTable() scope!");
return;
}
IM_ASSERT(table->IsLayoutLocked==false&&"Need to call TableSetupColumn() before first row!");
IM_ASSERT_USER_ERROR_RET(table!=NULL,"Call should only be done while in BeginTable() scope!");
IM_ASSERT(table->IsLayoutLocked==false&&"TableSetupColumn(): need to call before first row!");