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 15class BCheckBox; 16class BCountry; 17class BMenuField; 18class BMessage; 19class BRadioButton; 20class BStringView; 21class BTextControl; 22 23 24static const uint32 kClockFormatChange = 'cfmc'; 25static const uint32 kStringsLanguageChange = 'strc'; 26static const uint32 kMsgFilesystemTranslationChanged = 'fsys'; 27 28 29class FormatSettingsView : public BView { 30public: 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 41private: 42 void _UpdateExamples(); 43 44private: 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