mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Merge branch 'master' into docking + fix for RenderMouseCursor()
# Conflicts: # docs/CHANGELOG.txt # examples/imgui_impl_opengl3.cpp # imgui.cpp # imgui_draw.cpp # imgui_internal.h
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.73 WIP
|
||||
// dear imgui, v1.73
|
||||
// (internal structures/api)
|
||||
|
||||
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
|
||||
@ -1366,20 +1366,20 @@ struct ImGuiContext
|
||||
// FIXME: That's theory, in practice the delimitation between ImGuiWindow and ImGuiWindowTempData is quite tenuous and could be reconsidered.
|
||||
struct IMGUI_API ImGuiWindowTempData
|
||||
{
|
||||
ImVec2 CursorPos;
|
||||
ImVec2 CursorPos; // Current emitting position, in absolute coordinates.
|
||||
ImVec2 CursorPosPrevLine;
|
||||
ImVec2 CursorStartPos; // Initial position in client area with padding
|
||||
ImVec2 CursorStartPos; // Initial position after Begin(), generally ~ window position + WindowPadding.
|
||||
ImVec2 CursorMaxPos; // Used to implicitly calculate the size of our contents, always growing during the frame. Used to calculate window->ContentSize at the beginning of next frame
|
||||
ImVec2 CurrLineSize;
|
||||
ImVec2 PrevLineSize;
|
||||
float CurrLineTextBaseOffset;
|
||||
float CurrLineTextBaseOffset; // Baseline offset (0.0f by default on a new line, generally == style.FramePadding.y when a framed item has been added).
|
||||
float PrevLineTextBaseOffset;
|
||||
int TreeDepth;
|
||||
ImU32 TreeStoreMayJumpToParentOnPop; // Store a copy of !g.NavIdIsAlive for TreeDepth 0..31.. Could be turned into a ImU64 if necessary.
|
||||
ImGuiID LastItemId;
|
||||
ImGuiItemStatusFlags LastItemStatusFlags;
|
||||
ImRect LastItemRect; // Interaction rect
|
||||
ImRect LastItemDisplayRect; // End-user display rect (only valid if LastItemStatusFlags & ImGuiItemStatusFlags_HasDisplayRect)
|
||||
int TreeDepth; // Current tree depth.
|
||||
ImU32 TreeMayJumpToParentOnPopMask; // Store a copy of !g.NavIdIsAlive for TreeDepth 0..31.. Could be turned into a ImU64 if necessary.
|
||||
ImGuiID LastItemId; // ID for last item
|
||||
ImGuiItemStatusFlags LastItemStatusFlags; // Status flags for last item (see ImGuiItemStatusFlags_)
|
||||
ImRect LastItemRect; // Interaction rect for last item
|
||||
ImRect LastItemDisplayRect; // End-user display rect for last item (only valid if LastItemStatusFlags & ImGuiItemStatusFlags_HasDisplayRect)
|
||||
ImGuiNavLayer NavLayerCurrent; // Current layer, 0..31 (we currently only use 0..1)
|
||||
int NavLayerCurrentMask; // = (1 << NavLayerCurrent) used by ItemAdd prior to clipping.
|
||||
int NavLayerActiveMask; // Which layer have been written to (result from previous frame)
|
||||
@ -1389,7 +1389,7 @@ struct IMGUI_API ImGuiWindowTempData
|
||||
bool MenuBarAppending; // FIXME: Remove this
|
||||
ImVec2 MenuBarOffset; // MenuBarOffset.x is sort of equivalent of a per-layer CursorPos.x, saved/restored as we switch to the menu bar. The only situation when MenuBarOffset.y is > 0 if when (SafeAreaPadding.y > FramePadding.y), often used on TVs.
|
||||
ImVector<ImGuiWindow*> ChildWindows;
|
||||
ImGuiStorage* StateStorage;
|
||||
ImGuiStorage* StateStorage; // Current persistent per-window storage (store e.g. tree node open/close state)
|
||||
ImGuiLayoutType LayoutType;
|
||||
ImGuiLayoutType ParentLayoutType; // Layout type of parent window at the time of Begin()
|
||||
int FocusCounterAll; // Counter for focus/tabbing system. Start at -1 and increase as assigned via FocusableItemRegister() (FIXME-NAV: Needs redesign)
|
||||
@ -1416,7 +1416,7 @@ struct IMGUI_API ImGuiWindowTempData
|
||||
CurrLineSize = PrevLineSize = ImVec2(0.0f, 0.0f);
|
||||
CurrLineTextBaseOffset = PrevLineTextBaseOffset = 0.0f;
|
||||
TreeDepth = 0;
|
||||
TreeStoreMayJumpToParentOnPop = 0x00;
|
||||
TreeMayJumpToParentOnPopMask = 0x00;
|
||||
LastItemId = 0;
|
||||
LastItemStatusFlags = 0;
|
||||
LastItemRect = LastItemDisplayRect = ImRect();
|
||||
@ -1459,9 +1459,9 @@ struct IMGUI_API ImGuiWindow
|
||||
ImVec2 SizeFull; // Size when non collapsed
|
||||
ImVec2 ContentSize; // Size of contents/scrollable client area (calculated from the extents reach of the cursor) from previous frame. Does not include window decoration or window padding.
|
||||
ImVec2 ContentSizeExplicit; // Size of contents/scrollable client area explicitly request by the user via SetNextWindowContentSize().
|
||||
ImVec2 WindowPadding; // Window padding at the time of begin.
|
||||
float WindowRounding; // Window rounding at the time of begin.
|
||||
float WindowBorderSize; // Window border size at the time of begin.
|
||||
ImVec2 WindowPadding; // Window padding at the time of Begin().
|
||||
float WindowRounding; // Window rounding at the time of Begin().
|
||||
float WindowBorderSize; // Window border size at the time of Begin().
|
||||
int NameBufLen; // Size of buffer storing Name. May be larger than strlen(Name)!
|
||||
ImGuiID MoveId; // == window->GetID("#MOVE")
|
||||
ImGuiID ChildId; // ID of corresponding item in parent window (for navigation to return from child window to parent window)
|
||||
@ -1470,7 +1470,7 @@ struct IMGUI_API ImGuiWindow
|
||||
ImVec2 ScrollTarget; // target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0f. (FLT_MAX for no change)
|
||||
ImVec2 ScrollTargetCenterRatio; // 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered
|
||||
ImVec2 ScrollbarSizes; // Size taken by scrollbars on each axis
|
||||
bool ScrollbarX, ScrollbarY;
|
||||
bool ScrollbarX, ScrollbarY; // Are scrollbars visible?
|
||||
bool ViewportOwned;
|
||||
bool Active; // Set to true on Begin(), unless Collapsed
|
||||
bool WasActive;
|
||||
@ -1487,9 +1487,9 @@ struct IMGUI_API ImGuiWindow
|
||||
short BeginOrderWithinParent; // Order within immediate parent window, if we are a child window. Otherwise 0.
|
||||
short BeginOrderWithinContext; // Order within entire imgui context. This is mostly used for debugging submission order related issues.
|
||||
ImGuiID PopupId; // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling)
|
||||
int AutoFitFramesX, AutoFitFramesY;
|
||||
ImS8 AutoFitFramesX, AutoFitFramesY;
|
||||
ImS8 AutoFitChildAxises;
|
||||
bool AutoFitOnlyGrows;
|
||||
int AutoFitChildAxises;
|
||||
ImGuiDir AutoPosLastDirection;
|
||||
int HiddenFramesCanSkipItems; // Hide the window for N frames
|
||||
int HiddenFramesCannotSkipItems; // Hide the window for N frames while allowing items to be submitted so we can measure their size
|
||||
@ -1515,7 +1515,7 @@ struct IMGUI_API ImGuiWindow
|
||||
|
||||
int LastFrameActive; // Last frame number the window was Active.
|
||||
int LastFrameJustFocused; // Last frame number the window was made Focused.
|
||||
float LastTimeActive;
|
||||
float LastTimeActive; // Last timestamp the window was Active (using float as we don't need high precision there)
|
||||
float ItemWidthDefault;
|
||||
ImGuiMenuColumns MenuColumns; // Simplified columns storage for menu items
|
||||
ImGuiStorage StateStorage;
|
||||
@ -1882,6 +1882,7 @@ namespace ImGui
|
||||
// Render helpers (those functions don't access any ImGui state!)
|
||||
IMGUI_API void RenderArrow(ImDrawList* draw_list, ImVec2 pos, ImU32 col, ImGuiDir dir, float scale = 1.0f);
|
||||
IMGUI_API void RenderBullet(ImDrawList* draw_list, ImVec2 pos, ImU32 col);
|
||||
IMGUI_API void RenderMouseCursor(ImDrawList* draw_list, ImVec2 pos, float scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow);
|
||||
IMGUI_API void RenderArrowPointingAt(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, ImGuiDir direction, ImU32 col);
|
||||
IMGUI_API void RenderArrowDockMenu(ImDrawList* draw_list, ImVec2 p_min, float sz, ImU32 col);
|
||||
IMGUI_API void RenderRectFilledRangeH(ImDrawList* draw_list, const ImRect& rect, ImU32 col, float x_start_norm, float x_end_norm, float rounding);
|
||||
|
Reference in New Issue
Block a user