]> git.sesse.net Git - vlc/blob - modules/gui/macosx/SideBarItem.h
macosx: fix typo preventing post-processing (refs #11613)
[vlc] / modules / gui / macosx / SideBarItem.h
1 //
2 //  SourceListItem.h
3 //  PXSourceList
4 //
5 //  Created by Alex Rozanski on 08/01/2010.
6 //  Copyright 2010 Alex Rozanski http://perspx.com
7 //
8 //  Adapted to VLC media player by Felix Paul Kühne
9 //
10
11 #import <Cocoa/Cocoa.h>
12
13 /*An example of a class that could be used to represent a Source List Item
14
15  Provides a title, an identifier, and an icon to be shown, as well as a badge value and a property to determine
16  whether the current item has a badge or not (`badgeValue` is set to -1 if no badge is shown)
17
18  Used to form a hierarchical model of SourceListItem instances – similar to the Source List tree structure
19  and easily accessible by the data source with the "children" property
20
21  SourceListItem *parent
22   - SourceListItem *child1;
23   - SourceListItem *child2;
24      - SourceListItem *childOfChild2;
25
26  - SourceListItem *anotherChildOfChild2;
27   - SourceListItem *child3;
28
29  */
30
31 @interface SideBarItem : NSObject {
32
33 NSString *title;
34
35 NSString *identifier;
36     NSString *untranslatedTitle;
37
38 NSImage *icon;
39
40 NSInteger badgeValue;
41     NSInteger sdtype;
42
43
44 NSArray *children;
45 }
46
47 @property (nonatomic, copy) NSString *title;
48 @property (nonatomic, copy) NSString *identifier;
49 @property (nonatomic, copy) NSString *untranslatedTitle;
50 @property (nonatomic, retain) NSImage *icon;
51 @property NSInteger badgeValue;
52 @property NSInteger sdtype;
53
54 @property (nonatomic, copy) NSArray *children;
55
56 //Convenience methods
57 + (id)itemWithTitle:(NSString*)aTitle identifier:(NSString*)anIdentifier;
58 + (id)itemWithTitle:(NSString*)aTitle identifier:(NSString*)anIdentifier icon:(NSImage*)anIcon;
59
60
61 - (BOOL)hasBadge;
62 - (BOOL)hasChildren;
63 - (BOOL)hasIcon;
64
65 @end