xref: /haiku/src/preferences/mail/ConfigViews.h (revision 1c09002cbee8e797a0f8bbfc5678dfadd39ee1a7)
1 /*
2  * Copyright 2007-2011, 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  * Distributed under the terms of the MIT License.
6  */
7 #ifndef CONFIG_VIEWS_H
8 #define CONFIG_VIEWS_H
9 
10 
11 #include <Box.h>
12 #include <image.h>
13 
14 #include "MailSettings.h"
15 #include <ProtocolConfigView.h>
16 #include "FilterConfigView.h"
17 
18 
19 class BTextControl;
20 class BListView;
21 class BMenuField;
22 class BButton;
23 struct entry_ref;
24 
25 
26 class ProtocolsConfigView;
27 
28 
29 BView* CreateConfigView(entry_ref addon, MailAddonSettings& settings,
30 	BMailAccountSettings& accountSettings, image_id* image);
31 
32 
33 class AccountConfigView : public BBox {
34 public:
35 								AccountConfigView(BRect rect,
36 									BMailAccountSettings *account);
37 
38 	virtual void				DetachedFromWindow();
39 	virtual void				AttachedToWindow();
40 	virtual void				MessageReceived(BMessage *msg);
41 
42 			void				UpdateViews();
43 
44 private:
45 			BTextControl*		fNameControl;
46 			BTextControl*		fRealNameControl;
47 			BTextControl*		fReturnAddressControl;
48 			BMailAccountSettings	*fAccount;
49 };
50 
51 
52 class InProtocolsConfigView : public BBox {
53 public:
54 								InProtocolsConfigView(
55 									BMailAccountSettings* account);
56 
57 			void 				DetachedFromWindow();
58 private:
59 			BMailAccountSettings*	fAccount;
60 			BView*				fConfigView;
61 			image_id			fImageID;
62 };
63 
64 
65 class OutProtocolsConfigView : public BBox {
66 public:
67 								OutProtocolsConfigView(
68 									BMailAccountSettings* account);
69 			void 				DetachedFromWindow();
70 private:
71 			BMailAccountSettings*	fAccount;
72 			BView*				fConfigView;
73 			image_id			fImageID;
74 };
75 
76 
77 #endif	/* CONFIG_VIEWS_H */
78