From 854fc081949b0a373f039a5b092d7065c5c36cdb Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 20 Dec 2019 16:19:34 +0100 Subject: [PATCH] Amend f70204f2 to facilitate merges. --- imgui.cpp | 31 +++++++++++++++---------------- imgui_internal.h | 1 + 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 5d58f2fa..144fdd25 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -880,8 +880,6 @@ static void ImeSetInputScreenPosFn_DefaultImpl(int x, int y); namespace ImGui { -static bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags flags); - // Navigation static void NavUpdate(); static void NavUpdateWindowing(); @@ -3876,8 +3874,7 @@ void ImGui::Initialize(ImGuiContext* context) g.SettingsHandlers.push_back(ini_handler); } -#if 0 // FIXME-WIP: This is a placeholder to facilitate merging of Tables branch into multiple branches. - +#ifdef IMGUI_HAS_TABLE // Add .ini handle for ImGuiTable type { ImGuiSettingsHandler ini_handler; @@ -3888,8 +3885,10 @@ void ImGui::Initialize(ImGuiContext* context) ini_handler.WriteAllFn = TableSettingsHandler_WriteAll; g.SettingsHandlers.push_back(ini_handler); } +#endif // #ifdef IMGUI_HAS_TABLE -#endif +#ifdef IMGUI_HAS_DOCK +#endif // #ifdef IMGUI_HAS_DOCK g.Initialized = true; } @@ -4654,7 +4653,7 @@ static ImRect GetViewportRect() return ImRect(0.0f, 0.0f, g.IO.DisplaySize.x, g.IO.DisplaySize.y); } -static bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags flags) +bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags flags) { ImGuiContext& g = *GImGui; ImGuiWindow* parent_window = g.CurrentWindow; @@ -10102,20 +10101,22 @@ void ImGui::ShowMetricsWindow(bool* p_open) IM_UNUSED(trt_rects_names); IM_UNUSED(show_tables_rects); IM_UNUSED(show_tables_rect_type); -#if 0 +#ifdef IMGUI_HAS_TABLE if (ImGui::TreeNode("Tables", "Tables (%d)", g.Tables.GetSize())) { + for (int n = 0; n < g.Tables.GetSize(); n++) + Funcs::NodeTable(g.Tables.GetByIndex(n)); ImGui::TreePop(); } -#endif +#endif // #define IMGUI_HAS_TABLE // Details for Docking -#if 0 +#ifdef IMGUI_HAS_DOCK if (ImGui::TreeNode("Docking")) { ImGui::TreePop(); } -#endif +#endif // #define IMGUI_HAS_DOCK // Misc Details if (ImGui::TreeNode("Internal state")) @@ -10192,8 +10193,7 @@ void ImGui::ShowMetricsWindow(bool* p_open) } } - // FIXME-WIP: This is a placeholder to facilitate merging of Tables branch into multiple branches. -#if 0 +#ifdef IMGUI_HAS_TABLE // Overlay: Display Tables Rectangles if (show_tables_rects) { @@ -10202,15 +10202,14 @@ void ImGui::ShowMetricsWindow(bool* p_open) ImGuiTable* table = g.Tables.GetByIndex(table_n); } } -#endif +#endif // #define IMGUI_HAS_TABLE - // FIXME-WIP: This is a placeholder to facilitate merging of Docking branch into multiple branches. -#if 0 +#ifdef IMGUI_HAS_DOCK // Overlay: Display Docking info if (show_docking_nodes && g.IO.KeyCtrl) { } -#endif +#endif // #define IMGUI_HAS_DOCK ImGui::End(); } diff --git a/imgui_internal.h b/imgui_internal.h index ea58b65c..cf55e53c 100644 --- a/imgui_internal.h +++ b/imgui_internal.h @@ -1668,6 +1668,7 @@ namespace ImGui IMGUI_API void LogToBuffer(int auto_open_depth = -1); // Start logging/capturing to internal buffer // Popups, Modals, Tooltips + IMGUI_API bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, bool border, ImGuiWindowFlags flags); IMGUI_API void OpenPopupEx(ImGuiID id); IMGUI_API void ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup); IMGUI_API void ClosePopupsOverWindow(ImGuiWindow* ref_window, bool restore_focus_to_window_under_popup);