|
|
@ -1952,7 +1952,7 @@ enum ImGuiTabItemFlagsPrivate_
|
|
|
|
ImGuiTabItemFlags_Button = 1 << 21 // Used by TabItemButton, change the tab item behavior to mimic a button
|
|
|
|
ImGuiTabItemFlags_Button = 1 << 21 // Used by TabItemButton, change the tab item behavior to mimic a button
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Storage for one active tab item (sizeof() 28~32 bytes)
|
|
|
|
// Storage for one active tab item (sizeof() 40 bytes)
|
|
|
|
struct ImGuiTabItem
|
|
|
|
struct ImGuiTabItem
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ImGuiID ID;
|
|
|
|
ImGuiID ID;
|
|
|
@ -1962,12 +1962,12 @@ struct ImGuiTabItem
|
|
|
|
float Offset; // Position relative to beginning of tab
|
|
|
|
float Offset; // Position relative to beginning of tab
|
|
|
|
float Width; // Width currently displayed
|
|
|
|
float Width; // Width currently displayed
|
|
|
|
float ContentWidth; // Width of label, stored during BeginTabItem() call
|
|
|
|
float ContentWidth; // Width of label, stored during BeginTabItem() call
|
|
|
|
ImS16 NameOffset; // When Window==NULL, offset to name within parent ImGuiTabBar::TabsNames
|
|
|
|
ImS32 NameOffset; // When Window==NULL, offset to name within parent ImGuiTabBar::TabsNames
|
|
|
|
ImS16 BeginOrder; // BeginTabItem() order, used to re-order tabs after toggling ImGuiTabBarFlags_Reorderable
|
|
|
|
ImS16 BeginOrder; // BeginTabItem() order, used to re-order tabs after toggling ImGuiTabBarFlags_Reorderable
|
|
|
|
ImS16 IndexDuringLayout; // Index only used during TabBarLayout()
|
|
|
|
ImS16 IndexDuringLayout; // Index only used during TabBarLayout()
|
|
|
|
bool WantClose; // Marked as closed by SetTabItemClosed()
|
|
|
|
bool WantClose; // Marked as closed by SetTabItemClosed()
|
|
|
|
|
|
|
|
|
|
|
|
ImGuiTabItem() { memset(this, 0, sizeof(*this)); LastFrameVisible = LastFrameSelected = -1; NameOffset = BeginOrder = IndexDuringLayout = -1; }
|
|
|
|
ImGuiTabItem() { memset(this, 0, sizeof(*this)); LastFrameVisible = LastFrameSelected = -1; NameOffset = -1; BeginOrder = IndexDuringLayout = -1; }
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Storage for a tab bar (sizeof() 152 bytes)
|
|
|
|
// Storage for a tab bar (sizeof() 152 bytes)
|
|
|
@ -2009,7 +2009,7 @@ struct ImGuiTabBar
|
|
|
|
int GetTabOrder(const ImGuiTabItem* tab) const { return Tabs.index_from_ptr(tab); }
|
|
|
|
int GetTabOrder(const ImGuiTabItem* tab) const { return Tabs.index_from_ptr(tab); }
|
|
|
|
const char* GetTabName(const ImGuiTabItem* tab) const
|
|
|
|
const char* GetTabName(const ImGuiTabItem* tab) const
|
|
|
|
{
|
|
|
|
{
|
|
|
|
IM_ASSERT(tab->NameOffset != -1 && (int)tab->NameOffset < TabsNames.Buf.Size);
|
|
|
|
IM_ASSERT(tab->NameOffset != -1 && tab->NameOffset < TabsNames.Buf.Size);
|
|
|
|
return TabsNames.Buf.Data + tab->NameOffset;
|
|
|
|
return TabsNames.Buf.Data + tab->NameOffset;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|