feat: add C++ ImGui functions for core UI and visualization
Funciones C++/ImGui para dashboards (grid, panel, docking, sidebar, tabs), visualizaciones (candlestick, gauge, histogram, pie, sparkline, heatmap, scatter, line, bar, surface3d, kpi, table), grafos (force layout, renderer, viewport, spatial hash, types) y utilidades (time series buffer, tracy zones, memory/fps overlay, plot theme). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include "core/sidebar.h"
|
||||
#include "imgui.h"
|
||||
|
||||
static bool s_sidebar_was_open = false;
|
||||
|
||||
bool sidebar_begin(const char* title, bool* open, float width) {
|
||||
if (!*open) {
|
||||
s_sidebar_was_open = false;
|
||||
if (ImGui::Button(">")) {
|
||||
*open = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
s_sidebar_was_open = true;
|
||||
ImGui::SetNextWindowSize(ImVec2(width, 0.0f), ImGuiCond_Always);
|
||||
ImGui::Begin(title, open, ImGuiWindowFlags_NoCollapse);
|
||||
return true;
|
||||
}
|
||||
|
||||
void sidebar_end() {
|
||||
if (s_sidebar_was_open) {
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user