ui/gtk/list.h

changeset 103
6606616eca9f
parent 102
64ded9f6a6c6
child 108
77254bd6dccb
equal deleted inserted replaced
102:64ded9f6a6c6 103:6606616eca9f
43 typedef struct UiListView { 43 typedef struct UiListView {
44 UiObject *obj; 44 UiObject *obj;
45 GtkWidget *widget; 45 GtkWidget *widget;
46 UiVar *var; 46 UiVar *var;
47 UiModel *model; 47 UiModel *model;
48 char **elements;
49 size_t nelm;
48 #if GTK_CHECK_VERSION(4, 10, 0) 50 #if GTK_CHECK_VERSION(4, 10, 0)
49 GListStore *liststore; 51 GListStore *liststore;
50 GtkSelectionModel *selectionmodel; 52 GtkSelectionModel *selectionmodel;
51 UiColData *columns; 53 UiColData *columns;
52 #endif 54 #endif
98 ui_sublist_getvalue_func getvalue; 100 ui_sublist_getvalue_func getvalue;
99 ui_callback onactivate; 101 ui_callback onactivate;
100 void *onactivatedata; 102 void *onactivatedata;
101 ui_callback onbuttonclick; 103 ui_callback onbuttonclick;
102 void *onbuttonclickdata; 104 void *onbuttonclickdata;
103
104 GtkListBoxRow *first_row; 105 GtkListBoxRow *first_row;
105 }; 106 };
106 107
107 108
108 #if GTK_CHECK_VERSION(4, 10, 0) 109 #if GTK_CHECK_VERSION(4, 10, 0)
109 110
110 void ui_update_liststore(GListStore *liststore, UiList *list); 111 void ui_update_liststore(GListStore *liststore, UiList *list);
112 void ui_update_liststore_static(GListStore *liststore, char **elm, size_t nelm);
111 113
112 void ui_listview_update2(UiList *list, int i); 114 void ui_listview_update2(UiList *list, int i);
113 UiListSelection ui_listview_getselection2(UiList *list); 115 UiListSelection ui_listview_getselection2(UiList *list);
114 void ui_listview_setselection2(UiList *list, UiListSelection selection); 116 void ui_listview_setselection2(UiList *list, UiListSelection selection);
115 117
118 void ui_dropdown_notify(GtkWidget *dropdown, GObject *pspec, gpointer userdata);
116 void ui_columnview_activate(void *ignore, guint position, gpointer userdata); 119 void ui_columnview_activate(void *ignore, guint position, gpointer userdata);
117 void ui_listview_selection_changed(GtkSelectionModel* self, guint position, guint n_items, gpointer user_data); 120 void ui_listview_selection_changed(GtkSelectionModel* self, guint position, guint n_items, gpointer user_data);
118 121
119 void ui_dropdown_activate(GtkDropDown* self, gpointer userdata); 122 void ui_dropdown_activate(GtkDropDown* self, gpointer userdata);
120 123
153 156
154 void ui_listview_add_dnd(UiListView *listview, UiListArgs *args); 157 void ui_listview_add_dnd(UiListView *listview, UiListArgs *args);
155 void ui_listview_enable_drop(UiListView *listview, UiListArgs *args); 158 void ui_listview_enable_drop(UiListView *listview, UiListArgs *args);
156 159
157 UIWIDGET ui_combobox_var(UiObject *obj, UiVar *var, ui_getvaluefunc getvalue, ui_callback f, void *udata); 160 UIWIDGET ui_combobox_var(UiObject *obj, UiVar *var, ui_getvaluefunc getvalue, ui_callback f, void *udata);
158 GtkWidget* ui_create_combobox(UiObject *obj, UiModel *model, UiVar *var, ui_callback f, void *udata); 161 GtkWidget* ui_create_combobox(UiObject *obj, UiModel *model, UiVar *var, char **elm, size_t nelm, ui_callback f, void *udata);
159 void ui_combobox_change_event(GtkComboBox *widget, UiEventData *e); 162 void ui_combobox_change_event(GtkComboBox *widget, UiEventData *e);
160 void ui_combobox_modelupdate(UiList *list, int i); 163 void ui_combobox_modelupdate(UiList *list, int i);
161 UiListSelection ui_combobox_getselection(UiList *list); 164 UiListSelection ui_combobox_getselection(UiList *list);
162 void ui_combobox_setselection(UiList *list, UiListSelection selection); 165 void ui_combobox_setselection(UiList *list, UiListSelection selection);
163 166

mercurial