Sun, 07 Dec 2025 15:45:30 +0100
rename combobox to dropdown
| application/demo_bindings.c | file | annotate | diff | comparison | revisions | |
| application/main.c | file | annotate | diff | comparison | revisions | |
| ui/cocoa/list.m | file | annotate | diff | comparison | revisions | |
| ui/gtk/list.c | file | annotate | diff | comparison | revisions | |
| ui/gtk/list.h | file | annotate | diff | comparison | revisions | |
| ui/motif/list.c | file | annotate | diff | comparison | revisions | |
| ui/qt/list.cpp | file | annotate | diff | comparison | revisions | |
| ui/ui/tree.h | file | annotate | diff | comparison | revisions | |
| ui/win32/list.c | file | annotate | diff | comparison | revisions |
--- a/application/demo_bindings.c Sun Dec 07 15:40:40 2025 +0100 +++ b/application/demo_bindings.c Sun Dec 07 15:45:30 2025 +0100 @@ -144,7 +144,7 @@ ui_llabel(obj, .varname = "sub_name", .hfill = TRUE, .hexpand = TRUE, .vfill = TRUE); ui_newline(obj); - ui_combobox(obj, .varname = "doclist", .colspan = 2, .onactivate = switch_document, .getvalue = doclist_get_value, .colspan = 2, .hfill = TRUE); + ui_dropdown(obj, .varname = "doclist", .colspan = 2, .onactivate = switch_document, .getvalue = doclist_get_value, .colspan = 2, .hfill = TRUE); ui_newline(obj); ui_frame(obj, .label = "Document", .colspan = 2, .fill = TRUE, .subcontainer = UI_CONTAINER_GRID, .columnspacing = 10, .rowspacing = 10, .padding = 10) { @@ -153,7 +153,7 @@ ui_newline(obj); ui_separator(obj, .colspan = 2, .hfill = TRUE); ui_newline(obj); - ui_combobox(obj, .varname = "subdocuments", .getvalue = sublist_get_value, .onactivate = switch_subdocument, .colspan = 2, .hfill = TRUE); + ui_dropdown(obj, .varname = "subdocuments", .getvalue = sublist_get_value, .onactivate = switch_subdocument, .colspan = 2, .hfill = TRUE); } }
--- a/application/main.c Sun Dec 07 15:40:40 2025 +0100 +++ b/application/main.c Sun Dec 07 15:45:30 2025 +0100 @@ -126,7 +126,7 @@ ui_grid(obj, .margin = 10, .columnspacing = 10, .rowspacing = 10) { ui_hbox(obj, .colspan = 2, .spacing = 10) { - ui_combobox(obj, .varname = "doclist", .getvalue = doclist_getvalue, .onactivate = action_document_selected); + ui_dropdown(obj, .varname = "doclist", .getvalue = doclist_getvalue, .onactivate = action_document_selected); ui_textfield(obj, .varname = "name"); ui_button(obj, .colspan = 4, .label = "Test Groups", .groups = UI_GROUPS(STATE_DOC, STATE_SUB)); } @@ -147,7 +147,7 @@ ui_newline(obj); ui_rlabel(obj, .label = "List 1", .vfill = TRUE); - ui_combobox(obj, .varname = "list1"); + ui_dropdown(obj, .varname = "list1"); } ToplevelDoc *doc = create_toplevel(); @@ -686,7 +686,7 @@ //UiModel *model = ui_model(obj->ctx, UI_ICON_TEXT, "Col 1", UI_STRING, "Col 2", -1); //model->getvalue = list_getvalue; - ui_combobox(obj, .hexpand = true, .vexpand = false, .colspan = 2, .varname = "list", .getvalue = list_getvalue); + ui_dropdown(obj, .hexpand = true, .vexpand = false, .colspan = 2, .varname = "list", .getvalue = list_getvalue); ui_newline(obj); char *dropdown[] = { "Sun", @@ -695,7 +695,7 @@ "SGI", "HP" }; - ui_combobox(obj, .hexpand = true, .vexpand = false, .colspan = 2, .static_elements = dropdown, .static_nelm = 5, .onactivate = action_static_dropdown); + ui_dropdown(obj, .hexpand = true, .vexpand = false, .colspan = 2, .static_elements = dropdown, .static_nelm = 5, .onactivate = action_static_dropdown); ui_newline(obj); ui_hbox0(obj) { @@ -1256,7 +1256,7 @@ //UiModel *model = ui_model(obj->ctx, UI_STRING, "Name", UI_STRING, "Email", -1); //ui_table(obj, .fill = TRUE, .varname = "persons", .model = model, .getvalue = person_getvalue, .onselection = list_onselection); //ui_model_free(obj->ctx, model); - ui_combobox(obj, .varname = "persons", .getvalue = person_getvalue, .onactivate = list_onselection, .hexpand = TRUE, .hfill = TRUE); + ui_dropdown(obj, .varname = "persons", .getvalue = person_getvalue, .onactivate = list_onselection, .hexpand = TRUE, .hfill = TRUE); ui_button(obj, .label = "Test 1"); ui_newline(obj);
--- a/ui/cocoa/list.m Sun Dec 07 15:40:40 2025 +0100 +++ b/ui/cocoa/list.m Sun Dec 07 15:45:30 2025 +0100 @@ -263,7 +263,7 @@ @end -UIWIDGET ui_combobox_create(UiObject* obj, UiListArgs *args) { +UIWIDGET ui_dropdown_create(UiObject* obj, UiListArgs *args) { NSComboBox *dropdown = [[NSComboBox alloc] init]; dropdown.editable = NO;
--- a/ui/gtk/list.c Sun Dec 07 15:40:40 2025 +0100 +++ b/ui/gtk/list.c Sun Dec 07 15:45:30 2025 +0100 @@ -543,7 +543,7 @@ return scroll_area; } -UIWIDGET ui_combobox_create(UiObject *obj, UiListArgs *args) { +UIWIDGET ui_dropdown_create(UiObject *obj, UiListArgs *args) { // to simplify things and share code with ui_tableview_create, we also // use a UiModel for the listview UiModel *model = ui_model(obj->ctx, UI_STRING, "", -1); @@ -592,8 +592,8 @@ list->obj = listview; list->update = ui_listview_update2; - list->getselection = ui_combobox_getselection; - list->setselection = ui_combobox_setselection; + list->getselection = ui_dropdown_getselection; + list->setselection = ui_dropdown_setselection; ui_update_liststore(ls, list); } else if (args->static_elements && args->static_nelm > 0) { @@ -620,7 +620,7 @@ gtk_selection_model_select_item(model, index, TRUE); } -void ui_combobox_select(UIWIDGET dropdown, int index) { +void ui_dropdown_select(UIWIDGET dropdown, int index) { gtk_drop_down_set_selected(GTK_DROP_DOWN(dropdown), index); } @@ -959,7 +959,7 @@ ui_setop_enable(FALSE); } -UiListSelection ui_combobox_getselection(UiList *list) { +UiListSelection ui_dropdown_getselection(UiList *list) { UiListView *view = list->obj; guint selection = gtk_drop_down_get_selected(GTK_DROP_DOWN(view->widget)); UiListSelection sel = { 0, NULL }; @@ -971,7 +971,7 @@ return sel; } -void ui_combobox_setselection(UiList *list, UiListSelection selection) { +void ui_dropdown_setselection(UiList *list, UiListSelection selection) { ui_setop_enable(TRUE); UiListView *view = list->obj; if(selection.count > 0) { @@ -1316,7 +1316,7 @@ //g_object_unref(path); } -void ui_combobox_select(UIWIDGET dropdown, int index) { +void ui_dropdown_select(UIWIDGET dropdown, int index) { gtk_combo_box_set_active(GTK_COMBO_BOX(dropdown), index); } @@ -1560,7 +1560,7 @@ /* --------------------------- ComboBox --------------------------- */ -UIWIDGET ui_combobox_create(UiObject *obj, UiListArgs *args) { +UIWIDGET ui_dropdown_create(UiObject *obj, UiListArgs *args) { GtkWidget *combobox = gtk_combo_box_new(); if(args->width > 0) { gtk_widget_set_size_request(combobox, args->width, -1); @@ -1588,8 +1588,8 @@ if(var) { listview->var = var; list->update = ui_combobox_modelupdate; - list->getselection = ui_combobox_getselection; - list->setselection = ui_combobox_setselection; + list->getselection = ui_dropdown_getselection; + list->setselection = ui_dropdown_setselection; list->obj = listview; list->update(list, -1); } else if(args->static_nelm > 0) { @@ -1666,7 +1666,7 @@ g_object_unref(store); } -UiListSelection ui_combobox_getselection(UiList *list) { +UiListSelection ui_dropdown_getselection(UiList *list) { UiListView *combobox = list->obj; UiListSelection ret; ret.rows = malloc(sizeof(int*)); @@ -1675,7 +1675,7 @@ return ret; } -void ui_combobox_setselection(UiList *list, UiListSelection selection) { +void ui_dropdown_setselection(UiList *list, UiListSelection selection) { ui_setop_enable(TRUE); UiListView *combobox = list->obj; if(selection.count > 0) {
--- a/ui/gtk/list.h Sun Dec 07 15:40:40 2025 +0100 +++ b/ui/gtk/list.h Sun Dec 07 15:45:30 2025 +0100 @@ -190,8 +190,8 @@ GtkWidget* ui_create_combobox(UiObject *obj, UiModel *model, UiVar *var, char **elm, size_t nelm, ui_callback f, void *udata); void ui_combobox_change_event(GtkComboBox *widget, UiEventData *e); void ui_combobox_modelupdate(UiList *list, int i); -UiListSelection ui_combobox_getselection(UiList *list); -void ui_combobox_setselection(UiList *list, UiListSelection selection); +UiListSelection ui_dropdown_getselection(UiList *list); +void ui_dropdown_setselection(UiList *list, UiListSelection selection); void ui_listbox_dynamic_update(UiList *list, int i); void ui_listbox_dynamic_setselection(UiList *list, UiListSelection sel);
--- a/ui/motif/list.c Sun Dec 07 15:40:40 2025 +0100 +++ b/ui/motif/list.c Sun Dec 07 15:45:30 2025 +0100 @@ -281,7 +281,7 @@ } } -UIWIDGET ui_combobox_create(UiObject* obj, UiListArgs *args) { +UIWIDGET ui_dropdown_create(UiObject* obj, UiListArgs *args) { Arg xargs[16]; int n = 0;
--- a/ui/qt/list.cpp Sun Dec 07 15:40:40 2025 +0100 +++ b/ui/qt/list.cpp Sun Dec 07 15:45:30 2025 +0100 @@ -143,7 +143,7 @@ return view; } -UIWIDGET ui_combobox_create(UiObject *obj, UiListArgs *args) { +UIWIDGET ui_dropdown_create(UiObject *obj, UiListArgs *args) { UiContainerPrivate *ctn = ui_obj_container(obj); QComboBox *view = new QComboBox();
--- a/ui/ui/tree.h Sun Dec 07 15:40:40 2025 +0100 +++ b/ui/ui/tree.h Sun Dec 07 15:45:30 2025 +0100 @@ -322,17 +322,17 @@ #define ui_listview(obj, ...) ui_listview_create(obj, &(UiListArgs) { __VA_ARGS__ } ) #define ui_table(obj, ...) ui_table_create(obj, &(UiListArgs) { __VA_ARGS__ } ) -#define ui_combobox(obj, ...) ui_combobox_create(obj, &(UiListArgs) { __VA_ARGS__ } ) +#define ui_dropdown(obj, ...) ui_dropdown_create(obj, &(UiListArgs) { __VA_ARGS__ } ) #define ui_breadcrumbbar(obj, ...) ui_breadcrumbbar_create(obj, &(UiListArgs) { __VA_ARGS__ } ) #define ui_sourcelist(obj, ...) ui_sourcelist_create(obj, &(UiSourceListArgs) { __VA_ARGS__ } ) UIEXPORT UIWIDGET ui_listview_create(UiObject *obj, UiListArgs *args); UIEXPORT UIWIDGET ui_table_create(UiObject *obj, UiListArgs *args); -UIEXPORT UIWIDGET ui_combobox_create(UiObject *obj, UiListArgs *args); +UIEXPORT UIWIDGET ui_dropdown_create(UiObject *obj, UiListArgs *args); UIEXPORT UIWIDGET ui_breadcrumbbar_create(UiObject *obj, UiListArgs *args); UIEXPORT void ui_listview_select(UIWIDGET listview, int index); -UIEXPORT void ui_combobox_select(UIWIDGET dropdown, int index); +UIEXPORT void ui_dropdown_select(UIWIDGET dropdown, int index); UIEXPORT UIWIDGET ui_sourcelist_create(UiObject *obj, UiSourceListArgs *args);
--- a/ui/win32/list.c Sun Dec 07 15:40:40 2025 +0100 +++ b/ui/win32/list.c Sun Dec 07 15:45:30 2025 +0100 @@ -357,7 +357,7 @@ .destroy = w32_widget_default_destroy }; -UIWIDGET ui_combobox_create(UiObject *obj, UiListArgs *args) { +UIWIDGET ui_dropdown_create(UiObject *obj, UiListArgs *args) { HINSTANCE hInstance = GetModuleHandle(NULL); UiContainerPrivate *container = ui_obj_container(obj); HWND parent = ui_container_get_parent(container);