7eef2544ab
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>
1.8 KiB
1.8 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path, framework, params, output
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | framework | params | output | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| sidebar | component | cpp | core | 1.0.0 | pure | bool sidebar_begin(const char* title, bool* open, float width = 250.0f) | Panel lateral colapsable para filtros y controles de dashboard |
|
false |
|
false | cpp/functions/core/sidebar.cpp | imgui |
|
true si el sidebar esta abierto y se debe renderizar contenido entre sidebar_begin y sidebar_end |
sidebar
Panel lateral colapsable. Cuando *open == true renderiza una ventana ImGui de ancho fijo con boton de cierre. Cuando *open == false muestra un boton compacto ">" para reabrir.
Siempre llamar sidebar_end() despues de sidebar_begin(), independientemente del valor de retorno.
Ejemplo
static bool filters_open = true;
void render_fn() {
if (sidebar_begin("Filters", &filters_open)) {
ImGui::SliderFloat("Min value", &min_val, 0.0f, 100.0f);
ImGui::Checkbox("Show inactive", &show_inactive);
}
sidebar_end();
// contenido principal
ImGui::Begin("Main");
// ...
ImGui::End();
}
Notas
El estado de s_sidebar_was_open es una variable estatica interna que coordina sidebar_begin y sidebar_end. Solo un sidebar activo a la vez por frame (patron begin/end clasico de ImGui). Para multiples sidebars simultaneos, instanciar logica propia con estado separado.