xref: /haiku/src/preferences/locale/FormatSettingsView.h (revision a7dde370f552f5376edbf25046ec9cf2ba8bbd1a)
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 
27 
28 class FormatSettingsView : public BView {
29 public:
30 								FormatSettingsView();
31 								~FormatSettingsView();
32 
33 	virtual	void				MessageReceived(BMessage* message);
34 	virtual	void				AttachedToWindow();
35 
36 	virtual	void				Revert();
37 	virtual	void				Refresh(bool setInitial = false);
38 	virtual	bool				IsReversible() const;
39 
40 private:
41 			void				_UpdateExamples();
42 
43 private:
44 			BCheckBox*			fUseLanguageStringsCheckBox;
45 
46 			BRadioButton*		f24HourRadioButton;
47 			BRadioButton*		f12HourRadioButton;
48 
49 			BStringView*		fFullDateExampleView;
50 			BStringView*		fLongDateExampleView;
51 			BStringView*		fMediumDateExampleView;
52 			BStringView*		fShortDateExampleView;
53 
54 			BStringView*		fFullTimeExampleView;
55 			BStringView*		fLongTimeExampleView;
56 			BStringView*		fMediumTimeExampleView;
57 			BStringView*		fShortTimeExampleView;
58 
59 			BStringView*		fPositiveNumberExampleView;
60 			BStringView*		fNegativeNumberExampleView;
61 			BStringView*		fPositiveMonetaryExampleView;
62 			BStringView*		fNegativeMonetaryExampleView;
63 
64 			bool				fLocaleIs24Hour;
65 
66 			BFormattingConventions	fInitialConventions;
67 
68 			BBox*				fDateBox;
69 			BBox*				fTimeBox;
70 			BBox*				fNumberBox;
71 			BBox*				fMonetaryBox;
72 };
73 
74 
75 #endif	// _FORMAT_SETTINGS_H
76