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: MediaViews.h 10 // Author: Sikosis, Jérôme Duval 11 // Description: Media Preferences 12 // Created : June 25, 2003 13 // 14 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 15 16 17 #ifndef __MEDIAVIEWS_H__ 18 #define __MEDIAVIEWS_H__ 19 #include <CheckBox.h> 20 #include <MenuItem.h> 21 #include <StringView.h> 22 #include <View.h> 23 24 const uint32 ML_RESTART_MEDIA_SERVER = 'resr'; 25 const uint32 ML_SHOW_VOLUME_CONTROL = 'shvc'; 26 const uint32 ML_ENABLE_REAL_TIME = 'enrt'; 27 const uint32 ML_DEFAULT_CHANGE = 'dech'; 28 const uint32 ML_DEFAULTOUTPUT_CHANGE = 'doch'; 29 30 class BarView : public BView 31 { 32 public: 33 BarView(BRect frame); 34 virtual void Draw(BRect updateRect); 35 bool fDisplay; 36 }; 37 38 class SettingsItem : public BMenuItem 39 { 40 public: 41 SettingsItem(dormant_node_info *info, BMessage *message, 42 char shortcut = 0, uint32 modifiers = 0); 43 dormant_node_info *fInfo; 44 virtual status_t Invoke(BMessage *message = NULL); 45 }; 46 47 class Settings2Item : public BMenuItem 48 { 49 public: 50 Settings2Item(dormant_node_info *info, media_input *input, BMessage *message, 51 char shortcut = 0, uint32 modifiers = 0); 52 virtual ~Settings2Item(); 53 virtual status_t Invoke(BMessage *message = NULL); 54 dormant_node_info *fInfo; 55 media_input *fInput; 56 }; 57 58 class SettingsView : public BView 59 { 60 public: 61 SettingsView(BRect frame, bool isVideo); 62 void AddNodes(BList &list, bool isInput); 63 void SetDefault(dormant_node_info &info, bool isInput, int32 outputID = -1); 64 BCheckBox *fRealtimeCheckBox; 65 BCheckBox *fVolumeCheckBox; 66 BMenu *fMenu1; 67 BMenu *fMenu2; 68 BMenu *fMenu3; 69 BStringView *fRestartView; 70 71 private: 72 bool fIsVideo; 73 }; 74 75 #endif 76