@ -27,7 +27,7 @@ Dear ImGui is designed to **enable fast iterations** and to **empower programmer
Dear ImGui is particularly suited to integration in game engines (for tooling), real-time 3D applications, fullscreen applications, embedded applications, or any applications on console platforms where operating system features are non-standard.
- Minimize state synchronization.
- Minimize state storage on user side.
- Minimize UI-related state storage on user side.
- Minimize setup and maintenance.
- Easy to use to create dynamic UI which are the reflection of a dynamic data set.
- Easy to use to create code-driven and data-driven tools.
@ -133,7 +133,7 @@ Officially maintained backends/bindings (in repository):
- Many bindings are auto-generated (by good old [cimgui](https://github.com/cimgui/cimgui) or newer/experimental [dear_bindings](https://github.com/dearimgui/dear_bindings)), you can use their metadata output to generate bindings for other languages.
[Useful Extensions/Widgets](https://github.com/ocornut/imgui/wiki/Useful-Extensions) wiki page:
- Automation/testing, Text editors, node editors, timeline editors, plotting, software renderers, remote network access, memory editors, gizmos, etc. One of the most notable and well supported extension is [ImPlot](https://github.com/epezent/implot).
- Automation/testing, Text editors, node editors, timeline editors, plotting, software renderers, remote network access, memory editors, gizmos, etc. Notable and well supported extensions include [ImPlot](https://github.com/epezent/implot) and [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine).
Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
See: [Dear ImGui Test Engine + Test Suite](https://github.com/ocornut/imgui_test_engine) for Automation & Testing.
Getting started? For first-time users having issues compiling/linking/running or issues loading fonts, please use [GitHub Discussions](https://github.com/ocornut/imgui/discussions). For other questions, bug reports, requests, feedback, you may post on [GitHub Issues](https://github.com/ocornut/imgui/issues). Please read and fill the New Issue template carefully.
Getting started? For first-time users having issues compiling/linking/running or issues loading fonts, please use [GitHub Discussions](https://github.com/ocornut/imgui/discussions). For ANY other questions, bug reports, requests, feedback, please post on [GitHub Issues](https://github.com/ocornut/imgui/issues). Please read and fill the New Issue template carefully.
Private support is available for paying business customers (E-mail: _contact @ dearimgui dot com_).
@ -177,10 +177,10 @@ How to help
**How can I help?**
- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues) and [GitHub Discussions](https://github.com/ocornut/imgui/discussions).
- See [GitHub Forum/Issues](https://github.com/ocornut/imgui/issues).
- You may help with development and submit pull requests! Please understand that by submitting a PR you are also submitting a request for the maintainer to review your code and then take over its maintenance forever. PR should be crafted both in the interest of the end-users and also to ease the maintainer into understanding and accepting it.
- See [Help wanted](https://github.com/ocornut/imgui/wiki/Help-Wanted) on the [Wiki](https://github.com/ocornut/imgui/wiki/) for some more ideas.
- Have your company financially support this project with invoiced sponsoring/support contracts or by buying a license for [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine) (please reach out: omar AT dearimgui DOT com).
- Be a [sponsor](https://github.com/ocornut/imgui/wiki/Sponsors)! Have your company financially support this project via invoiced sponsors/maintenance or by buying a license for [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine) (please reach out: omar AT dearimgui DOT com).
Sponsors
--------
@ -201,9 +201,9 @@ Credits
Developed by [Omar Cornut](https://www.miracleworld.net) and every direct or indirect [contributors](https://github.com/ocornut/imgui/graphs/contributors) to the GitHub. The early version of this library was developed with the support of [Media Molecule](https://www.mediamolecule.com) and first used internally on the game [Tearaway](https://tearaway.mediamolecule.com) (PS Vita).
Recurring contributors (2022): Omar Cornut [@ocornut](https://github.com/ocornut), Rokas Kupstys [@rokups](https://github.com/rokups) (a good portion of work on automation system and regression tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine)).
Recurring contributors include Rokas Kupstys [@rokups](https://github.com/rokups) (2020-2022): a good portion of work on automation system and regression tests now available in [Dear ImGui Test Engine](https://github.com/ocornut/imgui_test_engine).
Sponsoring, support contracts and other B2B transactions are hosted and handled by [Disco Hello](https://www.discohello.com).
Sponsoring, maintenance/support contracts and other B2B transactions are hosted and handled by [Disco Hello](https://www.discohello.com).
Omar: "I first discovered the IMGUI paradigm at [Q-Games](https://www.q-games.com) where Atman Binstock had dropped his own simple implementation in the codebase, which I spent quite some time improving and thinking about. It turned out that Atman was exposed to the concept directly by working with Casey. When I moved to Media Molecule I rewrote a new library trying to overcome the flaws and limitations of the first one I've worked with. It became this library and since then I have spent an unreasonable amount of time iterating and improving it."
IM_ASSERT((child_flags&~ImGuiChildFlags_SupportedMask_)==0&&"Illegal ImGuiChildFlags value. Did you pass ImGuiWindowFlags values instead of ImGuiChildFlags?");
IM_ASSERT((child_flags&(ImGuiChildFlags_ResizeX|ImGuiChildFlags_ResizeY))==0&&"Cannot combine ImGuiChildFlags_ResizeX/ImGuiChildFlags_ResizeY with ImGuiWindowFlags_AlwaysAutoResize.");
// Popups, menus and childs bypass style.WindowMinSize by default, but we give then a non-zero minimum size to facilitate understanding problematic cases (e.g. empty popups)
size_min.y=ImMax(size_min.y,window_for_height->TitleBarHeight()+window_for_height->MenuBarHeight()+ImMax(0.0f,g.Style.WindowRounding-1.0f));// Reduce artifacts with very small windows
if(is_popup||is_menu)// Popups and menus bypass style.WindowMinSize by default, but we give then a non-zero minimum size to facilitate understanding problematic cases (e.g. empty popups)
hovered=held=false;// So border doesn't show highlighted at new position
}
ClearActiveID();
}
if(held)
elseif(held)
{
// Switch to relative resizing mode when border geometry moved (e.g. resizing a child altering parent scroll), in order to avoid resizing feedback loop.
// Currently only using relative mode on resizable child windows, as the problem to solve is more likely noticeable for them, but could apply for all windows eventually.
// FIXME: May want to generalize this idiom at lower-level, so more widgets can use it!
constfloatborder_target_abs_mode_for_axis=g.IO.MousePos[axis]-g.ActiveIdClickOffset[axis]+WINDOWS_HOVER_PADDING;// Match ButtonBehavior() padding above.
if((window->ChildFlags&ImGuiChildFlags_ResizeX)&&(window->SetWindowSizeAllowFlags&ImGuiCond_FirstUseEver)==0)// Axis-specific conditions for BeginChild()
constintresize_grip_count=g.IO.ConfigWindowsResizeFromEdges?2:1;// Allow resize from lower-left if we have the mouse cursor feedback for it.
constintresize_grip_count=(window->Flags&ImGuiWindowFlags_ChildWindow)?0:g.IO.ConfigWindowsResizeFromEdges?2:1;// Allow resize from lower-left if we have the mouse cursor feedback for it.
//buf->appendf("TabId=0x%08X\n", ImHashStr("#TAB", 4, settings->ID)); // window->TabId: this is not read back but writing it makes "debugging" the .ini data easier.
//buf->appendf("TabId=0x%08X\n", ImHashStr("#TAB", 4, settings->ID)); // window->TabId: this is not read back but writing it makes "debugging" the .ini data easier.
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_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 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.
@ -1033,12 +1035,10 @@ enum ImGuiWindowFlags_
ImGuiWindowFlags_NoBringToFrontOnFocus=1<<13,// Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus)
ImGuiWindowFlags_AlwaysVerticalScrollbar=1<<14,// Always show vertical scrollbar (even if ContentSize.y < Size.y)
ImGuiWindowFlags_AlwaysHorizontalScrollbar=1<<15,// Always show horizontal scrollbar (even if ContentSize.x < Size.x)
ImGuiWindowFlags_AlwaysUseWindowPadding=1<<16,// Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)
ImGuiWindowFlags_NoNavInputs=1<<18,// No gamepad/keyboard navigation within the window
ImGuiWindowFlags_NoNavFocus=1<<19,// No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)
ImGuiWindowFlags_UnsavedDocument=1<<20,// Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
ImGuiWindowFlags_NoDocking=1<<21,// Disable docking of this window
ImGuiWindowFlags_NoNavInputs=1<<16,// No gamepad/keyboard navigation within the window
ImGuiWindowFlags_NoNavFocus=1<<17,// No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)
ImGuiWindowFlags_UnsavedDocument=1<<18,// Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
ImGuiWindowFlags_NoDocking=1<<19,// Disable docking of this window
ImGuiWindowFlags_Modal=1<<27,// Don't use! For internal use by BeginPopupModal()
ImGuiWindowFlags_ChildMenu=1<<28,// Don't use! For internal use by BeginMenu()
ImGuiWindowFlags_DockNodeHost=1<<29,// Don't use! For internal use by Begin()/NewFrame()
// Obsolete names
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
ImGuiWindowFlags_AlwaysUseWindowPadding=1<<30,// Obsoleted in 1.90: Use ImGuiChildFlags_AlwaysUseWindowPadding in BeginChild() call.
#endif
};
// Flags for ImGui::BeginChild()
// (Legacy: bit 0 must always correspond to ImGuiChildFlags_Border to be backward compatible with old API using 'bool border'.
enumImGuiChildFlags_
{
ImGuiChildFlags_None=0,
ImGuiChildFlags_Border=1<<0,// Show an outer border and enable WindowPadding. (Important: this is always == 1 for legacy reason)
ImGuiChildFlags_AlwaysUseWindowPadding=1<<1,// Pad with style.WindowPadding even if no border are drawn (no padding by default for non-bordered child windows because it makes more sense)
ImGuiChildFlags_ResizeX=1<<2,// Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags)
ImGuiChildFlags_ResizeY=1<<3,// Allow resize from bottom border (layout direction). "
shortDockOrder;// Order of the last time the window was visible within its DockNode. This is used to reorder windows that are reappearing on the same frame. Same value between windows that were active and windows that were none are possible.
boolCollapsed;
boolIsChild;
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
@ -2086,6 +2089,7 @@ struct ImGuiContext
ImGuiWindow*WheelingWindow;// Track the window we started mouse-wheeling on. Until a timer elapse or mouse has moved, generally keep scrolling the same window even if during the course of scrolling the mouse ends up hovering a child window.
ImVec2WheelingWindowRefMousePos;
intWheelingWindowStartFrame;// This may be set one frame before WheelingWindow is != NULL
intWheelingWindowScrolledFrame;
floatWheelingWindowReleaseTimer;
ImVec2WheelingWindowWheelRemainder;
ImVec2WheelingAxisAvg;
@ -2287,6 +2291,8 @@ struct ImGuiContext
ImU32ColorEditSavedColor;// RGB value with alpha set to 0.
ImVec4ColorPickerRef;// Initial/reference color at the time of opening the color picker.
ImGuiComboPreviewDataComboPreviewData;
ImRectWindowResizeBorderExpectedRect;// Expected border rect, switch to relative edit if moving
boolWindowResizeRelativeMode;
floatSliderGrabClickOffset;
floatSliderCurrentAccum;// Accumulated slider delta when using navigation controls.
boolSliderCurrentAccumDirty;// Has the accumulated slider delta changed since last time we tried to apply it?