- Window: Fixed windows using the ImGuiWindowFlags_NoSavedSettings flag from not using the same default position as other windows. (#1760)
- Window: Relaxed the internal stack size checker to allow Push/Begin/Pop/.../End patterns to be used with PushStyleColor, PushStyleVar, PushFont without causing a false positive assert. (#1767)
- Columns: Fixed a bug introduced in 1.51 where columns would affect the contents size of their container, often creating feedback loops when ImGuiWindowFlags_AlwaysAutoResize was used. (#1760)
- Settings: Added io.WantSaveIniSettings flag, which is set to notify the application that e.g. SaveIniSettingsToMemory() should be called. (#923, #993)
- MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that don't display all pixels. (#1439) [@dougbinks]
- InputText: On Mac OS X, filter out characters when the CMD modifier is held. (#1747) [@sivu]
- InputText: On Mac OS X, support CMD+SHIFT+Z for Redo. CMD+Y is also supported as major apps seems to default to support both. (#1765) [@lfnoise]
// This function is merely here to free heap allocations.
voidImGui::Shutdown(ImGuiContext*context)
{
ImGuiContext&g=*context;
// The fonts atlas can be used prior to calling NewFrame(), so we clear it even if g.Initialized is FALSE (which would happen if we never called NewFrame)
ImGuiContext&g=*context;
if(g.IO.Fonts&&g.FontAtlasOwnedByContext)
IM_DELETE(g.IO.Fonts);
g.IO.Fonts=NULL;
// Cleanup of other data are conditional on actually having initialize ImGui.
// Cleanup of other data are conditional on actually having initialized ImGui.
if(!g.Initialized)
return;
// Save settings (unless we haven't attempted to load them: CreateContext/DestroyContext without a call to NewFrame shouldn't save an empty file)
// The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini"). Set io.IniFilename to NULL to load/save manually.
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_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.
// Memory Utilities
// All those functions are not reliant on the current context.
// If you reload the contents of imgui.cpp at runtime, you may need to call SetCurrentContext() + SetAllocatorFunctions() again.
ImGuiConfigFlagsConfigFlags;// = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Gamepad/keyboard navigation options, etc.
ImGuiBackendFlagsBackendFlags;// = 0 // Set ImGuiBackendFlags_ enum. Set by imgui_impl_xxx files or custom back-end.
ImGuiBackendFlagsBackendFlags;// = 0 // Set ImGuiBackendFlags_ enum. Set by imgui_impl_xxx files or custom back-end to communicate features supported by the back-end.
ImVec2DisplaySize;// <unset> // Display size, in pixels. For clamping windows positions.
floatDeltaTime;// = 1.0f/60.0f // Time elapsed since last frame, in seconds.
floatIniSavingRate;// = 5.0f // Maximum time between saving positions/sizes to .ini file, in seconds.
constchar*IniFilename;// = "imgui.ini" // Path to .ini file. NULL to disable .ini saving.
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*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.
floatMouseDoubleClickMaxDist;// = 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
@ -1081,6 +1088,7 @@ struct ImGuiIO
boolWantCaptureKeyboard;// When io.WantCaptureKeyboard is true, imgui will use the keyboard inputs, do not dispatch them to your main game/application (in both cases, always pass keyboard inputs to imgui). (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
boolWantTextInput;// Mobile/console: when io.WantTextInput is true, you may display an on-screen keyboard. This is set by ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).
boolWantSetMousePos;// MousePos has been altered, back-end should reposition mouse on next frame. Set only when ImGuiConfigFlags_NavEnableSetMousePos flag is enabled.
boolWantSaveIniSettings;// If io.IniFilename == NULL, this will be set to notify your application that you can call SaveIniSettingsToMemory() and save yourself. IMPORTANT: You need to clear io.WantSaveIniSettings yourself.
boolNavActive;// Directional navigation is currently allowed (will handle ImGuiKey_NavXXX events) = a window is focused and it doesn't use the ImGuiWindowFlags_NoNavInputs flag.
boolNavVisible;// Directional navigation is visible and allowed (will handle ImGuiKey_NavXXX events).
floatFramerate;// Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
// NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build().