5 // Created by Alex Rozanski on 08/01/2010.
6 // Copyright 2010 Alex Rozanski http://perspx.com
8 // Adapted to VLC media player by Felix Paul Kühne
11 #import <Cocoa/Cocoa.h>
13 /*An example of a class that could be used to represent a Source List Item
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)
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
21 SourceListItem *parent
22 - SourceListItem *child1;
23 - SourceListItem *child2;
24 - SourceListItem *childOfChild2;
26 - SourceListItem *anotherChildOfChild2;
27 - SourceListItem *child3;
31 @interface SideBarItem
: NSObject
33 @
property (nonatomic
, copy
) NSString
*title
;
34 @
property (nonatomic
, copy
) NSString
*identifier
;
35 @
property (nonatomic
, copy
) NSString
*untranslatedTitle
;
36 @
property (nonatomic
, retain
) NSImage
*icon
;
37 @property NSInteger badgeValue
;
38 @property NSInteger sdtype
;
40 @
property (nonatomic
, copy
) NSArray
*children
;
43 + (id
)itemWithTitle
:(NSString
*)aTitle identifier
:(NSString
*)anIdentifier
;
44 + (id
)itemWithTitle
:(NSString
*)aTitle identifier
:(NSString
*)anIdentifier icon
:(NSImage
*)anIcon
;