1 /* 2 * Copyright 2009, Adrien Destugues, pulkomandy@gmail.com. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _FORMAT_SETTINGS_H 6 #define _FORMAT_SETTINGS_H 7 8 9 #include <Box.h> 10 #include <FormattingConventions.h> 11 #include <String.h> 12 #include <View.h> 13 14 15 class BCheckBox; 16 class BCountry; 17 class BMenuField; 18 class BMessage; 19 class BRadioButton; 20 class BStringView; 21 class BTextControl; 22 23 24 static const uint32 kClockFormatChange = 'cfmc'; 25 static const uint32 kStringsLanguageChange = 'strc'; 26 static const uint32 kMsgFilesystemTranslationChanged = 'fsys'; 27 28 29 class FormatSettingsView : public BView { 30 public: 31 FormatSettingsView(); 32 ~FormatSettingsView(); 33 34 virtual void MessageReceived(BMessage* message); 35 virtual void AttachedToWindow(); 36 37 virtual void Revert(); 38 virtual void Refresh(bool setInitial = false); 39 virtual bool IsReversible() const; 40 41 private: 42 void _UpdateExamples(); 43 44 private: 45 BCheckBox* fFilesystemTranslationCheckbox; 46 BCheckBox* fUseLanguageStringsCheckBox; 47 48 BRadioButton* f24HourRadioButton; 49 BRadioButton* f12HourRadioButton; 50 51 BStringView* fFullDateExampleView; 52 BStringView* fLongDateExampleView; 53 BStringView* fMediumDateExampleView; 54 BStringView* fShortDateExampleView; 55 56 BStringView* fFullTimeExampleView; 57 BStringView* fLongTimeExampleView; 58 BStringView* fMediumTimeExampleView; 59 BStringView* fShortTimeExampleView; 60 61 BStringView* fPositiveNumberExampleView; 62 BStringView* fNegativeNumberExampleView; 63 BStringView* fPositiveMonetaryExampleView; 64 BStringView* fNegativeMonetaryExampleView; 65 66 bool fLocaleIs24Hour; 67 68 BFormattingConventions fInitialConventions; 69 bool fInitialTranslateNames; 70 71 BBox* fDateBox; 72 BBox* fTimeBox; 73 BBox* fNumberBox; 74 BBox* fMonetaryBox; 75 }; 76 77 78 #endif // _FORMAT_SETTINGS_H 79