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 51f6e4cbb9SAxel Dörfler struct EncodingItem { 520995b563SAxel Dörfler char* name; 530995b563SAxel Dörfler uint32 flavor; 540995b563SAxel Dörfler }; 550995b563SAxel Dörfler 560995b563SAxel Dörfler extern const EncodingItem kEncodings[]; 570995b563SAxel Dörfler 580995b563SAxel Dörfler 590995b563SAxel Dörfler class TPrefsWindow : public BWindow { 600995b563SAxel Dörfler public: 6167c3eeebSAxel Dörfler TPrefsWindow(BPoint leftTop, BFont* font, 62f7335ab6SStephan Aßmus int32* level, bool* warp, 63f7335ab6SStephan Aßmus bool* attachAttributes, bool* cquotes, 64*d26fee1aSClemens Zeidler int32* account, int32* replyTo, 65f7335ab6SStephan Aßmus char** preamble, char** sig, 66f7335ab6SStephan Aßmus uint32* encoding, bool* warnUnencodable, 67dc8a8389SClemens Zeidler bool* spellCheckStartOn, 68f5b22bcfSClemens Zeidler bool* autoMarkRead, uint8* buttonBar); 69f7335ab6SStephan Aßmus virtual ~TPrefsWindow(); 700995b563SAxel Dörfler 710995b563SAxel Dörfler virtual void MessageReceived(BMessage* message); 720995b563SAxel Dörfler 730995b563SAxel Dörfler private: 74f7335ab6SStephan Aßmus BPopUpMenu* _BuildFontMenu(BFont*); 75f7335ab6SStephan Aßmus BPopUpMenu* _BuildLevelMenu(int32); 76*d26fee1aSClemens Zeidler BPopUpMenu* _BuildAccountMenu(int32); 77f7335ab6SStephan Aßmus BPopUpMenu* _BuildReplyToMenu(int32); 78f7335ab6SStephan Aßmus BMenu* _BuildReplyPreambleMenu(); 79f7335ab6SStephan Aßmus BPopUpMenu* _BuildSignatureMenu(char*); 80f7335ab6SStephan Aßmus BPopUpMenu* _BuildSizeMenu(BFont*); 81f7335ab6SStephan Aßmus BPopUpMenu* _BuildWrapMenu(bool); 82f7335ab6SStephan Aßmus BPopUpMenu* _BuildAttachAttributesMenu(bool); 83f7335ab6SStephan Aßmus BPopUpMenu* _BuildColoredQuotesMenu(bool quote); 84f7335ab6SStephan Aßmus BPopUpMenu* _BuildEncodingMenu(uint32 encoding); 85f7335ab6SStephan Aßmus BPopUpMenu* _BuildWarnUnencodableMenu( 86f7335ab6SStephan Aßmus bool warnUnencodable); 87f7335ab6SStephan Aßmus BPopUpMenu* _BuildSpellCheckStartOnMenu( 88f7335ab6SStephan Aßmus bool spellCheckStartOn); 89f5b22bcfSClemens Zeidler BPopUpMenu* _BuildAutoMarkReadMenu( 90f5b22bcfSClemens Zeidler bool autoMarkRead); 91f7335ab6SStephan Aßmus BPopUpMenu* _BuildButtonBarMenu(uint8 show); 920995b563SAxel Dörfler 93f7335ab6SStephan Aßmus BPopUpMenu* _BuildBoolMenu(uint32 msg, 94f7335ab6SStephan Aßmus const char* boolItem, bool isTrue); 950995b563SAxel Dörfler 960995b563SAxel Dörfler bool* fNewWrap; 97f7335ab6SStephan Aßmus bool fWrap; 980995b563SAxel Dörfler bool* fNewAttachAttributes; 99f7335ab6SStephan Aßmus bool fAttachAttributes; 1000995b563SAxel Dörfler uint8* fNewButtonBar; 101f7335ab6SStephan Aßmus uint8 fButtonBar; 102f7335ab6SStephan Aßmus bool* fNewColoredQuotes; 103f7335ab6SStephan Aßmus bool fColoredQuotes; 104*d26fee1aSClemens Zeidler int32* fNewAccount; 105*d26fee1aSClemens Zeidler int32 fAccount; 1060995b563SAxel Dörfler int32* fNewReplyTo; 107f7335ab6SStephan Aßmus int32 fReplyTo; 108f7335ab6SStephan Aßmus 1090995b563SAxel Dörfler char** fNewPreamble; 110f7335ab6SStephan Aßmus 1110995b563SAxel Dörfler char** fNewSignature; 112f7335ab6SStephan Aßmus char* fSignature; 1130995b563SAxel Dörfler BFont* fNewFont; 114f7335ab6SStephan Aßmus BFont fFont; 1150995b563SAxel Dörfler uint32* fNewEncoding; 116f7335ab6SStephan Aßmus uint32 fEncoding; 1170995b563SAxel Dörfler bool* fNewWarnUnencodable; 118f7335ab6SStephan Aßmus bool fWarnUnencodable; 1190995b563SAxel Dörfler bool* fNewSpellCheckStartOn; 120f7335ab6SStephan Aßmus bool fSpellCheckStartOn; 121f5b22bcfSClemens Zeidler bool* fNewAutoMarkRead; 122f5b22bcfSClemens Zeidler bool fAutoMarkRead; 123f7335ab6SStephan Aßmus 1240995b563SAxel Dörfler BButton* fRevert; 1250995b563SAxel Dörfler 1260995b563SAxel Dörfler BPopUpMenu* fFontMenu; 1270995b563SAxel Dörfler BPopUpMenu* fSizeMenu; 128f7335ab6SStephan Aßmus BPopUpMenu* fWrapMenu; 129f7335ab6SStephan Aßmus BPopUpMenu* fColoredQuotesMenu; 1300995b563SAxel Dörfler BPopUpMenu* fAttachAttributesMenu; 131f7335ab6SStephan Aßmus BPopUpMenu* fAccountMenu; 132f7335ab6SStephan Aßmus BPopUpMenu* fReplyToMenu; 1330995b563SAxel Dörfler BMenu* fReplyPreambleMenu; 1340995b563SAxel Dörfler BTextControl* fReplyPreamble; 1350995b563SAxel Dörfler BPopUpMenu* fSignatureMenu; 1360995b563SAxel Dörfler BPopUpMenu* fEncodingMenu; 1370995b563SAxel Dörfler BPopUpMenu* fWarnUnencodableMenu; 1380995b563SAxel Dörfler BPopUpMenu* fSpellCheckStartOnMenu; 1390995b563SAxel Dörfler BPopUpMenu* fButtonBarMenu; 140f5b22bcfSClemens Zeidler BPopUpMenu* fAutoMarkReadMenu; 1410995b563SAxel Dörfler }; 1420995b563SAxel Dörfler 1430995b563SAxel Dörfler #endif /* _PREFS_H */ 144c8767beeSJonas Sundström 145