ui/cocoa/list.h

changeset 830
13896bdaa151
parent 829
0980245646b4
child 831
32a4415dc69a
equal deleted inserted replaced
829:0980245646b4 830:13896bdaa151
58 58
59 @class UiSourceList; 59 @class UiSourceList;
60 60
61 @interface UiSourceListItem : NSObject 61 @interface UiSourceListItem : NSObject
62 @property (weak) UiSourceList *sourcelist; 62 @property (weak) UiSourceList *sourcelist;
63 @property (weak) UiSourceListItem *parent;
63 @property (strong) NSString *label; 64 @property (strong) NSString *label;
64 @property (strong) NSString *badge; 65 @property (strong) NSString *badge;
65 66
66 @property (strong) NSMutableArray<UiSourceListItem*> *items; 67 @property (strong) NSMutableArray<UiSourceListItem*> *items;
67 @property UiVar *var; 68 @property UiVar *var;
68 @property UiSubList *sublist; 69 @property UiSubList *sublist;
69 70
71 @property int index;
72
70 /* 73 /*
71 * Initialize a section item 74 * Initialize a section item
72 */ 75 */
73 - (id)init:(UiSubListItem*)item; 76 - (id)init:(UiSubListItem*)item parent:(UiSourceListItem*)parent;
74 /* 77 /*
75 * Initialize a child item 78 * Initialize a child item
76 */ 79 */
77 - (id)init:(UiSourceList*)sourcelist sublist:(UiSubList*)sublist; 80 - (id)init:(UiSourceList*)sourcelist sublist:(UiSubList*)sublist;
78 - (BOOL)isSection; 81 - (BOOL)isSection;
82 85
83 86
84 @interface UiSourceList : NSObject <NSOutlineViewDataSource, NSOutlineViewDelegate> 87 @interface UiSourceList : NSObject <NSOutlineViewDataSource, NSOutlineViewDelegate>
85 88
86 @property UiObject *obj; 89 @property UiObject *obj;
90 @property (weak) NSOutlineView *outlineView;
87 @property CxList *sublists; 91 @property CxList *sublists;
88 @property UiVar *dynamic_sublists; 92 @property UiVar *dynamic_sublists;
89 @property ui_sublist_getvalue_func getvalue; 93 @property ui_sublist_getvalue_func getvalue;
90 @property void *getvaluedata; 94 @property void *getvaluedata;
91 @property ui_callback onactivate; 95 @property ui_callback onactivate;
93 @property ui_callback onbuttonclick; 97 @property ui_callback onbuttonclick;
94 @property void *onbuttonclickdata; 98 @property void *onbuttonclickdata;
95 99
96 @property (strong) NSMutableArray<UiSourceListItem*> *sections; 100 @property (strong) NSMutableArray<UiSourceListItem*> *sections;
97 101
98 - (id)init:(UiObject*)obj; 102 - (id)init:(UiObject*)obj outline:(NSOutlineView*)view;
99 103
100 - (void)update:(int)row; 104 - (void)update:(int)row;
101 105
102 @end 106 @end
103 107

mercurial