| 36 |
36 |
| 37 #ifdef __cplusplus |
37 #ifdef __cplusplus |
| 38 extern "C" { |
38 extern "C" { |
| 39 #endif |
39 #endif |
| 40 |
40 |
| |
41 typedef struct UiListView UiListView; |
| 41 typedef struct UiColData UiColData; |
42 typedef struct UiColData UiColData; |
| 42 |
43 |
| 43 #if GTK_CHECK_VERSION(4, 10, 0) |
44 #if GTK_CHECK_VERSION(4, 10, 0) |
| 44 typedef struct UiRowItems { |
45 typedef struct UiRowItems { |
| 45 int bound; |
46 int bound; |
| 46 GtkListItem *items[]; |
47 GtkListItem *items[]; |
| 47 } UiRowItems; |
48 } UiRowItems; |
| 48 #endif |
49 #endif |
| 49 |
50 |
| 50 typedef struct UiListView { |
51 struct UiColData { |
| |
52 UiListView *listview; |
| |
53 int column; |
| |
54 }; |
| |
55 |
| |
56 struct UiListView { |
| 51 UiObject *obj; |
57 UiObject *obj; |
| 52 GtkWidget *widget; |
58 GtkWidget *widget; |
| 53 UiVar *var; |
59 UiVar *var; |
| 54 UiModel *model; |
60 UiModel *model; |
| |
61 UiBool multiselection; |
| 55 ui_getvaluefunc2 getvalue; |
62 ui_getvaluefunc2 getvalue; |
| 56 void *getvaluedata; |
63 void *getvaluedata; |
| 57 ui_getstylefunc getstyle; |
64 ui_getstylefunc getstyle; |
| 58 void *getstyledata; |
65 void *getstyledata; |
| 59 char **elements; |
66 char **elements; |
| 63 UiBool apply_row_style; |
70 UiBool apply_row_style; |
| 64 #if GTK_CHECK_VERSION(4, 10, 0) |
71 #if GTK_CHECK_VERSION(4, 10, 0) |
| 65 CxMap *bound_rows; |
72 CxMap *bound_rows; |
| 66 GListStore *liststore; |
73 GListStore *liststore; |
| 67 GtkSelectionModel *selectionmodel; |
74 GtkSelectionModel *selectionmodel; |
| 68 UiColData *columns; |
75 int *columns; |
| 69 int numcolumns; |
76 int numcolumns; |
| |
77 UiColData coldata; |
| 70 PangoAttrList *current_row_attributes; |
78 PangoAttrList *current_row_attributes; |
| 71 #else |
79 #else |
| 72 int style_offset; |
80 int style_offset; |
| 73 #endif |
81 #endif |
| 74 ui_callback onactivate; |
82 ui_callback onactivate; |
| 134 #if GTK_CHECK_VERSION(4, 10, 0) |
136 #if GTK_CHECK_VERSION(4, 10, 0) |
| 135 |
137 |
| 136 void ui_update_liststore(GListStore *liststore, UiList *list); |
138 void ui_update_liststore(GListStore *liststore, UiList *list); |
| 137 void ui_update_liststore_static(GListStore *liststore, char **elm, size_t nelm); |
139 void ui_update_liststore_static(GListStore *liststore, char **elm, size_t nelm); |
| 138 |
140 |
| |
141 void ui_listview_update_model(UiModel *model, void *userdata, int insert_index, int delete_index); |
| 139 void ui_listview_update2(UiList *list, int i); |
142 void ui_listview_update2(UiList *list, int i); |
| 140 UiListSelection ui_listview_getselection2(UiList *list); |
143 UiListSelection ui_listview_getselection2(UiList *list); |
| 141 void ui_listview_setselection2(UiList *list, UiListSelection selection); |
144 void ui_listview_setselection2(UiList *list, UiListSelection selection); |
| 142 |
145 |
| 143 void ui_dropdown_notify(GtkWidget *dropdown, GObject *pspec, gpointer userdata); |
146 void ui_dropdown_notify(GtkWidget *dropdown, GObject *pspec, gpointer userdata); |
| 153 UIWIDGET ui_listview_var(UiObject *obj, UiVar *var, ui_getvaluefunc getvalue, ui_callback f, void *udata); |
156 UIWIDGET ui_listview_var(UiObject *obj, UiVar *var, ui_getvaluefunc getvalue, ui_callback f, void *udata); |
| 154 UIWIDGET ui_table_var(UiObject *obj, UiVar *var, UiModel *model, UiListCallbacks cb); |
157 UIWIDGET ui_table_var(UiObject *obj, UiVar *var, UiModel *model, UiListCallbacks cb); |
| 155 |
158 |
| 156 GtkWidget* ui_get_tree_widget(UIWIDGET widget); |
159 GtkWidget* ui_get_tree_widget(UIWIDGET widget); |
| 157 |
160 |
| |
161 void ui_listview_update_model(UiModel *model, void *userdata, int insert_index, int delete_index); |
| 158 void ui_listview_update(UiList *list, int i); |
162 void ui_listview_update(UiList *list, int i); |
| 159 UiListSelection ui_listview_getselection(UiList *list); |
163 UiListSelection ui_listview_getselection(UiList *list); |
| 160 void ui_listview_setselection(UiList *list, UiListSelection selection); |
164 void ui_listview_setselection(UiList *list, UiListSelection selection); |
| 161 |
165 |
| 162 void ui_combobox_destroy(GtkWidget *w, UiListView *v); |
166 void ui_combobox_destroy(GtkWidget *w, UiListView *v); |