vfs: check userland buffers before reading them.
[haiku.git] / src / apps / webpositive / SettingsWindow.h
blob4511c5a33e50f0090372b67f1ebfc68174831da1
1 /*
2 * Copyright (C) 2010 Stephan Aßmus <superstippi@gmx.de>
4 * All rights reserved. Distributed under the terms of the MIT License.
5 */
6 #ifndef SETTINGS_WINDOW_H
7 #define SETTINGS_WINDOW_H
9 #include <Window.h>
11 class BButton;
12 class BCheckBox;
13 class BMenu;
14 class BMenuField;
15 class BMenuItem;
16 class BSpinner;
17 class BTextControl;
18 class FontSelectionView;
19 class SettingsMessage;
22 class SettingsWindow : public BWindow {
23 public:
24 SettingsWindow(BRect frame,
25 SettingsMessage* settings);
26 virtual ~SettingsWindow();
28 virtual void MessageReceived(BMessage* message);
29 virtual bool QuitRequested();
31 virtual void Show();
33 private:
34 BView* _CreateGeneralPage(float spacing);
35 BView* _CreateFontsPage(float spacing);
36 BView* _CreateProxyPage(float spacing);
37 void _BuildSizesMenu(BMenu* menu,
38 uint32 messageWhat);
39 void _SetupFontSelectionView(
40 FontSelectionView* view,
41 BMessage* message);
43 bool _CanApplySettings() const;
44 void _ApplySettings();
45 void _RevertSettings();
46 void _ValidateControlsEnabledStatus();
48 uint32 _NewWindowPolicy() const;
49 uint32 _NewTabPolicy() const;
51 void _SetSizesMenuValue(BMenu* menu, int32 value);
52 int32 _SizesMenuValue(BMenu* menu) const;
54 BFont _FindDefaultSerifFont() const;
56 uint32 _ProxyPort() const;
58 private:
59 SettingsMessage* fSettings;
61 BTextControl* fStartPageControl;
62 BTextControl* fSearchPageControl;
63 BTextControl* fDownloadFolderControl;
65 BMenuField* fNewWindowBehaviorMenu;
66 BMenuItem* fNewWindowBehaviorOpenHomeItem;
67 BMenuItem* fNewWindowBehaviorOpenSearchItem;
68 BMenuItem* fNewWindowBehaviorOpenBlankItem;
70 BMenuField* fNewTabBehaviorMenu;
71 BMenuItem* fNewTabBehaviorCloneCurrentItem;
72 BMenuItem* fNewTabBehaviorOpenHomeItem;
73 BMenuItem* fNewTabBehaviorOpenSearchItem;
74 BMenuItem* fNewTabBehaviorOpenBlankItem;
76 BSpinner* fDaysInHistory;
77 BCheckBox* fShowTabsIfOnlyOnePage;
78 BCheckBox* fAutoHideInterfaceInFullscreenMode;
79 BCheckBox* fAutoHidePointer;
80 BCheckBox* fShowHomeButton;
82 FontSelectionView* fStandardFontView;
83 FontSelectionView* fSerifFontView;
84 FontSelectionView* fSansSerifFontView;
85 FontSelectionView* fFixedFontView;
87 BCheckBox* fUseProxyCheckBox;
88 BTextControl* fProxyAddressControl;
89 BTextControl* fProxyPortControl;
90 BCheckBox* fUseProxyAuthCheckBox;
91 BTextControl* fProxyUsernameControl;
92 BTextControl* fProxyPasswordControl;
94 BButton* fApplyButton;
95 BButton* fCancelButton;
96 BButton* fRevertButton;
98 BMenuField* fStandardSizesMenu;
99 BMenuField* fFixedSizesMenu;
103 #endif // SETTINGS_WINDOW_H