1 /* 2 Open Tracker License 3 4 Terms and Conditions 5 6 Copyright (c) 1991-2000, Be Incorporated. All rights reserved. 7 8 Permission is hereby granted, free of charge, to any person obtaining a copy of 9 this software and associated documentation files (the "Software"), to deal in 10 the Software without restriction, including without limitation the rights to 11 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 12 of the Software, and to permit persons to whom the Software is furnished to do 13 so, subject to the following conditions: 14 15 The above copyright notice and this permission notice applies to all licensees 16 and shall be included in all copies or substantial portions of the Software. 17 18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, 20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 22 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION 23 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 25 Except as contained in this notice, the name of Be Incorporated shall not be 26 used in advertising or otherwise to promote the sale, use or other dealings in 27 this Software without prior written authorization from Be Incorporated. 28 29 Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks 30 of Be Incorporated in the United States and other countries. Other brand product 31 names are registered trademarks or trademarks of their respective holders. 32 All rights reserved. 33 */ 34 #ifndef _SETTINGS_VIEWS 35 #define _SETTINGS_VIEWS 36 37 38 #include <CheckBox.h> 39 #include <GroupView.h> 40 #include <RadioButton.h> 41 #include <TextControl.h> 42 #include <ColorControl.h> 43 44 #include "TrackerSettings.h" 45 46 47 const uint32 kSettingsContentsModified = 'Scmo'; 48 49 class BButton; 50 class BMenuField; 51 class BStringView; 52 53 54 namespace BPrivate { 55 56 class SettingsView : public BGroupView { 57 public: 58 SettingsView(const char* name); 59 virtual ~SettingsView(); 60 61 virtual void SetDefaults(); 62 virtual bool IsDefaultable() const; 63 virtual void Revert(); 64 virtual void ShowCurrentSettings(); 65 virtual void RecordRevertSettings(); 66 virtual bool IsRevertable() const; 67 68 protected: 69 typedef BGroupView _inherited; 70 }; 71 72 class DesktopSettingsView : public SettingsView { 73 public: 74 DesktopSettingsView(); 75 76 virtual void MessageReceived(BMessage* message); 77 virtual void AttachedToWindow(); 78 79 virtual void SetDefaults(); 80 virtual bool IsDefaultable() const; 81 virtual void Revert(); 82 virtual void ShowCurrentSettings(); 83 virtual void RecordRevertSettings(); 84 virtual bool IsRevertable() const; 85 86 private: 87 void _SendNotices(); 88 89 BRadioButton* fShowDisksIconRadioButton; 90 BRadioButton* fMountVolumesOntoDesktopRadioButton; 91 BCheckBox* fMountSharedVolumesOntoDesktopCheckBox; 92 BCheckBox* fIntegrateNonBootBeOSDesktopsCheckBox; 93 BButton* fMountButton; 94 95 bool fShowDisksIcon; 96 bool fMountVolumesOntoDesktop; 97 bool fMountSharedVolumesOntoDesktop; 98 bool fIntegrateNonBootBeOSDesktops; 99 bool fEjectWhenUnmounting; 100 101 typedef SettingsView _inherited; 102 }; 103 104 class WindowsSettingsView : public SettingsView { 105 public: 106 WindowsSettingsView(); 107 108 virtual void MessageReceived(BMessage* message); 109 virtual void AttachedToWindow(); 110 111 virtual void SetDefaults(); 112 virtual bool IsDefaultable() const; 113 virtual void Revert(); 114 virtual void ShowCurrentSettings(); 115 virtual void RecordRevertSettings(); 116 virtual bool IsRevertable() const; 117 118 private: 119 BCheckBox* fShowFullPathInTitleBarCheckBox; 120 BCheckBox* fSingleWindowBrowseCheckBox; 121 BCheckBox* fShowNavigatorCheckBox; 122 BCheckBox* fShowSelectionWhenInactiveCheckBox; 123 BCheckBox* fOutlineSelectionCheckBox; 124 BCheckBox* fSortFolderNamesFirstCheckBox; 125 BCheckBox* fTypeAheadFilteringCheckBox; 126 127 bool fShowFullPathInTitleBar; 128 bool fSingleWindowBrowse; 129 bool fShowNavigator; 130 bool fTransparentSelection; 131 bool fSortFolderNamesFirst; 132 bool fTypeAheadFiltering; 133 134 typedef SettingsView _inherited; 135 }; 136 137 class SpaceBarSettingsView : public SettingsView { 138 public: 139 SpaceBarSettingsView(); 140 virtual ~SpaceBarSettingsView(); 141 142 virtual void MessageReceived(BMessage* message); 143 virtual void AttachedToWindow(); 144 145 virtual void SetDefaults(); 146 virtual bool IsDefaultable() const; 147 virtual void Revert(); 148 virtual void ShowCurrentSettings(); 149 virtual void RecordRevertSettings(); 150 virtual bool IsRevertable() const; 151 152 private: 153 BCheckBox* fSpaceBarShowCheckBox; 154 BColorControl* fColorControl; 155 BMenuField* fColorPicker; 156 int32 fCurrentColor; 157 158 bool fSpaceBarShow; 159 rgb_color fUsedSpaceColor; 160 rgb_color fFreeSpaceColor; 161 rgb_color fWarningSpaceColor; 162 163 typedef SettingsView _inherited; 164 }; 165 166 167 class TrashSettingsView : public SettingsView { 168 public: 169 TrashSettingsView(); 170 171 virtual void MessageReceived(BMessage* message); 172 virtual void AttachedToWindow(); 173 174 virtual void SetDefaults(); 175 virtual bool IsDefaultable() const; 176 virtual void Revert(); 177 virtual void ShowCurrentSettings(); 178 virtual void RecordRevertSettings(); 179 virtual bool IsRevertable() const; 180 181 private: 182 void _SendNotices(); 183 184 BCheckBox* fMoveFilesToTrashCheckBox; 185 BCheckBox* fAskBeforeDeleteFileCheckBox; 186 187 bool fMoveFilesToTrash; 188 bool fAskBeforeDeleteFile; 189 190 typedef SettingsView _inherited; 191 }; 192 193 } // namespace BPrivate 194 195 using namespace BPrivate; 196 197 #endif // _SETTINGS_VIEWS 198