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 |