Upstream tarball 9732
[amule.git] / cocoa-mule / SourceViewController.h
bloba4bfe897d0dd52b9994d3bf051d22f9c7b9c206d
1 #import <Cocoa/Cocoa.h>
3 @interface BaseItem : NSObject {
4 NSString *m_text;
6 NSString *m_view_id;
8 NSMutableArray *m_subitems;
9 int m_subitems_count;
11 NSImage *m_icon;
14 + (BaseItem *) initWithText:(NSString *)text withViewId:(NSString *) viewId;
16 - (void)activateView:(NSTabView *) view;
18 - (int)subitemsCount;
19 - (BaseItem *)itemAtIndex: (int) index;
21 - (void)addSubItem:(BaseItem *) item;
23 - (NSString *)text;
24 - (NSString *)viewId;
25 - (NSImage *)icon;
27 @end
29 @interface CategoryItemFactory : BaseItem
34 + (BaseItem *)initFilesItem;
35 + (BaseItem *)initNetworksItem;
36 + (BaseItem *)initSearchItem;
38 @end
40 enum {
41 RootItemNetwork = 0,
42 RootItemFiles,
43 RootItemSearch,
45 RootItemLast
49 @interface amuleSourceListDataSource : NSObject
51 BaseItem *g_root_items[RootItemLast];
54 + (amuleSourceListDataSource *)initWithData;
56 - (int)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item;
57 - (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item;
58 - (id)outlineView:(NSOutlineView *)outlineView child:(int)index ofItem:(id)item;
59 - (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item;
61 @end
63 @interface CellWithIcon : NSTextFieldCell {
64 @private
65 NSImage *m_icon;
68 - (NSImage *)icon;
69 - (void)setIcon:(NSImage *)icon;
73 @end
75 @interface SourceViewController : NSObject {
76 IBOutlet id m_outline_view;
77 IBOutlet id m_tab_view;
80 @end