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 530995b563SAxel Dörfler #define SIG_NONE MDR_DIALECT_CHOICE ("None", "無し") 540995b563SAxel Dörfler #define SIG_RANDOM MDR_DIALECT_CHOICE ("Random", "自動選択") 550995b563SAxel Dörfler 56f6e4cbb9SAxel Dörfler struct EncodingItem { 570995b563SAxel Dörfler char* name; 580995b563SAxel Dörfler uint32 flavor; 590995b563SAxel Dörfler }; 600995b563SAxel Dörfler 610995b563SAxel Dörfler extern const EncodingItem kEncodings[]; 620995b563SAxel Dörfler 630995b563SAxel Dörfler 640995b563SAxel Dörfler class TPrefsWindow : public BWindow { 650995b563SAxel Dörfler public: 66f7335ab6SStephan Aßmus TPrefsWindow(BRect rect, BFont* font, 67f7335ab6SStephan Aßmus int32* level, bool* warp, 68f7335ab6SStephan Aßmus bool* attachAttributes, bool* cquotes, 69f7335ab6SStephan Aßmus uint32* account, int32* replyTo, 70f7335ab6SStephan Aßmus char** preamble, char** sig, 71f7335ab6SStephan Aßmus uint32* encoding, bool* warnUnencodable, 72dc8a8389SClemens Zeidler bool* spellCheckStartOn, 73*f5b22bcfSClemens Zeidler bool* autoMarkRead, uint8* buttonBar); 74f7335ab6SStephan Aßmus virtual ~TPrefsWindow(); 750995b563SAxel Dörfler 760995b563SAxel Dörfler virtual void MessageReceived(BMessage* message); 770995b563SAxel Dörfler 780995b563SAxel Dörfler private: 79f7335ab6SStephan Aßmus BPopUpMenu* _BuildFontMenu(BFont*); 80f7335ab6SStephan Aßmus BPopUpMenu* _BuildLevelMenu(int32); 81f7335ab6SStephan Aßmus BPopUpMenu* _BuildAccountMenu(uint32); 82f7335ab6SStephan Aßmus BPopUpMenu* _BuildReplyToMenu(int32); 83f7335ab6SStephan Aßmus BMenu* _BuildReplyPreambleMenu(); 84f7335ab6SStephan Aßmus BPopUpMenu* _BuildSignatureMenu(char*); 85f7335ab6SStephan Aßmus BPopUpMenu* _BuildSizeMenu(BFont*); 86f7335ab6SStephan Aßmus BPopUpMenu* _BuildWrapMenu(bool); 87f7335ab6SStephan Aßmus BPopUpMenu* _BuildAttachAttributesMenu(bool); 88f7335ab6SStephan Aßmus BPopUpMenu* _BuildColoredQuotesMenu(bool quote); 89f7335ab6SStephan Aßmus BPopUpMenu* _BuildEncodingMenu(uint32 encoding); 90f7335ab6SStephan Aßmus BPopUpMenu* _BuildWarnUnencodableMenu( 91f7335ab6SStephan Aßmus bool warnUnencodable); 92f7335ab6SStephan Aßmus BPopUpMenu* _BuildSpellCheckStartOnMenu( 93f7335ab6SStephan Aßmus bool spellCheckStartOn); 94*f5b22bcfSClemens Zeidler BPopUpMenu* _BuildAutoMarkReadMenu( 95*f5b22bcfSClemens Zeidler bool autoMarkRead); 96f7335ab6SStephan Aßmus BPopUpMenu* _BuildButtonBarMenu(uint8 show); 970995b563SAxel Dörfler 98f7335ab6SStephan Aßmus BPopUpMenu* _BuildBoolMenu(uint32 msg, 99f7335ab6SStephan Aßmus const char* boolItem, bool isTrue); 1000995b563SAxel Dörfler 1010995b563SAxel Dörfler bool* fNewWrap; 102f7335ab6SStephan Aßmus bool fWrap; 1030995b563SAxel Dörfler bool* fNewAttachAttributes; 104f7335ab6SStephan Aßmus bool fAttachAttributes; 1050995b563SAxel Dörfler uint8* fNewButtonBar; 106f7335ab6SStephan Aßmus uint8 fButtonBar; 107f7335ab6SStephan Aßmus bool* fNewColoredQuotes; 108f7335ab6SStephan Aßmus bool fColoredQuotes; 1090995b563SAxel Dörfler uint32* fNewAccount; 110f7335ab6SStephan Aßmus uint32 fAccount; 1110995b563SAxel Dörfler int32* fNewReplyTo; 112f7335ab6SStephan Aßmus int32 fReplyTo; 113f7335ab6SStephan Aßmus 1140995b563SAxel Dörfler char** fNewPreamble; 115f7335ab6SStephan Aßmus 1160995b563SAxel Dörfler char** fNewSignature; 117f7335ab6SStephan Aßmus char* fSignature; 1180995b563SAxel Dörfler BFont* fNewFont; 119f7335ab6SStephan Aßmus BFont fFont; 1200995b563SAxel Dörfler uint32* fNewEncoding; 121f7335ab6SStephan Aßmus uint32 fEncoding; 1220995b563SAxel Dörfler bool* fNewWarnUnencodable; 123f7335ab6SStephan Aßmus bool fWarnUnencodable; 1240995b563SAxel Dörfler bool* fNewSpellCheckStartOn; 125f7335ab6SStephan Aßmus bool fSpellCheckStartOn; 126*f5b22bcfSClemens Zeidler bool* fNewAutoMarkRead; 127*f5b22bcfSClemens Zeidler bool fAutoMarkRead; 128f7335ab6SStephan Aßmus 1290995b563SAxel Dörfler BButton* fRevert; 1300995b563SAxel Dörfler 1310995b563SAxel Dörfler BPopUpMenu* fFontMenu; 1320995b563SAxel Dörfler BPopUpMenu* fSizeMenu; 133f7335ab6SStephan Aßmus BPopUpMenu* fWrapMenu; 134f7335ab6SStephan Aßmus BPopUpMenu* fColoredQuotesMenu; 1350995b563SAxel Dörfler BPopUpMenu* fAttachAttributesMenu; 136f7335ab6SStephan Aßmus BPopUpMenu* fAccountMenu; 137f7335ab6SStephan Aßmus BPopUpMenu* fReplyToMenu; 1380995b563SAxel Dörfler BMenu* fReplyPreambleMenu; 1390995b563SAxel Dörfler BTextControl* fReplyPreamble; 1400995b563SAxel Dörfler BPopUpMenu* fSignatureMenu; 1410995b563SAxel Dörfler BPopUpMenu* fEncodingMenu; 1420995b563SAxel Dörfler BPopUpMenu* fWarnUnencodableMenu; 1430995b563SAxel Dörfler BPopUpMenu* fSpellCheckStartOnMenu; 1440995b563SAxel Dörfler BPopUpMenu* fButtonBarMenu; 145*f5b22bcfSClemens Zeidler BPopUpMenu* fAutoMarkReadMenu; 1460995b563SAxel Dörfler }; 1470995b563SAxel Dörfler 1480995b563SAxel Dörfler #endif /* _PREFS_H */ 149