da6a8b5e59
Anade 9 primitivas reutilizables al registry C++ que replican el comportamiento de los componentes correspondientes de @fn_library / Mantine v9, todas estilizadas con tokens_cpp_core (colores Mantine dark + indigo): - button_cpp_core (component, pure) variantes primary/secondary/subtle/danger + sm/md/lg - icon_button_cpp_core (component, pure) cuadrado 28x28 con glyph centrado + tooltip - toolbar_cpp_core (component, pure) grupo horizontal de acciones con separadores - modal_dialog_cpp_core (component, pure) popup modal centrada + close con Escape - text_input_cpp_core (component, impure) InputText con label muted + placeholder - select_cpp_core (component, impure) dropdown con label + opcion '(none)' opcional - toast_cpp_core (component, impure) notificaciones efimeras + inbox con badge - tree_view_cpp_core (component, impure) jerarquia low-level con tree_node_clicked helper - process_runner_cpp_core (component, impure) tarea en std::thread + spinner inline Cada primitiva tiene su .md con frontmatter completo (params/output) y se indexa via fn index. Son la base del primitives_gallery y de cualquier app fn_ui futura.
1.5 KiB
1.5 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 | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| select | component | cpp | core | 1.0.0 | impure | bool fn_ui::select(const char* label, int* selected_idx, const char* const* options, int count, bool allow_none = false) | Select/dropdown ImGui con label muted, estilo surface+border y opcion '(none)' opcional |
|
|
false |
|
false | cpp/functions/core/select.cpp | imgui |
|
true el frame en que la seleccion cambio |
select
Label muted + combo estilizado con tokens. Apto para campos de formulario (lang, domain, project parent).
Ejemplo
static int lang_idx = 0;
const char* langs[] = {"go", "py", "ts", "sh", "cpp"};
fn_ui::select("Language", &lang_idx, langs, 5);
// Con opcion "ninguno"
static int project_idx = -1;
fn_ui::select("Project", &project_idx, project_names.data(),
(int)project_names.size(), true);