// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow()
if(show_test_window)
{
ImGui::SetNextWindowPos(ImVec2(650,20),ImGuiSetCond_FirstUseEver);// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
ImGui::SetNextWindowPos(ImVec2(650,20),ImGuiCond_FirstUseEver);// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
// 3. Show the ImGui test window. Most of the sample code is in ImGui::ShowTestWindow()
if(show_test_window)
{
ImGui::SetNextWindowPos(ImVec2(650,20),ImGuiSetCond_FirstUseEver);// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
ImGui::SetNextWindowPos(ImVec2(650,20),ImGuiCond_FirstUseEver);// Normally user code doesn't need/want to call it because positions are saved in .ini file anyway. Here we just want to make the demo initial state a bit more friendly!
// You can use the "##" or "###" markers to use the same label with different id, or same id with different label. See documentation at the top of this file.
// - Return false when window is collapsed, so you can early out in your code. You always need to call ImGui::End() even if false is returned.
// - Passing 'bool* p_open' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed.
// - Passing non-zero 'size' is roughly equivalent to calling SetNextWindowSize(size, ImGuiSetCond_FirstUseEver) prior to calling Begin().
// - Passing non-zero 'size' is roughly equivalent to calling SetNextWindowSize(size, ImGuiCond_FirstUseEver) prior to calling Begin().
@ -73,7 +73,7 @@ typedef int ImGuiKey; // a key identifier (ImGui-side enum) // e
typedefintImGuiColorEditFlags;// color edit flags for Color*() // enum ImGuiColorEditFlags_
typedefintImGuiMouseCursor;// a mouse cursor identifier // enum ImGuiMouseCursor_
typedefintImGuiWindowFlags;// window flags for Begin*() // enum ImGuiWindowFlags_
typedefintImGuiSetCond;// condition flags for Set*() // enum ImGuiSetCond_
typedefintImGuiCond;// condition flags for Set*() // enum ImGuiCond_
typedefintImGuiInputTextFlags;// flags for InputText*() // enum ImGuiInputTextFlags_
typedefintImGuiSelectableFlags;// flags for Selectable() // enum ImGuiSelectableFlags_
typedefintImGuiTreeNodeFlags;// flags for TreeNode*(), Collapsing*() // enum ImGuiTreeNodeFlags_
@ -148,22 +148,22 @@ namespace ImGui
IMGUI_APIboolIsWindowCollapsed();
IMGUI_APIvoidSetWindowFontScale(floatscale);// per-window font scale. Adjust IO.FontGlobalScale if you want to scale all windows
IMGUI_APIvoidSetNextWindowPos(constImVec2&pos,ImGuiSetCond cond=0);// set next window position. call before Begin()
IMGUI_APIvoidSetNextWindowPosCenter(ImGuiSetCond cond=0);// set next window position to be centered on screen. call before Begin()
IMGUI_APIvoidSetNextWindowSize(constImVec2&size,ImGuiSetCond cond=0);// set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin()
IMGUI_APIvoidSetNextWindowPos(constImVec2&pos,ImGuiCond cond=0);// set next window position. call before Begin()
IMGUI_APIvoidSetNextWindowPosCenter(ImGuiCond cond=0);// set next window position to be centered on screen. call before Begin()
IMGUI_APIvoidSetNextWindowSize(constImVec2&size,ImGuiCond cond=0);// set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin()
IMGUI_APIvoidSetNextWindowSizeConstraints(constImVec2&size_min,constImVec2&size_max,ImGuiSizeConstraintCallbackcustom_callback=NULL,void*custom_callback_data=NULL);// set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Use callback to apply non-trivial programmatic constraints.
IMGUI_APIvoidSetNextWindowContentSize(constImVec2&size);// set next window content size (enforce the range of scrollbars). set axis to 0.0f to leave it automatic. call before Begin()
IMGUI_APIvoidSetNextWindowContentWidth(floatwidth);// set next window content width (enforce the range of horizontal scrollbar). call before Begin()
IMGUI_APIvoidSetNextWindowCollapsed(boolcollapsed,ImGuiSetCond cond=0);// set next window collapsed state. call before Begin()
IMGUI_APIvoidSetNextWindowCollapsed(boolcollapsed,ImGuiCond cond=0);// set next window collapsed state. call before Begin()
IMGUI_APIvoidSetNextWindowFocus();// set next window to be focused / front-most. call before Begin()
IMGUI_APIvoidSetWindowPos(constImVec2&pos,ImGuiSetCond cond=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,ImGuiSetCond cond=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,ImGuiSetCond cond=0);// (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed().
IMGUI_APIvoidSetWindowPos(constImVec2&pos,ImGuiCond cond=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,ImGuiCond cond=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,ImGuiCond cond=0);// (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed().
IMGUI_APIvoidSetWindowFocus();// (not recommended) set current window to be focused / front-most. prefer using SetNextWindowFocus().
IMGUI_APIvoidSetWindowPos(constchar*name,constImVec2&pos,ImGuiSetCond cond=0);// set named window position.
IMGUI_APIvoidSetWindowSize(constchar*name,constImVec2&size,ImGuiSetCond cond=0);// set named window size. set axis to 0.0f to force an auto-fit on this axis.
IMGUI_APIvoidSetWindowCollapsed(constchar*name,boolcollapsed,ImGuiSetCond cond=0);// set named window collapsed state
IMGUI_APIvoidSetWindowFocus(constchar*name);// set named window to be focused / front-most. use NULL to remove focus.
IMGUI_APIvoidSetWindowPos(constchar*name,constImVec2&pos,ImGuiCond cond=0);// set named window position.
IMGUI_APIvoidSetWindowSize(constchar*name,constImVec2&size,ImGuiCond cond=0);// set named window size. set axis to 0.0f to force an auto-fit on this axis.
IMGUI_APIvoidSetWindowCollapsed(constchar*name,boolcollapsed,ImGuiCond cond=0);// set named window collapsed state
IMGUI_APIvoidSetWindowFocus(constchar*name);// set named window to be focused / front-most. use NULL to remove focus.
IMGUI_APIfloatGetScrollX();// get scrolling amount [0..GetScrollMaxX()]
IMGUI_APIfloatGetScrollY();// get scrolling amount [0..GetScrollMaxY()]
@ -345,7 +345,7 @@ namespace ImGui
IMGUI_APIvoidTreePop();// ~ Unindent()+PopId()
IMGUI_APIvoidTreeAdvanceToLabelPos();// advance cursor x position by GetTreeNodeToLabelSpacing()
IMGUI_APIfloatGetTreeNodeToLabelSpacing();// horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode
IMGUI_APIvoidSetNextTreeNodeOpen(boolis_open,ImGuiSetCond cond=0);// set next TreeNode/CollapsingHeader open state.
IMGUI_APIvoidSetNextTreeNodeOpen(boolis_open,ImGuiCond cond=0);// set next TreeNode/CollapsingHeader open state.
IMGUI_APIboolCollapsingHeader(constchar*label,ImGuiTreeNodeFlagsflags=0);// if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop().
IMGUI_APIboolCollapsingHeader(constchar*label,bool*p_open,ImGuiTreeNodeFlagsflags=0);// when 'p_open' isn't NULL, display an additional small close button on upper right of the header
@ -708,13 +708,18 @@ enum ImGuiMouseCursor_
};
// Condition flags for ImGui::SetWindow***(), SetNextWindow***(), SetNextTreeNode***() functions
// All those functions treat 0 as a shortcut to ImGuiSetCond_Always
enumImGuiSetCond_
// All those functions treat 0 as a shortcut to ImGuiCond_Always
enumImGuiCond_
{
ImGuiSetCond_Always=1<<0,// Set the variable
ImGuiSetCond_Once=1<<1,// Set the variable once per runtime session (only the first call with succeed)
ImGuiSetCond_FirstUseEver=1<<2,// Set the variable if the window has no saved data (if doesn't exist in the .ini file)
ImGuiSetCond_Appearing=1<<3// Set the variable if the window is appearing after being hidden/inactive (or the first time)
ImGuiCond_Always=1<<0,// Set the variable
ImGuiCond_Once=1<<1,// Set the variable once per runtime session (only the first call with succeed)
ImGuiCond_FirstUseEver=1<<2,// Set the variable if the window has no saved data (if doesn't exist in the .ini file)
ImGuiCond_Appearing=1<<3// Set the variable if the window is appearing after being hidden/inactive (or the first time)