ui/gtk/list.h

changeset 1256
da0899b1699d
parent 1246
43a7874a9d0e
equal deleted inserted replaced
1255:4681df3739f7 1256:da0899b1699d
30 #define LIST_H 30 #define LIST_H
31 31
32 #include "../ui/list.h" 32 #include "../ui/list.h"
33 #include "../ui/tree.h" 33 #include "../ui/tree.h"
34 #include "toolkit.h" 34 #include "toolkit.h"
35 #include "menu.h"
35 36
36 #include <cx/array_list.h> 37 #include <cx/array_list.h>
37 38
38 #ifdef __cplusplus 39 #ifdef __cplusplus
39 extern "C" { 40 extern "C" {
150 GtkListBox *listbox; 151 GtkListBox *listbox;
151 UiVar *var; 152 UiVar *var;
152 CxList *rows; 153 CxList *rows;
153 ui_sourcelist_getvalue_func getvalue; 154 ui_sourcelist_getvalue_func getvalue;
154 void *getvaluedata; 155 void *getvaluedata;
156 UiMenuBuilder *contextmenu;
155 157
156 ui_callback onactivate; 158 ui_callback onactivate;
157 void *onactivatedata; 159 void *onactivatedata;
158 char *onactivate_action; 160 char *onactivate_action;
159 ui_callback onbuttonclick; 161 ui_callback onbuttonclick;
160 void *onbuttonclickdata; 162 void *onbuttonclickdata;
161 char *onbuttonclick_action; 163 char *onbuttonclick_action;
164 ui_callback oncontextmenupopup;
165 void *oncontextmenupopupdata;
166 char *oncontextmenupopup_action;
162 }; 167 };
163 168
164 typedef struct UiListBox2Row { 169 typedef struct UiListBox2Row {
165 UiListBox2 *listbox; 170 UiListBox2 *listbox;
166 GtkWidget *row; 171 GtkWidget *row;
168 CxList *children; // type: UiListBox2Row* 173 CxList *children; // type: UiListBox2Row*
169 int index; 174 int index;
170 int depth; 175 int depth;
171 UiBool expanded; 176 UiBool expanded;
172 UiBool heading; 177 UiBool heading;
178 UiContextMenuPopupCallback contextmenu_popup_handler;
173 } UiListBox2Row; 179 } UiListBox2Row;
174 180
175 void* ui_null_getvalue(UiList *list, void *elm, int row, int col, void *userdata, UiBool *freeResult); 181 void* ui_null_getvalue(UiList *list, void *elm, int row, int col, void *userdata, UiBool *freeResult);
176 182
177 #if GTK_CHECK_VERSION(4, 10, 0) 183 #if GTK_CHECK_VERSION(4, 10, 0)

mercurial