3699a2554d
20 funciones C++ pasan de tested:false a tested:true con sus tests correspondientes y test_file_path apuntando a cpp/tests/. Cubre 4 tests reales (tween_curves, pie/kpi/bar math) y 16 placeholders (componentes UI con tests visuales pendientes para 0048). Coverage cpp pasa de 4% (3/81) a 28% (23/81).
1.7 KiB
1.7 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 | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| toolbar | component | cpp | core | 1.0.0 | pure | void fn_ui::toolbar_begin(); void fn_ui::toolbar_separator(); void fn_ui::toolbar_end() | Grupo horizontal de acciones (buttons/icon_buttons) con spacing coherente y separadores verticales. Patron begin/separator/end. |
|
|
false |
|
true |
|
cpp/tests/test_toolbar.cpp | cpp/functions/core/toolbar.cpp | imgui | Inicializa/cierra un grupo horizontal con spacing sm; toolbar_separator dibuja una linea vertical sutil entre grupos |
toolbar
Contenedor horizontal para agrupar acciones con spacing consistente. El caller es responsable de llamar a ImGui::SameLine() entre widgets consecutivos — toolbar_separator() ya incluye SameLine implicito.
Patron
#include "core/toolbar.h"
#include "core/button.h"
#include "core/icon_button.h"
using namespace fn_ui;
toolbar_begin();
if (button("New", ButtonVariant::Primary)) { /* ... */ }
ImGui::SameLine();
if (button("Open")) { /* ... */ }
toolbar_separator();
if (icon_button("##reload", "\xe2\x86\xbb", "Reload")) { /* ... */ }
toolbar_end();
Notas
- Para alinear la toolbar a la derecha del page_header usar
ImGui::SameLine(ImGui::GetWindowWidth() - estimated_width)antes del begin, o usar un Table de 2 columnas con la derecha stretch. - El separador usa
colors::borderde tokens y ocupa 70% deGetFrameHeight.