| 53 void ui_tableview_setselection(UiList *list, UiListSelection selection); |
53 void ui_tableview_setselection(UiList *list, UiListSelection selection); |
| 54 |
54 |
| 55 void ui_dropdown_update(UiList *list, int i); |
55 void ui_dropdown_update(UiList *list, int i); |
| 56 UiListSelection ui_dropdown_getselection(UiList *list); |
56 UiListSelection ui_dropdown_getselection(UiList *list); |
| 57 void ui_dropdown_setselection(UiList *list, UiListSelection selection); |
57 void ui_dropdown_setselection(UiList *list, UiListSelection selection); |
| |
58 |
| |
59 @class UiSourceList; |
| |
60 |
| |
61 @interface UiSourceListItem : NSObject |
| |
62 @property (weak) UiSourceList *sourcelist; |
| |
63 @property (strong) NSString *label; |
| |
64 @property (strong) NSString *badge; |
| |
65 |
| |
66 @property (strong) NSMutableArray<UiSourceListItem*> *items; |
| |
67 @property UiVar *var; |
| |
68 @property UiSubList *sublist; |
| |
69 |
| |
70 /* |
| |
71 * Initialize a section item |
| |
72 */ |
| |
73 - (id)init:(UiSubListItem*)item; |
| |
74 /* |
| |
75 * Initialize a child item |
| |
76 */ |
| |
77 - (id)init:(UiSourceList*)sourcelist sublist:(UiSubList*)sublist; |
| |
78 - (BOOL)isSection; |
| |
79 - (void)update:(int)row; |
| |
80 |
| |
81 @end |
| |
82 |
| |
83 |
| |
84 @interface UiSourceList : NSObject <NSOutlineViewDataSource, NSOutlineViewDelegate> |
| |
85 |
| |
86 @property UiObject *obj; |
| |
87 @property CxList *sublists; |
| |
88 @property UiVar *dynamic_sublists; |
| |
89 @property ui_sublist_getvalue_func getvalue; |
| |
90 @property void *getvaluedata; |
| |
91 @property ui_callback onactivate; |
| |
92 @property void *onactivatedata; |
| |
93 @property ui_callback onbuttonclick; |
| |
94 @property void *onbuttonclickdata; |
| |
95 |
| |
96 @property (strong) NSMutableArray<UiSourceListItem*> *sections; |
| |
97 |
| |
98 - (id)init:(UiObject*)obj; |
| |
99 |
| |
100 - (void)update:(int)row; |
| |
101 |
| |
102 @end |
| |
103 |
| |
104 void ui_sourcelist_update(UiList *list, int row); |