xref: /haiku/src/preferences/mail/ConfigViews.h (revision a2d9c45398ebcab924c89b2d4961bbebc2aeb3d6)
1 /*
2  * Copyright 2007-2012, Haiku, Inc. All rights reserved.
3  * Copyright 2001-2002 Dr. Zoidberg Enterprises. All rights reserved.
4  * Copyright 2011, Clemens Zeidler <haiku@clemens-zeidler.de>
5  *
6  * Distributed under the terms of the MIT License.
7  */
8 #ifndef CONFIG_VIEWS_H
9 #define CONFIG_VIEWS_H
10 
11 
12 #include <Box.h>
13 #include <image.h>
14 
15 #include <MailSettingsView.h>
16 #include <MailSettings.h>
17 
18 #include <ProtocolConfigView.h>
19 
20 #include "FilterConfigView.h"
21 
22 
23 class BTextControl;
24 class BListView;
25 class BMenuField;
26 class BButton;
27 struct entry_ref;
28 
29 
30 class AccountConfigView : public BBox {
31 public:
32 								AccountConfigView(
33 									BMailAccountSettings* account);
34 
35 	virtual void				DetachedFromWindow();
36 	virtual void				AttachedToWindow();
37 	virtual void				MessageReceived(BMessage* message);
38 
39 			void				UpdateViews();
40 
41 private:
42 			BTextControl*		fNameControl;
43 			BTextControl*		fRealNameControl;
44 			BTextControl*		fReturnAddressControl;
45 			BMailAccountSettings* fAccount;
46 };
47 
48 
49 class ProtocolSettingsView : public BBox {
50 public:
51 								ProtocolSettingsView(const entry_ref& ref,
52 									const BMailAccountSettings& accountSettings,
53 									BMailProtocolSettings& settings);
54 
55 			void 				DetachedFromWindow();
56 
57 private:
58 			status_t			_CreateSettingsView(const entry_ref& ref,
59 									const BMailAccountSettings& accountSettings,
60 									BMailProtocolSettings& settings);
61 
62 private:
63 			BMailProtocolSettings& fSettings;
64 			BMailSettingsView*	fSettingsView;
65 			image_id			fImage;
66 };
67 
68 
69 #endif	/* CONFIG_VIEWS_H */
70