// Define attributes of all API symbols declarations (e.g. for DLL under Windows)
@ -209,7 +210,9 @@ namespace ImGui
IMGUI_APIboolIsWindowCollapsed();
IMGUI_APIboolIsWindowFocused(ImGuiFocusedFlagsflags=0);// is current window focused? or its root/child, depending on flags. see flags for options.
IMGUI_APIboolIsWindowHovered(ImGuiHoveredFlagsflags=0);// is current window hovered (and typically: not blocked by a popup/modal)? see flags for options. NB: If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the 'io.WantCaptureMouse' boolean for that! Please read the FAQ!
IMGUI_APIImDrawList*GetWindowDrawList();// get draw list associated to the window, to append your own drawing primitives
IMGUI_APIboolIsWindowDocked();
IMGUI_APIImDrawList*GetWindowDrawList();// get draw list associated to the current window, to append your own drawing primitives
IMGUI_APIImVec2GetWindowPos();// get current window position in screen space (useful if you want to do your own drawing via the DrawList API)
IMGUI_APIImVec2GetWindowSize();// get current window size
IMGUI_APIfloatGetWindowWidth();// get current window width (shortcut for GetWindowSize().x)
@ -228,6 +231,7 @@ namespace ImGui
IMGUI_APIvoidSetNextWindowCollapsed(boolcollapsed,ImGuiCondcond=0);// set next window collapsed state. call before Begin()
IMGUI_APIvoidSetNextWindowFocus();// set next window to be focused / front-most. call before Begin()
IMGUI_APIvoidSetNextWindowBgAlpha(floatalpha);// set next window background color alpha. helper to easily modify ImGuiCol_WindowBg/ChildBg/PopupBg.
IMGUI_APIvoidSetNextWindowDock(ImGuiIDdock_id,ImGuiCondcond=0);// set next window dock id (FIXME-DOCK)
IMGUI_APIvoidSetWindowPos(constImVec2&pos,ImGuiCondcond=0);// (not recommended) set current window position - call within Begin()/End(). prefer using SetNextWindowPos(), as this may incur tearing and side-effects.
IMGUI_APIvoidSetWindowSize(constImVec2&size,ImGuiCondcond=0);// (not recommended) set current window size - call within Begin()/End(). set to ImVec2(0,0) to force an auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects.
IMGUI_APIvoidSetWindowCollapsed(boolcollapsed,ImGuiCondcond=0);// (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed().
@ -499,12 +503,18 @@ namespace ImGui
// Tabs
// [BETA API] API may evolve.
// Note: Tabs are automatically created by the docking system. Use this to create tab bars/tabs yourself without docking being involved.
IMGUI_APIboolBeginTabBar(constchar*str_id,ImGuiTabBarFlagsflags=0);// create and append into a TabBar
IMGUI_APIvoidEndTabBar();
IMGUI_APIboolBeginTabItem(constchar*label,bool*p_open=NULL,ImGuiTabItemFlags=0);// create a Tab. Returns true if the Tab is selected.
IMGUI_APIvoidEndTabItem();// only call EndTabItem() if BeginTabItem() returns true!
IMGUI_APIvoidSetTabItemClosed(constchar*tab_or_docked_window_label);// notify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on reorderable tab bars). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise call with a window name.
// Docking
// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
// Note: you DO NOT need to call DockSpace() to use most Docking facilities! You can hold SHIFT anywhere while moving windows. Use DockSpace() if you need to create an explicit docking space _within_ an existing window. See Docking demo for details)
ImGuiWindowFlags_UnsavedDocument=1<<20,// Append '*' to title without altering the ID, as a convenience to avoid using the ### operator. When used in a tab/docking context, tab is selected on closure and closure is deferred by one frame to allow code to cancel the closure (with a confirmation popup, etc.) without flicker.
ImGuiWindowFlags_UnsavedDocument=1<<20,// Append '*' to title without affecting the ID, as a convenience to avoid using the ### operator. When used in a tab/docking context, tab is selected on closure and closure is deferred by one frame to allow code to cancel the closure (with a confirmation popup, etc.) without flicker.
ImGuiWindowFlags_NoDocking=1<<21,// Disable docking of this window
// [Internal]
ImGuiWindowFlags_NavFlattened=1<<23,// [BETA] Allow gamepad/keyboard navigation to cross over parent border to this child (only use on child that have no scrolling!)
@ -643,7 +654,8 @@ enum ImGuiWindowFlags_
ImGuiWindowFlags_Tooltip=1<<25,// Don't use! For internal use by BeginTooltip()
ImGuiWindowFlags_Popup=1<<26,// Don't use! For internal use by BeginPopup()
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_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]
//ImGuiWindowFlags_ShowBorders = 1 << 7, // --> Set style.FrameBorderSize=1.0f / style.WindowBorderSize=1.0f to enable borders around windows and items
@ -897,6 +909,9 @@ enum ImGuiConfigFlags_
ImGuiConfigFlags_NoMouse=1<<4,// Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information set by the back-end.
ImGuiConfigFlags_NoMouseCursorChange=1<<5,// Instruct back-end to not alter mouse cursor shape and visibility. Use if the back-end 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.
// [BETA] Docking
ImGuiConfigFlags_DockingEnable=1<<6,// Docking enable flags. Use SHIFT to dock window into another (or without SHIFT if io.ConfigDockingWithKeyMod = false).
// User storage (to allow your back-end/engine to communicate to code that may be shared between multiple projects. Those flags are not used by core ImGui)
ImGuiConfigFlags_IsSRGB=1<<20,// Application is SRGB-aware.
ImGuiConfigFlags_IsTouchScreen=1<<21// Application is using a touch screen instead of a mouse.
@ -951,6 +966,8 @@ enum ImGuiCol_
ImGuiCol_TabActive,
ImGuiCol_TabUnfocused,
ImGuiCol_TabUnfocusedActive,
ImGuiCol_DockingPreview,
ImGuiCol_DockingBg,// Empty node
ImGuiCol_PlotLines,
ImGuiCol_PlotLinesHovered,
ImGuiCol_PlotHistogram,
@ -1150,6 +1167,7 @@ struct ImGuiIO
// Miscellaneous configuration options
boolMouseDrawCursor;// = false // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). Cannot be easily renamed to 'io.ConfigXXX' because this is frequently used by back-end implementations.
boolConfigDockingWithKeyMod;// = true // Enable docking with holding Shift key (reduce visual noise, allows dropping in wider space)
boolConfigMacOSXBehaviors;// = defined(__APPLE__) // 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 (was called io.OptMacOSXBehaviors prior to 1.63)
boolConfigInputTextCursorBlink;// = true // Set to false to disable blinking cursor, for users who consider it distracting. (was called: io.OptCursorBlink prior to 1.63)
boolConfigResizeWindowsFromEdges;// = false // [BETA] Enable resizing of windows from their edges and from the lower-left corner. This requires (io.BackendFlags & ImGuiBackendFlags_HasMouseCursors) because it needs mouse cursor feedback. (This used to be the ImGuiWindowFlags_ResizeFromAnySide flag)
if(show_app_dockspace)ShowExampleAppDockSpace(&show_app_dockspace);// Process the Docking app first, as explicit DockSpace() needs to be submitted early (read comments near the DockSpace function)
if(show_app_documents)ShowExampleAppDocuments(&show_app_documents);// Process the Document app next, as it may also use a DockSpace()
if(no_close)p_open=NULL;// Don't pass our bool* to Begin
// We specify a default position/size in case there's no data in the .ini file. Typically this isn't required! We only do it to make the Demo applications a little more welcoming.
// Demonstrate using DockSpace() to create an explicit docking spacing within an existing window.
// Note that you already dock windows into each others _without_ a DockSpace() by just holding SHIFT when moving a window.
// DockSpace() is only useful to construct to a central location for your application.
voidShowExampleAppDockSpace(bool*p_open)
{
staticboolopt_fullscreen_persistant=true;
boolopt_fullscreen=opt_fullscreen_persistant;
// We are using the ImGuiWindowFlags_NoDocking flag to make the parent window not dockable into.
// Because 1) it would be confusing to have two docking targets within each others.
// and 2) we want our main DockSpace to always be visible (never hidden within a tab bar): if the DockSpace disappear its child windows will be orphaned.
"You can _always_ dock _any_ window into another by holding the SHIFT key while moving a window. Try it now!""\n"
"This demo app has nothing to do with it!""\n\n"
"This demo app only demonstrate the use of ImGui::DockSpace() which allows you to specify a docking spot _within_ another window. This is useful so you can decorate your main application window (e.g. with a menu bar).""\n\n"
"ImGui::DockSpace() comes with one hard constraint: it needs to be submitted _before_ any window which may be docked into it. Therefore, if you use a dock spot as the central point of your application, you'll probably want it to be part of the very first window you are submitting to imgui every frame.""\n\n"
"(NB: because of this constraint, the implicit \"Debug\" window can not be docked into an explicit DockSpace(), because that window is submitted as part of the NewFrame() call. An easy workaround is that you can create your own implicit \"Debug##2\" window after calling DockSpace() and leave it in the window stack for anyone to use.)"
@ -40,6 +40,9 @@ struct ImGuiColorMod; // Stacked color modifier, backup of modifie
structImGuiColumnData;// Storage data for a single column
structImGuiColumnsSet;// Storage data for a columns set
structImGuiContext;// Main imgui context
structImGuiDockContext;// Docking system context
structImGuiDockNode;// Docking system node (hold a list of Windows OR two child dock nodes)
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()
structImGuiInputTextState;// Internal state of the currently focused/edited text input box
structImGuiItemHoveredDataBackup;// Backup and restore IsItemHovered() internal data
@ -90,6 +93,9 @@ namespace ImGuiStb
externIMGUI_APIImGuiContext*GImGui;// Current implicit ImGui context pointer
#endif
// Internal Drag and Drop payload types. String starting with '_' are reserved for Dear ImGui.
// NB: we can't rely on ImVec2 math operators being available here
structIMGUI_APIImRect
@ -524,9 +538,11 @@ struct ImGuiWindowSettings
ImGuiIDID;
ImVec2Pos;
ImVec2Size;
ImGuiIDDockId;// ID of last known DockNode (even if the DockNode is invisible because it has only 1 active window), or 0 if none.
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.
ImGuiCondSetWindowPosAllowFlags;// store acceptable condition flags for SetNextWindowPos() use.
ImGuiCondSetWindowSizeAllowFlags;// store acceptable condition flags for SetNextWindowSize() use.
ImGuiCondSetWindowCollapsedAllowFlags;// store acceptable condition flags for SetNextWindowCollapsed() use.
ImGuiCondSetWindowDockAllowFlags;// store acceptable condition flags for SetNextWindowDock() use.
ImVec2SetWindowPosVal;// store window position when using a non-zero Pivot (position set needs to be processed when we know the window size)
ImVec2SetWindowPosPivot;// store window pivot for positioning. ImVec2(0,0) when positioning from top-left corner; ImVec2(0.5f,0.5f) for centering; ImVec2(1,1) for bottom right.
@ -1099,6 +1164,7 @@ struct IMGUI_API ImGuiWindow
ImDrawListDrawListInst;
ImGuiWindow*ParentWindow;// If we are a child _or_ popup window, this is pointing to our parent. Otherwise NULL.
ImGuiWindow*RootWindow;// Point to ourself or first ancestor that is not a child window.
ImGuiWindow*RootWindowDockStop;// Point to ourself or first ancestor that is not a child window. Doesn't cross through dock nodes. We use this so IsWindowFocused() can behave consistently regardless of docking state.
ImGuiWindow*RootWindowForTitleBarHighlight;// Point to ourself or first ancestor which will display TitleBgActive color when this window is active.
ImGuiWindow*RootWindowForNav;// Point to ourself or first ancestor which doesn't have the NavFlattened flag.
intFocusIdxAllRequestNext;// Item being requested for focus, for next update (relies on layout to be stable between the frame pressing TAB and the next frame)
intFocusIdxTabRequestNext;// "
// Docking
ImGuiDockNode*DockNode;// Which node are we docked into
ImGuiDockNode*DockNodeAsHost;// Which node are we owning (for parent windows)
ImGuiIDDockId;// Backup of last valid DockNode->Id, so single value remember their dock node id
ImGuiItemStatusFlagsDockTabItemStatusFlags;
ImRectDockTabItemRect;
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.