xref: /haiku/src/apps/mail/Prefs.h (revision c8767bee6f595855d7c1e7f5e41f451ce21cfa8d)
10995b563SAxel Dörfler /*
20995b563SAxel Dörfler Open Tracker License
30995b563SAxel Dörfler 
40995b563SAxel Dörfler Terms and Conditions
50995b563SAxel Dörfler 
60995b563SAxel Dörfler Copyright (c) 1991-2001, Be Incorporated. All rights reserved.
70995b563SAxel Dörfler 
80995b563SAxel Dörfler Permission is hereby granted, free of charge, to any person obtaining a copy of
90995b563SAxel Dörfler this software and associated documentation files (the "Software"), to deal in
100995b563SAxel Dörfler the Software without restriction, including without limitation the rights to
110995b563SAxel Dörfler use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
120995b563SAxel Dörfler of the Software, and to permit persons to whom the Software is furnished to do
130995b563SAxel Dörfler so, subject to the following conditions:
140995b563SAxel Dörfler 
150995b563SAxel Dörfler The above copyright notice and this permission notice applies to all licensees
160995b563SAxel Dörfler and shall be included in all copies or substantial portions of the Software.
170995b563SAxel Dörfler 
180995b563SAxel Dörfler THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
190995b563SAxel Dörfler IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY,
200995b563SAxel Dörfler FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
210995b563SAxel Dörfler BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
220995b563SAxel Dörfler AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION
230995b563SAxel Dörfler WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
240995b563SAxel Dörfler 
250995b563SAxel Dörfler Except as contained in this notice, the name of Be Incorporated shall not be
260995b563SAxel Dörfler used in advertising or otherwise to promote the sale, use or other dealings in
270995b563SAxel Dörfler this Software without prior written authorization from Be Incorporated.
280995b563SAxel Dörfler 
290995b563SAxel Dörfler BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks
300995b563SAxel Dörfler of Be Incorporated in the United States and other countries. Other brand product
310995b563SAxel Dörfler names are registered trademarks or trademarks of their respective holders.
320995b563SAxel Dörfler All rights reserved.
330995b563SAxel Dörfler */
340995b563SAxel Dörfler #ifndef _PREFS_H
350995b563SAxel Dörfler #define _PREFS_H
360995b563SAxel Dörfler 
37f6e4cbb9SAxel Dörfler 
380995b563SAxel Dörfler #include <Font.h>
390995b563SAxel Dörfler #include <Window.h>
400995b563SAxel Dörfler 
41f6e4cbb9SAxel Dörfler class BButton;
42f6e4cbb9SAxel Dörfler class BMenu;
43f6e4cbb9SAxel Dörfler class BPopUpMenu;
44f6e4cbb9SAxel Dörfler class BTextControl;
45f6e4cbb9SAxel Dörfler 
46f6e4cbb9SAxel Dörfler 
470995b563SAxel Dörfler #define ACCOUNT_USE_DEFAULT	0
480995b563SAxel Dörfler #define ACCOUNT_FROM_MAIL	1
490995b563SAxel Dörfler 
500995b563SAxel Dörfler #define	PREF_WIDTH			340
510995b563SAxel Dörfler #define PREF_HEIGHT			330
520995b563SAxel Dörfler 
53f6e4cbb9SAxel Dörfler struct EncodingItem {
540995b563SAxel Dörfler 			char*				name;
550995b563SAxel Dörfler 			uint32				flavor;
560995b563SAxel Dörfler };
570995b563SAxel Dörfler 
580995b563SAxel Dörfler extern const EncodingItem kEncodings[];
590995b563SAxel Dörfler 
600995b563SAxel Dörfler 
610995b563SAxel Dörfler class TPrefsWindow : public BWindow {
620995b563SAxel Dörfler public:
63f7335ab6SStephan Aßmus 								TPrefsWindow(BRect rect, BFont* font,
64f7335ab6SStephan Aßmus 									int32* level, bool* warp,
65f7335ab6SStephan Aßmus 									bool* attachAttributes, bool* cquotes,
66f7335ab6SStephan Aßmus 									uint32* account, int32* replyTo,
67f7335ab6SStephan Aßmus 									char** preamble, char** sig,
68f7335ab6SStephan Aßmus 									uint32* encoding, bool* warnUnencodable,
69dc8a8389SClemens Zeidler 									bool* spellCheckStartOn,
70f5b22bcfSClemens Zeidler 									bool* autoMarkRead, uint8* buttonBar);
71f7335ab6SStephan Aßmus 	virtual						~TPrefsWindow();
720995b563SAxel Dörfler 
730995b563SAxel Dörfler 	virtual	void				MessageReceived(BMessage* message);
740995b563SAxel Dörfler 
750995b563SAxel Dörfler private:
76f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildFontMenu(BFont*);
77f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildLevelMenu(int32);
78f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildAccountMenu(uint32);
79f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildReplyToMenu(int32);
80f7335ab6SStephan Aßmus 			BMenu*				_BuildReplyPreambleMenu();
81f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildSignatureMenu(char*);
82f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildSizeMenu(BFont*);
83f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildWrapMenu(bool);
84f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildAttachAttributesMenu(bool);
85f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildColoredQuotesMenu(bool quote);
86f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildEncodingMenu(uint32 encoding);
87f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildWarnUnencodableMenu(
88f7335ab6SStephan Aßmus 									bool warnUnencodable);
89f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildSpellCheckStartOnMenu(
90f7335ab6SStephan Aßmus 									bool spellCheckStartOn);
91f5b22bcfSClemens Zeidler 			BPopUpMenu*			_BuildAutoMarkReadMenu(
92f5b22bcfSClemens Zeidler 									bool autoMarkRead);
93f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildButtonBarMenu(uint8 show);
940995b563SAxel Dörfler 
95f7335ab6SStephan Aßmus 			BPopUpMenu*			_BuildBoolMenu(uint32 msg,
96f7335ab6SStephan Aßmus 									const char* boolItem, bool isTrue);
970995b563SAxel Dörfler 
980995b563SAxel Dörfler 			bool*				fNewWrap;
99f7335ab6SStephan Aßmus 			bool				fWrap;
1000995b563SAxel Dörfler 			bool*				fNewAttachAttributes;
101f7335ab6SStephan Aßmus 			bool				fAttachAttributes;
1020995b563SAxel Dörfler 			uint8*				fNewButtonBar;
103f7335ab6SStephan Aßmus 			uint8				fButtonBar;
104f7335ab6SStephan Aßmus 			bool*				fNewColoredQuotes;
105f7335ab6SStephan Aßmus 			bool				fColoredQuotes;
1060995b563SAxel Dörfler 			uint32*				fNewAccount;
107f7335ab6SStephan Aßmus 			uint32				fAccount;
1080995b563SAxel Dörfler 			int32*				fNewReplyTo;
109f7335ab6SStephan Aßmus 			int32				fReplyTo;
110f7335ab6SStephan Aßmus 
1110995b563SAxel Dörfler 			char**				fNewPreamble;
112f7335ab6SStephan Aßmus 
1130995b563SAxel Dörfler 			char**				fNewSignature;
114f7335ab6SStephan Aßmus 			char*				fSignature;
1150995b563SAxel Dörfler 			BFont*				fNewFont;
116f7335ab6SStephan Aßmus 			BFont				fFont;
1170995b563SAxel Dörfler 			uint32*				fNewEncoding;
118f7335ab6SStephan Aßmus 			uint32				fEncoding;
1190995b563SAxel Dörfler 			bool*				fNewWarnUnencodable;
120f7335ab6SStephan Aßmus 			bool				fWarnUnencodable;
1210995b563SAxel Dörfler 			bool*				fNewSpellCheckStartOn;
122f7335ab6SStephan Aßmus 			bool				fSpellCheckStartOn;
123f5b22bcfSClemens Zeidler 			bool*				fNewAutoMarkRead;
124f5b22bcfSClemens Zeidler 			bool				fAutoMarkRead;
125f7335ab6SStephan Aßmus 
1260995b563SAxel Dörfler 			BButton*			fRevert;
1270995b563SAxel Dörfler 
1280995b563SAxel Dörfler 			BPopUpMenu*			fFontMenu;
1290995b563SAxel Dörfler 			BPopUpMenu*			fSizeMenu;
130f7335ab6SStephan Aßmus 			BPopUpMenu*			fWrapMenu;
131f7335ab6SStephan Aßmus 			BPopUpMenu*			fColoredQuotesMenu;
1320995b563SAxel Dörfler 			BPopUpMenu*			fAttachAttributesMenu;
133f7335ab6SStephan Aßmus 			BPopUpMenu*			fAccountMenu;
134f7335ab6SStephan Aßmus 			BPopUpMenu*			fReplyToMenu;
1350995b563SAxel Dörfler 			BMenu*				fReplyPreambleMenu;
1360995b563SAxel Dörfler 			BTextControl*		fReplyPreamble;
1370995b563SAxel Dörfler 			BPopUpMenu*			fSignatureMenu;
1380995b563SAxel Dörfler 			BPopUpMenu*			fEncodingMenu;
1390995b563SAxel Dörfler 			BPopUpMenu*			fWarnUnencodableMenu;
1400995b563SAxel Dörfler 			BPopUpMenu*			fSpellCheckStartOnMenu;
1410995b563SAxel Dörfler 			BPopUpMenu*			fButtonBarMenu;
142f5b22bcfSClemens Zeidler 			BPopUpMenu*			fAutoMarkReadMenu;
1430995b563SAxel Dörfler };
1440995b563SAxel Dörfler 
1450995b563SAxel Dörfler #endif	/* _PREFS_H */
146*c8767beeSJonas Sundström 
147