SetNextWindowContentSize() adjust for client->window size, but the fate of borders isn't really clear for now (until now we always tried to make borders not affect layout, so if we want a 200x200 fully visible space with borders and zero window padding user need to include the borders) (#1490)
g.SetNextWindowContentSizeVal=size;// In Begin() we will add the size of window decorations (title bar, menu etc.) to that to form a SizeContents value.
IMGUI_APIvoidSetNextWindowPos(constImVec2&pos,ImGuiCondcond=0,constImVec2&pivot=ImVec2(0,0));// set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc.
IMGUI_APIvoidSetNextWindowSize(constImVec2&size,ImGuiCondcond=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_APIvoidSetNextWindowContentSize(constImVec2&size);// set next window content size (~ enforce the range of scrollbars). not including window decorations (title bar, menu bar, etc.). set an axis to 0.0f to leave it automatic. call before Begin()
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_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.
ImVec2CursorMaxPos;// Implicitly calculate the size of our contents, always extending. Saved into window->SizeContents at the end of the frame
ImVec2CursorMaxPos;// Used to implicitly calculate the size of our contents, always growing during the frame. Turned into window->SizeContents at the beginning of next frame
floatCurrentLineHeight;
floatCurrentLineTextBaseOffset;
floatPrevLineHeight;
@ -716,7 +716,7 @@ struct IMGUI_API ImGuiWindow
ImVec2Size;// Current size (==SizeFull or collapsed title bar size)
ImVec2SizeFull;// Size when non collapsed
ImVec2SizeFullAtLastBegin;// Copy of SizeFull at the end of Begin. This is the reference value we'll use on the next frame to decide if we need scrollbars.
ImVec2SizeContents;// Size of contents (== extents reach of the drawing cursor) from previous frame
ImVec2SizeContents;// Size of contents (== extents reach of the drawing cursor) from previous frame. Include decoration, window title, border, menu, etc.
ImVec2SizeContentsExplicit;// Size of contents explicitly set by the user via SetNextWindowContentSize()
ImRectContentsRegionRect;// Maximum visible content position in window coordinates. ~~ (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis
ImVec2WindowPadding;// Window padding at the time of begin.