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 }; 45 46 class Settings2Item : public BMenuItem 47 { 48 public: 49 Settings2Item(dormant_node_info *info, media_input *input, BMessage *message, 50 char shortcut = 0, uint32 modifiers = 0); 51 ~Settings2Item(); 52 dormant_node_info *fInfo; 53 media_input *fInput; 54 }; 55 56 class SettingsView : public BView 57 { 58 public: 59 SettingsView(BRect frame, bool isVideo); 60 void AddNodes(BList &list, bool isInput); 61 void SetDefault(dormant_node_info &info, bool isInput, int32 outputID = -1); 62 BCheckBox *fRealtimeCheckBox; 63 BCheckBox *fVolumeCheckBox; 64 BMenu *fMenu1; 65 BMenu *fMenu2; 66 BMenu *fMenu3; 67 BStringView *fRestartView; 68 69 private: 70 bool fIsVideo; 71 }; 72 73 #endif 74