mirror of
https://github.com/ocornut/imgui.git
synced 2026-06-03 21:39:59 +08:00
TabBar: Internals: added TabBarFindByID(), TabBarRemove() helpers.
Currently only for the benefit of TestEngine.
This commit is contained in:
@@ -3522,6 +3522,8 @@ namespace ImGui
|
|||||||
|
|
||||||
// Tab Bars
|
// Tab Bars
|
||||||
inline ImGuiTabBar* GetCurrentTabBar() { ImGuiContext& g = *GImGui; return g.CurrentTabBar; }
|
inline ImGuiTabBar* GetCurrentTabBar() { ImGuiContext& g = *GImGui; return g.CurrentTabBar; }
|
||||||
|
IMGUI_API ImGuiTabBar* TabBarFindByID(ImGuiID id);
|
||||||
|
IMGUI_API void TabBarRemove(ImGuiTabBar* tab_bar);
|
||||||
IMGUI_API bool BeginTabBarEx(ImGuiTabBar* tab_bar, const ImRect& bb, ImGuiTabBarFlags flags);
|
IMGUI_API bool BeginTabBarEx(ImGuiTabBar* tab_bar, const ImRect& bb, ImGuiTabBarFlags flags);
|
||||||
IMGUI_API ImGuiTabItem* TabBarFindTabByID(ImGuiTabBar* tab_bar, ImGuiID tab_id);
|
IMGUI_API ImGuiTabItem* TabBarFindTabByID(ImGuiTabBar* tab_bar, ImGuiID tab_id);
|
||||||
IMGUI_API ImGuiTabItem* TabBarFindTabByOrder(ImGuiTabBar* tab_bar, int order);
|
IMGUI_API ImGuiTabItem* TabBarFindTabByOrder(ImGuiTabBar* tab_bar, int order);
|
||||||
|
|||||||
+1
-1
@@ -3943,7 +3943,7 @@ void ImGui::TableSettingsAddSettingsHandler()
|
|||||||
// - TableGcCompactSettings() [Internal]
|
// - TableGcCompactSettings() [Internal]
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
// Remove Table (currently only used by TestEngine)
|
// Remove Table data (currently only used by TestEngine)
|
||||||
void ImGui::TableRemove(ImGuiTable* table)
|
void ImGui::TableRemove(ImGuiTable* table)
|
||||||
{
|
{
|
||||||
//IMGUI_DEBUG_PRINT("TableRemove() id=0x%08X\n", table->ID);
|
//IMGUI_DEBUG_PRINT("TableRemove() id=0x%08X\n", table->ID);
|
||||||
|
|||||||
@@ -9557,6 +9557,19 @@ static ImGuiPtrOrIndex GetTabBarRefFromTabBar(ImGuiTabBar* tab_bar)
|
|||||||
return ImGuiPtrOrIndex(tab_bar);
|
return ImGuiPtrOrIndex(tab_bar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGuiTabBar* ImGui::TabBarFindByID(ImGuiID id)
|
||||||
|
{
|
||||||
|
ImGuiContext& g = *GImGui;
|
||||||
|
return g.TabBars.GetByKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove TabBar data (currently only used by TestEngine)
|
||||||
|
void ImGui::TabBarRemove(ImGuiTabBar* tab_bar)
|
||||||
|
{
|
||||||
|
ImGuiContext& g = *GImGui;
|
||||||
|
g.TabBars.Remove(tab_bar->ID, tab_bar);
|
||||||
|
}
|
||||||
|
|
||||||
bool ImGui::BeginTabBar(const char* str_id, ImGuiTabBarFlags flags)
|
bool ImGui::BeginTabBar(const char* str_id, ImGuiTabBarFlags flags)
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
|
|||||||
Reference in New Issue
Block a user