.TH "hyle-bud/hyle-bud.h" 3 "hyle-bud" \" -*- nroff -*- .ad l .nh .SH NAME hyle-bud/hyle-bud.h \- Bridge from hyle row data to bud tree rendering\&. .SH SYNOPSIS .br .PP \fR#include \fP .br \fR#include \fP .br \fR#include \fP .br \fR#include \fP .br \fR#include \fP .br .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBhyle_bud_row_action_t\fP" .br .RI "Per-row action descriptor for hyle_bud_table_actions\&. " .ti -1c .RI "struct \fBhyle_bud_action_picker_spec_t\fP" .br .RI "Spec for hyle_bud_action_picker\&. " .in -1c .SS "Macros" .in +1c .ti -1c .RI "#define \fBHYLE_BUD_PICKER_MAX_OPTS\fP HYLE_PICKER_MAX_OPTS" .br .RI "Maximum number of option rows per picker page\&. " .ti -1c .RI "#define \fBHYLE_BUD_PICKER_MAX_SEL\fP HYLE_PICKER_MAX_SEL" .br .RI "Maximum number of pinned selections per picker\&. " .ti -1c .RI "#define \fBHYLE_BUD_PICKER_MAX_FIELDS\fP HYLE_PICKER_MAX_FIELDS" .br .RI "Maximum number of picker fields in a view\&. " .ti -1c .RI "#define \fBHYLE_BUD_PICK_QS_BUDGET\fP HYLE_PICKER_QS_BUDGET" .br .RI "Query-string budget for picker state\&. " .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef hyle_option_t \fBhyle_bud_option_t\fP" .br .RI "Option row: an id/label pair\&. Alias for hyle_option_t\&. " .ti -1c .RI "typedef hyle_picker_desc_t \fBhyle_bud_picker_desc_t\fP" .br .RI "Picker widget descriptor\&. Alias for hyle_picker_desc_t\&. " .ti -1c .RI "typedef hyle_picker_entry_t \fBhyle_bud_picker_entry_t\fP" .br .RI "One picker field's view entry\&. Alias for hyle_picker_entry_t\&. " .ti -1c .RI "typedef hyle_picker_view_t \fBhyle_bud_picker_view_t\fP" .br .RI "Collection of picker field entries\&. Alias for hyle_picker_view_t\&. " .ti -1c .RI "typedef hyle_picker_buffer_t \fBhyle_bud_picker_buffer_t\fP" .br .RI "Storage buffers backing a picker view\&. Alias for hyle_picker_buffer_t\&. " .ti -1c .RI "typedef const char *(* \fBhyle_bud_translate_fn\fP) (const char *msgid)" .br .RI "Translation callback type\&. " .in -1c .SS "Enumerations" .in +1c .ti -1c .RI "enum \fBhyle_row_action_kind_t\fP { \fBHYLE_ROW_ACTION_NONE\fP = 0, \fBHYLE_ROW_ACTION_LINK\fP, \fBHYLE_ROW_ACTION_SUBMIT\fP }" .br .RI "Row-action descriptor for hyle_bud_table_actions\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "void \fBhyle_bud_state_apply\fP (void *state, const hyle_schema_desc_t *fields, const char *json)" .br .RI "Bind JSON object values onto a state struct described by a schema\&. " .ti -1c .RI "void \fBhyle_bud_state_apply_len\fP (void *state, const hyle_schema_desc_t *fields, const char *json, size_t len)" .br .RI "Bind JSON object values onto a state struct, with explicit length\&. " .ti -1c .RI "void \fBhyle_bud_picker_state_from_json\fP (const char *json, size_t jlen, const char *key, const char *target, int multi, const char *q, int page, \fBhyle_bud_picker_buffer_t\fP *buf, \fBhyle_bud_picker_view_t\fP *pv_out)" .br .RI "Parse picker JSON state into a view and its storage buffer\&. " .ti -1c .RI "void \fBhyle_bud_picker_state_to_json\fP (const \fBhyle_bud_picker_view_t\fP *pv, struct stl_json *j_root)" .br .RI "Write a picker view's options and selections into a stl_json object\&. " .ti -1c .RI "void \fBhyle_bud_set_translator\fP (\fBhyle_bud_translate_fn\fP fn)" .br .RI "Install the string translator used for UI labels\&. " .ti -1c .RI "const char * \fBhyle_bud_tr\fP (const char *msgid)" .br .RI "Translate a message identifier via the installed translator\&. " .ti -1c .RI "bud_node * \fBhyle_bud_text_input\fP (const char *key, const char *label, const char *current_value)" .br .RI "Build a plain text filter input\&. " .ti -1c .RI "bud_node * \fBhyle_bud_filter_field\fP (const char *key, const char *label, int type, const char *current_value, const \fBhyle_bud_option_t\fP *options, int noptions, const char *filter_style)" .br .RI "Filter widget for a field of a given type\&. " .ti -1c .RI "bud_node * \fBhyle_bud_form\fP (const hyle_schema_desc_t *schema, const void *record, const char *action, const char *cancel_href, const char *submit_label, const char *csrf_token, const \fBhyle_bud_picker_view_t\fP *pv, const char *vstr_val)" .br .RI "Schema-driven generic form for an entity record\&. " .ti -1c .RI "bud_node * \fBhyle_bud_input\fP (const char *name, const char *label, const char *val, const char *type, const char *class_name)" .br .RI "Render a standalone input control with label and container\&. " .ti -1c .RI "bud_node * \fBhyle_bud_field\fP (const hyle_schema_desc_t *field, const char *val, const char *class_name)" .br .RI "Render a standalone input field derived from a Hyle schema field descriptor\&. " .ti -1c .RI "bud_node * \fBhyle_bud_filter\fP (const hyle_schema_desc_t *desc, const char *field_name, const char *current_value, const \fBhyle_bud_picker_view_t\fP *pv)" .br .RI "Schema-driven generic filter component for one field\&. " .ti -1c .RI "bud_node * \fBhyle_bud_filter_from_schema\fP (const hyle_schema_desc_t *desc, const char *field_name, const char *current_value, const \fBhyle_bud_option_t\fP *options, int noptions)" .br .RI "Schema-driven filter built from explicit option rows\&. " .ti -1c .RI "bud_node * \fBhyle_bud_filter_scoped\fP (const hyle_schema_desc_t *desc, const char *field_name, int scope, const char *current_value, const char *current_label, const char *get_action, const \fBhyle_bud_picker_view_t\fP *pv, int is_active, const char *extra_class, bud_node **sibling_forms_out)" .br .RI "Scoped/indexed filter for repeated rows, tables or cards\&. " .ti -1c .RI "bud_node * \fBhyle_bud_filter_group\fP (const hyle_schema_desc_t *desc, const char **field_names, int n_fields, const char *current_qs, const \fBhyle_bud_picker_view_t\fP *pv)" .br .RI "Generic filter group / bar builder from a schema and field list\&. " .ti -1c .RI "void \fBhyle_bud_ms_reset\fP (void)" .br .RI "Reset multi-select widget state\&. " .ti -1c .RI "bud_node * \fBhyle_bud_multiselect_field\fP (const char *key, const char *label, const char *current_value, const \fBhyle_bud_option_t\fP *options, int noptions)" .br .RI "Multi-select dropdown widget (SSR-first, WASM-enhanced)\&. " .ti -1c .RI "bud_node * \fBhyle_bud_reference_select_dropdown\fP (const char *key, const char *label, const char *current_value, const \fBhyle_bud_option_t\fP *options, int noptions)" .br .RI "Dropdown single-select widget (SSR-first, WASM-enhanced)\&. " .ti -1c .RI "bud_node * \fBhyle_bud_table_header\fP (const char **col_keys, const char **col_labels, int ncols, const char *sort_field, int sort_asc, const char *qs)" .br .RI "Build a sortable table header row\&. " .ti -1c .RI "bud_node * \fBhyle_bud_table_body\fP (const char **col_keys, const char **col_labels, int ncols, const char **ids, int nids, const char **values, const char *module)" .br .RI "Build a table body from row ids and values\&. " .ti -1c .RI "bud_node * \fBhyle_bud_table\fP (const char **col_keys, const char **col_labels, int ncols, const char **ids, int nids, const char **values, const char *module, const char *sort_field, int sort_asc, const char *qs)" .br .RI "Build a full sortable table\&. " .ti -1c .RI "bud_node * \fBhyle_bud_pagination\fP (int page, int per_page, int total, int row_count, const char *qs)" .br .RI "Build a pagination bar for a result table\&. " .ti -1c .RI "bud_node * \fBhyle_bud_table_actions\fP (const char **col_keys, const char **col_labels, int ncols, const char **ids, int nids, const char **values, const char *module, const char *sort_field, int sort_asc, const char *qs, const \fBhyle_bud_row_action_t\fP *action)" .br .RI "Build a table whose rows carry a uniform action overlay\&. " .ti -1c .RI "bud_node * \fBhyle_bud_picker_field\fP (const \fBhyle_bud_picker_desc_t\fP *d)" .br .RI "Full picker widget: trigger summary plus options panel\&. " .ti -1c .RI "bud_node * \fBhyle_bud_action_picker\fP (const \fBhyle_bud_action_picker_spec_t\fP *spec, const \fBhyle_bud_picker_view_t\fP *pv)" .br .RI "Standalone action picker: field, sibling GET form and POST form\&. " .ti -1c .RI "void \fBhyle_bud_picker_slots\fP (const \fBhyle_bud_picker_desc_t\fP *d, char *panel, size_t panel_sz, char *values, size_t values_sz)" .br .RI "Render panel innards and summary span HTML for the reset path\&. " .ti -1c .RI "void \fBhyle_bud_picker_rows\fP (const \fBhyle_bud_picker_desc_t\fP *d, char *rows, size_t rows_sz)" .br .RI "Render only the option-row chunk (infinite-scroll append path)\&. " .ti -1c .RI "int \fBhyle_bud_pick_find_active_scope\fP (const char *qs, char *scope_buf, size_t scope_sz)" .br .RI "Discover the active picker scope from a query string\&. " .ti -1c .RI "int \fBhyle_bud_picker_view_collect_schema\fP (const char *qs, const hyle_schema_desc_t *schema, const void *record, \fBhyle_bud_picker_view_t\fP *pv_out, int *active_scope_out)" .br .RI "Collect picker entries for all reference fields in a schema\&. " .ti -1c .RI "int \fBhyle_bud_picker_view_collect_scoped\fP (const char *qs, const hyle_schema_desc_t *schema, const void *record, \fBhyle_bud_picker_view_t\fP *pv_out, const char *scope)" .br .RI "Collect picker entries with an explicit scope suffix\&. " .ti -1c .RI "int \fBhyle_bud_picker_view_collect_auto_fields_schema\fP (const char *qs, const hyle_schema_desc_t *schema, \fBhyle_bud_picker_view_t\fP *pv_out, int *active_field_idx_out, int *active_scope_out)" .br .RI "Collect the picker entry matching the query string's active field\&. " .ti -1c .RI "int \fBhyle_bud_state_overlay_from_desc\fP (struct stl_json *jo, const void *state, const bud_field_desc_t *fields, int int_kind, int str_kind)" .br .RI "Add a C state struct's fields to a stl_json object\&. " .ti -1c .RI "struct stl_json * \fBhyle_bud_state_overlay_array\fP (const void *items, int count, size_t elem_size, const bud_field_desc_t *fields, int int_kind, int str_kind)" .br .RI "Build a JSON array of objects from an array of C structs\&. " .ti -1c .RI "int \fBhyle_bud_cache_put\fP (const char *dataset_id, const char *query_str, const char *json, size_t len)" .br .RI "Store a query result or table slice in the client-side cache\&. " .ti -1c .RI "const char * \fBhyle_bud_cache_get\fP (const char *dataset_id, const char *query_str, size_t *len_out)" .br .RI "Retrieve a cached query result or table slice\&. " .ti -1c .RI "void \fBhyle_bud_cache_invalidate\fP (const char *dataset_id)" .br .RI "Invalidate all cache entries matching a dataset identifier\&. " .ti -1c .RI "void \fBhyle_bud_cache_clear\fP (void)" .br .RI "Clear all entries in the client-side cache\&. " .ti -1c .RI "size_t \fBhyle_bud_cache_count\fP (const char *dataset_id)" .br .RI "Return the number of active cached entries for a dataset\&. " .in -1c .SH "Detailed Description" .PP Bridge from hyle row data to bud tree rendering\&. The only bud-dependent hyle bridge: binds JSON/state row values onto bud nodes and schema descriptors for SSR and WASM alike\&. .SH "Typedef Documentation" .PP .SS "typedef const char *(* hyle_bud_translate_fn) (const char *msgid)" .PP Translation callback type\&. .PP \fBParameters\fP .RS 4 \fImsgid\fP Message identifier to translate\&. .RE .PP \fBReturns\fP .RS 4 Translated string\&. .RE .PP .SH "Enumeration Type Documentation" .PP .SS "enum \fBhyle_row_action_kind_t\fP" .PP Row-action descriptor for hyle_bud_table_actions\&. Makes each row uniformly activable via a stretched overlay element in the first cell\&. LINK renders an (href defaults to /{module}/{id}); SUBMIT renders a