Files
fn_registry/cpp/functions/core/select.md
T
egutierrez 3699a2554d docs(registry): tested:true + test_file_path en .md de primitivos
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).
2026-04-28 23:42:35 +02:00

1.6 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
imgui
select
dropdown
form
ui
tokens
tokens_cpp_core
false
imgui
true
compiles and links against Catch2 (placeholder, visual cubierto en 0048)
cpp/tests/test_select.cpp cpp/functions/core/select.cpp imgui
name desc
label Label mostrado arriba, tambien usado como id (prefijado con ##)
name desc
selected_idx Puntero a int con el indice seleccionado. -1 = ninguno (solo si allow_none)
name desc
options Array de C-strings con las opciones visibles
name desc
count Numero de opciones
name desc
allow_none Si true, aparece '(none)' como opcion inicial con indice -1
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);