xref: /haiku/src/preferences/locale/LocaleWindow.h (revision e81a954787e50e56a7f06f72705b7859b6ab06d1)
1 /*
2  * Copyright 2005-2010, Axel Dörfler, axeld@pinc-software.de.
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef LOCALE_WINDOW_H
6 #define LOCALE_WINDOW_H
7 
8 
9 #include <Message.h>
10 #include <Window.h>
11 
12 
13 static const uint32 kMsgRevert = 'revt';
14 
15 
16 class BButton;
17 class BCheckBox;
18 class BListView;
19 class FormatSettingsView;
20 class LanguageListItem;
21 class LanguageListView;
22 
23 
24 class LocaleWindow : public BWindow {
25 public:
26 								LocaleWindow();
27 	virtual						~LocaleWindow();
28 
29 	virtual	void				MessageReceived(BMessage* message);
30 	virtual	bool				QuitRequested();
31 	virtual void				Show();
32 
33 private:
34 			void				_SettingsChanged();
35 			void				_SettingsReverted();
36 
37 			bool				_IsReversible() const;
38 
39 			void				_Refresh(bool setInitial = false);
40 			void				_Revert();
41 
42 			void				_SetPreferredLanguages(
43 									const BMessage& languages);
44 			void				_PreferredLanguagesChanged();
45 			void				_EnableDisableLanguages();
46 			void				_InsertPreferredLanguage(LanguageListItem* item,
47 									int32 atIndex = -1);
48 			void				_Defaults();
49 
50 			BButton*			fRevertButton;
51 			LanguageListView*	fLanguageListView;
52 			LanguageListView*	fPreferredListView;
53 			LanguageListView*	fConventionsListView;
54 			FormatSettingsView*	fFormatView;
55 			LanguageListItem*	fInitialConventionsItem;
56 			LanguageListItem*	fDefaultConventionsItem;
57 			BMessage			fInitialPreferredLanguages;
58 			BCheckBox*			fFilesystemTranslationCheckbox;
59 };
60 
61 
62 #endif	// LOCALE_WINDOW_H
63 
64