ui/ui/tree.h

branch
newapi
changeset 224
88bc21b19213
parent 223
8d7ca1b320e2
child 225
097f45f9c1fa
equal deleted inserted replaced
223:8d7ca1b320e2 224:88bc21b19213
36 #endif 36 #endif
37 37
38 typedef struct UiModel UiModel; 38 typedef struct UiModel UiModel;
39 typedef struct UiListCallbacks UiListCallbacks; 39 typedef struct UiListCallbacks UiListCallbacks;
40 typedef struct UiListSelection UiListSelection; 40 typedef struct UiListSelection UiListSelection;
41 typedef struct UiListDnd UiListDnd;
41 42
42 typedef struct UiListArgs UiListArgs; 43 typedef struct UiListArgs UiListArgs;
43 typedef struct UiPathBarArgs UiPathBarArgs; 44 typedef struct UiPathBarArgs UiPathBarArgs;
44 45
45 typedef enum UiModelType { 46 typedef enum UiModelType {
72 * first argument is the pointer returned by UiList->get or UiTree->get 73 * first argument is the pointer returned by UiList->get or UiTree->get
73 * second argument is the column index 74 * second argument is the column index
74 * TODO: return 75 * TODO: return
75 */ 76 */
76 void*(*getvalue)(void*, int); 77 void*(*getvalue)(void*, int);
77
78 UiBool(*candrop)(UiEvent*, UiSelection*, UiList*, int);
79 void(*drop)(UiEvent*, UiSelection*, UiList*, int);
80 UiBool(*candrag)(UiEvent*, UiList*, int);
81 void(*data_get)(UiEvent*, UiSelection*, UiList*, int);
82 void(*data_delete)(UiEvent*, UiList*, int);
83 }; 78 };
84 79
85 struct UiListCallbacks { 80 struct UiListCallbacks {
86 /* 81 /*
87 * selection callback 82 * selection callback
109 * indices of selected rows 104 * indices of selected rows
110 */ 105 */
111 int *rows; 106 int *rows;
112 }; 107 };
113 108
114 struct UiTableDndEvent { 109 struct UiListDnd {
115 UiListSelection selection; 110 UiListSelection selection;
116 void* dnd; 111 UiDnD *dnd;
117 }; 112 };
118 113
119 struct UiListArgs { 114 struct UiListArgs {
120 UiTri fill; 115 UiTri fill;
121 UiBool hexpand; 116 UiBool hexpand;
136 ui_callback ondragcomplete; 131 ui_callback ondragcomplete;
137 void* ondragcompletedata; 132 void* ondragcompletedata;
138 ui_callback ondrop; 133 ui_callback ondrop;
139 void* ondropsdata; 134 void* ondropsdata;
140 UiBool multiselection; 135 UiBool multiselection;
141 UiBool enabledrag;
142 UiBool enabledrop;
143 }; 136 };
144 137
145 struct UiPathBarArgs { 138 struct UiPathBarArgs {
146 UiTri fill; 139 UiTri fill;
147 UiBool hexpand; 140 UiBool hexpand;

mercurial