Merge branch 'master' into docking

# Conflicts:
#	imgui.cpp
#	imgui_demo.cpp
This commit is contained in:
omar
2019-04-16 13:12:01 +02:00
13 changed files with 104 additions and 63 deletions

View File

@ -63,7 +63,7 @@ struct ImDrawDataBuilder; // Helper to build a ImDrawData instance
struct ImDrawListSharedData; // Data shared between all ImDrawList instances
struct ImGuiColorMod; // Stacked color modifier, backup of modified data so we can restore it
struct ImGuiColumnData; // Storage data for a single column
struct ImGuiColumnsSet; // Storage data for a columns set
struct ImGuiColumns; // Storage data for a columns set
struct ImGuiContext; // Main imgui context
struct ImGuiDockContext; // Docking system context
struct ImGuiDockNode; // Docking system node (hold a list of Windows OR two child dock nodes)
@ -681,7 +681,7 @@ struct ImGuiColumnData
ImGuiColumnData() { OffsetNorm = OffsetNormBeforeResize = 0.0f; Flags = 0; }
};
struct ImGuiColumnsSet
struct ImGuiColumns
{
ImGuiID ID;
ImGuiColumnsFlags Flags;
@ -695,7 +695,7 @@ struct ImGuiColumnsSet
float StartMaxPosX; // Copy of CursorMaxPos
ImVector<ImGuiColumnData> Columns;
ImGuiColumnsSet() { Clear(); }
ImGuiColumns() { Clear(); }
void Clear()
{
ID = 0;
@ -1311,7 +1311,7 @@ struct IMGUI_API ImGuiWindowTempData
ImVec1 Indent; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
ImVec1 GroupOffset;
ImVec1 ColumnsOffset; // Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
ImGuiColumnsSet* ColumnsSet; // Current columns set
ImGuiColumns* CurrentColumns; // Current columns set
ImGuiWindowTempData()
{
@ -1342,7 +1342,7 @@ struct IMGUI_API ImGuiWindowTempData
Indent = ImVec1(0.0f);
GroupOffset = ImVec1(0.0f);
ColumnsOffset = ImVec1(0.0f);
ColumnsSet = NULL;
CurrentColumns = NULL;
}
};
@ -1414,7 +1414,7 @@ struct IMGUI_API ImGuiWindow
float ItemWidthDefault;
ImGuiMenuColumns MenuColumns; // Simplified columns storage for menu items
ImGuiStorage StateStorage;
ImVector<ImGuiColumnsSet> ColumnsStorage;
ImVector<ImGuiColumns> ColumnsStorage;
float FontWindowScale; // User scale multiplier per-window
float FontDpiScale;
int SettingsIdx; // Index into SettingsWindow[] (indices are always valid as we only grow the array from the back)
@ -1711,6 +1711,8 @@ namespace ImGui
IMGUI_API void BeginColumns(const char* str_id, int count, ImGuiColumnsFlags flags = 0); // setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().
IMGUI_API void EndColumns(); // close columns
IMGUI_API void PushColumnClipRect(int column_index = -1);
IMGUI_API ImGuiID GetColumnsID(const char* str_id, int count);
IMGUI_API ImGuiColumns* FindOrCreateColumns(ImGuiWindow* window, ImGuiID id);
// Tab Bars
IMGUI_API bool BeginTabBarEx(ImGuiTabBar* tab_bar, const ImRect& bb, ImGuiTabBarFlags flags, ImGuiDockNode* dock_node);