IniFilename="imgui.ini";// Important: "imgui.ini" is relative to current working dir, most apps will want to lock this to an absolute path (e.g. same path as executables).
g.CurrentItemFlags=g.ItemFlagsStack.back();// Inherit from shared stack
window->DC.NavFocusScopeIdCurrent=(flags&ImGuiWindowFlags_ChildWindow)?parent_window->DC.NavFocusScopeIdCurrent:window->GetID("#FOCUSSCOPE");// Inherit from parent only // -V595
window->DC.NavFocusScopeIdCurrent=(flags&ImGuiWindowFlags_ChildWindow)?parent_window->DC.NavFocusScopeIdCurrent:window->GetID("#FOCUSSCOPE");// Inherit from parent only // -V595
ImGuiIDid=str_id?window->GetID(str_id):window->DC.LastItemId;// If user hasn't passed an ID, we can use the LastItemID. Using LastItemID as a Popup ID won't conflict!
ImGuiIDid=str_id?window->GetID(str_id):g.LastItemData.ID;// If user hasn't passed an ID, we can use the LastItemID. Using LastItemID as a Popup ID won't conflict!
IM_ASSERT(id!=0);// You cannot pass a NULL str_id if the last item has no identifier (e.g. a Text() item)
IM_ASSERT(id!=0);// You cannot pass a NULL str_id if the last item has no identifier (e.g. a Text() item)
ImGuiIDid=str_id?window->GetID(str_id):window->DC.LastItemId;// If user hasn't passed an ID, we can use the LastItemID. Using LastItemID as a Popup ID won't conflict!
ImGuiIDid=str_id?window->GetID(str_id):g.LastItemData.ID;// If user hasn't passed an ID, we can use the LastItemID. Using LastItemID as a Popup ID won't conflict!
IM_ASSERT(id!=0);// You cannot pass a NULL str_id if the last item has no identifier (e.g. a Text() item)
IM_ASSERT(id!=0);// You cannot pass a NULL str_id if the last item has no identifier (e.g. a Text() item)
// Degenerate case: two overlapping buttons with same center, break ties arbitrarily (note that LastItemId here is really the _previous_ item order, but it doesn't matter)
// Degenerate case: two overlapping buttons with same center, break ties arbitrarily (note that LastItemId here is really the _previous_ item order, but it doesn't matter)
//if (!g.IO.NavActive) // [2017/10/06] Removed this possibly redundant test but I am not sure of all the side-effects yet. Some of the feature here will need to work regardless of using a _NoNavInputs flag.
//if (!g.IO.NavActive) // [2017/10/06] Removed this possibly redundant test but I am not sure of all the side-effects yet. Some of the feature here will need to work regardless of using a _NoNavInputs flag.
boolis_drag_docking=ImRect(0,0,window->SizeFull.x,GetFrameHeight()).Contains(g.ActiveIdClickOffset);// FIXME-DOCKING: Need to make this stateful and explicit
boolis_drag_docking=ImRect(0,0,window->SizeFull.x,GetFrameHeight()).Contains(g.ActiveIdClickOffset);// FIXME-DOCKING: Need to make this stateful and explicit
// (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)
// (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)
// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini").
// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini").
// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
// - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables).
IMGUI_APIvoidLoadIniSettingsFromDisk(constchar*ini_filename);// call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls LoadIniSettingsFromDisk(io.IniFilename).
IMGUI_APIvoidLoadIniSettingsFromDisk(constchar*ini_filename);// call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls LoadIniSettingsFromDisk(io.IniFilename).
IMGUI_APIvoidLoadIniSettingsFromMemory(constchar*ini_data,size_tini_size=0);// call after CreateContext() and before the first call to NewFrame() to provide .ini data from your own data source.
IMGUI_APIvoidLoadIniSettingsFromMemory(constchar*ini_data,size_tini_size=0);// call after CreateContext() and before the first call to NewFrame() to provide .ini data from your own data source.
IMGUI_APIvoidSaveIniSettingsToDisk(constchar*ini_filename);// this is automatically called (if io.IniFilename is not empty) a few seconds after any modification that should be reflected in the .ini file (and also by DestroyContext).
IMGUI_APIvoidSaveIniSettingsToDisk(constchar*ini_filename);// this is automatically called (if io.IniFilename is not empty) a few seconds after any modification that should be reflected in the .ini file (and also by DestroyContext).
@ -1876,7 +1877,7 @@ struct ImGuiIO
ImVec2DisplaySize;// <unset> // Main display size, in pixels (generally == GetMainViewport()->Size)
ImVec2DisplaySize;// <unset> // Main display size, in pixels (generally == GetMainViewport()->Size)
floatDeltaTime;// = 1.0f/60.0f // Time elapsed since last frame, in seconds.
floatDeltaTime;// = 1.0f/60.0f // Time elapsed since last frame, in seconds.
floatIniSavingRate;// = 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds.
floatIniSavingRate;// = 5.0f // Minimum time between saving positions/sizes to .ini file, in seconds.
constchar*IniFilename;// = "imgui.ini" // Path to .ini file. Set NULL to disable automatic .ini loading/saving, if e.g. you want to manually load/save from memory.
constchar*IniFilename;// = "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.
constchar*LogFilename;// = "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
constchar*LogFilename;// = "imgui_log.txt"// Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
floatMouseDoubleClickTime;// = 0.30f // Time for a double-click, in seconds.
floatMouseDoubleClickTime;// = 0.30f // Time for a double-click, in seconds.
floatMouseDoubleClickMaxDist;// = 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
floatMouseDoubleClickMaxDist;// = 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
@ -120,7 +120,7 @@ struct ImGuiDockNode; // Docking system node (hold a list of Windo
structImGuiDockNodeSettings;// Storage for a dock node in .ini file (we preserve those even if the associated dock node isn't active during the session)
structImGuiDockNodeSettings;// Storage for a dock node in .ini file (we preserve those even if the associated dock node isn't active during the session)
structImGuiGroupData;// Stacked storage data for BeginGroup()/EndGroup()
structImGuiGroupData;// Stacked storage data for BeginGroup()/EndGroup()
structImGuiInputTextState;// Internal state of the currently focused/edited text input box
structImGuiInputTextState;// Internal state of the currently focused/edited text input box
structImGuiLastItemDataBackup;// Backup and restore IsItemHovered() internal data
structImGuiLastItemData;// Status storage for last submitted items
structImGuiMenuColumns;// Simple column measurement, currently used for MenuItem() only
structImGuiMenuColumns;// Simple column measurement, currently used for MenuItem() only
structImGuiNavItemData;// Result of a gamepad/keyboard directional navigation move query result
structImGuiNavItemData;// Result of a gamepad/keyboard directional navigation move query result
structImGuiMetricsConfig;// Storage for ShowMetricsWindow() and DebugNodeXXX() functions
structImGuiMetricsConfig;// Storage for ShowMetricsWindow() and DebugNodeXXX() functions
@ -1192,6 +1192,25 @@ struct ImGuiNextItemData
inlinevoidClearFlags(){Flags=ImGuiNextItemDataFlags_None;}// Also cleared manually by ItemAdd()!
inlinevoidClearFlags(){Flags=ImGuiNextItemDataFlags_None;}// Also cleared manually by ItemAdd()!
};
};
// Status storage for the last submitted item
structImGuiLastItemData
{
ImGuiIDID;
ImGuiItemFlagsInFlags;// See ImGuiItemFlags_
ImGuiItemStatusFlagsStatusFlags;// See ImGuiItemStatusFlags_
// Data saved for each window pushed into the stack
structImGuiWindowStackData
{
ImGuiWindow*Window;
ImGuiLastItemDataParentLastItemDataBackup;
};
structImGuiShrinkWidthItem
structImGuiShrinkWidthItem
{
{
intIndex;
intIndex;
@ -1588,7 +1607,7 @@ struct ImGuiContext
ImVector<ImGuiWindow*>Windows;// Windows, sorted in display order, back to front
ImVector<ImGuiWindow*>Windows;// Windows, sorted in display order, back to front
ImVector<ImGuiWindow*>WindowsFocusOrder;// Root windows, sorted in focus order, back to front.
ImVector<ImGuiWindow*>WindowsFocusOrder;// Root windows, sorted in focus order, back to front.
ImVector<ImGuiWindow*>WindowsTempSortBuffer;// Temporary buffer used in EndFrame() to reorder windows so parents are kept before their child
ImVector<ImGuiWindow*>WindowsTempSortBuffer;// Temporary buffer used in EndFrame() to reorder windows so parents are kept before their child
ImVector<ImGuiWindow*>CurrentWindowStack;
ImVector<ImGuiWindowStackData>CurrentWindowStack;
ImGuiStorageWindowsById;// Map window's ImGuiID to ImGuiWindow*
ImGuiStorageWindowsById;// Map window's ImGuiID to ImGuiWindow*
intWindowsActiveCount;// Number of unique windows submitted by frame
intWindowsActiveCount;// Number of unique windows submitted by frame
ImVec2WindowsHoverPadding;// Padding around resizable windows for which hovering on counts as hovering the window == ImMax(style.TouchExtraPadding, WINDOWS_HOVER_PADDING)
ImVec2WindowsHoverPadding;// Padding around resizable windows for which hovering on counts as hovering the window == ImMax(style.TouchExtraPadding, WINDOWS_HOVER_PADDING)
ImVec1ColumnsOffset;// Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
ImVec1ColumnsOffset;// Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
ImVec1GroupOffset;
ImVec1GroupOffset;
// Last item status
ImGuiIDLastItemId;// ID for last item
ImGuiItemStatusFlagsLastItemStatusFlags;// Status flags for last item (see ImGuiItemStatusFlags_)
ImRectLastItemRect;// Interaction rect for last item
ImRectLastItemDisplayRect;// End-user display rect for last item (only valid if LastItemStatusFlags & ImGuiItemStatusFlags_HasDisplayRect)
// Keyboard/Gamepad navigation
// Keyboard/Gamepad navigation
ImGuiNavLayerNavLayerCurrent;// Current layer, 0..31 (we currently only use 0..1)
ImGuiNavLayerNavLayerCurrent;// Current layer, 0..31 (we currently only use 0..1)
shortNavLayersActiveMask;// Which layers have been written to (result from previous frame)
shortNavLayersActiveMask;// Which layers have been written to (result from previous frame)
inlineImGuiIDGetItemID(){ImGuiContext&g=*GImGui;returng.CurrentWindow->DC.LastItemId;}// Get ID of last item (~~ often same ImGui::GetID(label) beforehand)
inlineImGuiIDGetItemID(){ImGuiContext&g=*GImGui;returng.LastItemData.ID;}// Get ID of last item (~~ often same ImGui::GetID(label) beforehand)
if(window->SkipItems||!window->ClipRect.Overlaps(window->DC.LastItemRect))// FIXME: Because we don't have a ImGuiItemStatusFlags_Visible flag to test last ItemAdd() result
if(window->SkipItems||!window->ClipRect.Overlaps(g.LastItemData.Rect))// FIXME: Because we don't have a ImGuiItemStatusFlags_Visible flag to test last ItemAdd() result
returnfalse;
returnfalse;
IM_ASSERT(window->DC.LastItemRect.Min.x==preview_data->PreviewRect.Min.x&&window->DC.LastItemRect.Min.y==preview_data->PreviewRect.Min.y);// Didn't call after BeginCombo/EndCombo block or forgot to pass ImGuiComboFlags_CustomPreview flag?
IM_ASSERT(g.LastItemData.Rect.Min.x==preview_data->PreviewRect.Min.x&&g.LastItemData.Rect.Min.y==preview_data->PreviewRect.Min.y);// Didn't call after BeginCombo/EndCombo block or forgot to pass ImGuiComboFlags_CustomPreview flag?
if(!window->ClipRect.Contains(preview_data->PreviewRect))// Narrower test (optional)
if(!window->ClipRect.Contains(preview_data->PreviewRect))// Narrower test (optional)
IM_ASSERT((flags==1||(flags&ImGuiSliderFlags_InvalidMask_)==0)&&"Invalid ImGuiSliderFlags flag! Has the 'float power' argument been mistakenly cast to flags? Call function with ImGuiSliderFlags_Logarithmic flags instead.");
IM_ASSERT((flags==1||(flags&ImGuiSliderFlags_InvalidMask_)==0)&&"Invalid ImGuiSliderFlags flag! Has the 'float power' argument been mistakenly cast to flags? Call function with ImGuiSliderFlags_Logarithmic flags instead.");