1 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 2 // 3 // Copyright (c) 2003, OpenBeOS 4 // 5 // This software is part of the OpenBeOS distribution and is covered 6 // by the OpenBeOS license. 7 // 8 // 9 // File: MediaListItem.h 10 // Author: Sikosis, Jérôme Duval 11 // Description: Media Preferences 12 // Created : June 25, 2003 13 // 14 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 15 #ifndef __MEDIALISTITEM_H__ 16 #define __MEDIALISTITEM_H__ 17 18 19 #include <ListItem.h> 20 #include <MediaAddOn.h> 21 22 23 class MediaListItem : public BListItem { 24 public: 25 MediaListItem(dormant_node_info *info, uint32 level, bool isVideo, BList *icons, uint32 modifiers=0); 26 MediaListItem(const char* label, uint32 level, bool isVideo, BList *icons, uint32 modifiers=0); 27 ~MediaListItem(); 28 29 virtual void Update(BView *owner, const BFont *finfo); 30 virtual void DrawItem(BView *owner, BRect frame, bool complete = false); 31 32 void SetDefault(bool isDefaultInput, bool isInput); 33 void SetAudioMixer(bool isAudioMixer); 34 bool IsDefault(bool isInput) { return isInput ? fIsDefaultInput : fIsDefaultOutput; } 35 bool IsAudioMixer() { return fIsAudioMixer; } 36 bool IsVideo() { return fIsVideo; } 37 const char *GetLabel() { return fLabel; } 38 39 dormant_node_info *fInfo; 40 41 static int Compare(const void *firstArg, const void *secondArg); 42 43 private: 44 const char *fLabel; 45 bool fIsAudioMixer; 46 bool fIsVideo; 47 bool fIsDefaultInput; 48 bool fIsDefaultOutput; 49 //dormant_node_info fNodeInfo; 50 BList *fIcons; 51 }; 52 53 #endif /* __MEDIALISTITEM_H__ */ 54