1 /* 2 Open Tracker License 3 4 Terms and Conditions 5 6 Copyright (c) 1991-2001, Be Incorporated. All rights reserved. 7 8 Permission is hereby granted, free of charge, to any person obtaining a copy of 9 this software and associated documentation files (the "Software"), to deal in 10 the Software without restriction, including without limitation the rights to 11 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 12 of the Software, and to permit persons to whom the Software is furnished to do 13 so, subject to the following conditions: 14 15 The above copyright notice and this permission notice applies to all licensees 16 and shall be included in all copies or substantial portions of the Software. 17 18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF TITLE, MERCHANTABILITY, 20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 BE INCORPORATED BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 22 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION 23 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 25 Except as contained in this notice, the name of Be Incorporated shall not be 26 used in advertising or otherwise to promote the sale, use or other dealings in 27 this Software without prior written authorization from Be Incorporated. 28 29 BeMail(TM), Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks 30 of Be Incorporated in the United States and other countries. Other brand product 31 names are registered trademarks or trademarks of their respective holders. 32 All rights reserved. 33 */ 34 35 //-------------------------------------------------------------------- 36 // 37 // Prefs.h 38 // 39 //-------------------------------------------------------------------- 40 41 #ifndef _PREFS_H 42 #define _PREFS_H 43 44 #include <Font.h> 45 #include <Window.h> 46 47 #define ACCOUNT_USE_DEFAULT 0 48 #define ACCOUNT_FROM_MAIL 1 49 50 #define PREF_WIDTH 340 51 #define PREF_HEIGHT 330 52 53 #define SIG_NONE MDR_DIALECT_CHOICE ("None", "無し") 54 #define SIG_RANDOM MDR_DIALECT_CHOICE ("Random", "自動選択") 55 56 struct EncodingItem 57 { 58 char *name; 59 uint32 flavor; 60 }; 61 62 extern const EncodingItem kEncodings[]; 63 64 65 class Button; 66 67 //==================================================================== 68 69 class TPrefsWindow : public BWindow { 70 public: 71 TPrefsWindow(BRect rect, BFont *font, int32 *level, bool *warp, 72 bool *attachAttributes, bool *cquotes, uint32 *account, 73 int32 *replyTo, char **preamble, char **sig, uint32 *encoding, 74 bool *warnUnencodable, bool *spellCheckStartOn, uint8 *buttonBar); 75 ~TPrefsWindow(); 76 77 virtual void MessageReceived(BMessage *message); 78 79 private: 80 BPopUpMenu *BuildFontMenu(BFont*); 81 BPopUpMenu *BuildLevelMenu(int32); 82 BPopUpMenu *BuildAccountMenu(uint32); 83 BPopUpMenu *BuildReplyToMenu(int32); 84 BMenu *BuildReplyPreambleMenu(); 85 BPopUpMenu *BuildSignatureMenu(char*); 86 BPopUpMenu *BuildSizeMenu(BFont*); 87 BPopUpMenu *BuildWrapMenu(bool); 88 BPopUpMenu *BuildAttachAttributesMenu(bool); 89 BPopUpMenu *BuildColoredQuotesMenu(bool quote); 90 BPopUpMenu *BuildEncodingMenu(uint32 encoding); 91 BPopUpMenu *BuildWarnUnencodableMenu(bool warnUnencodable); 92 BPopUpMenu *BuildSpellCheckStartOnMenu(bool spellCheckStartOn); 93 BPopUpMenu *BuildButtonBarMenu(uint8 show); 94 95 BPopUpMenu *BuildBoolMenu(uint32 msg, const char *boolItem, bool isTrue); 96 97 bool fWrap; 98 bool *fNewWrap; 99 bool fAttachAttributes; 100 bool *fNewAttachAttributes; 101 uint8 fButtonBar; 102 uint8 *fNewButtonBar; 103 bool fColoredQuotes, *fNewColoredQuotes; 104 uint32 fAccount; 105 uint32 *fNewAccount; 106 int32 fReplyTo; 107 int32 *fNewReplyTo; 108 char **fNewPreamble; 109 char *fSignature; 110 char **fNewSignature; 111 BFont fFont; 112 BFont *fNewFont; 113 uint32 fEncoding; 114 uint32 *fNewEncoding; 115 bool fWarnUnencodable; 116 bool *fNewWarnUnencodable; 117 bool fSpellCheckStartOn; 118 bool *fNewSpellCheckStartOn; 119 BButton *fRevert; 120 121 BPopUpMenu *fFontMenu; 122 BPopUpMenu *fSizeMenu; 123 BPopUpMenu *fWrapMenu, *fColoredQuotesMenu; 124 BPopUpMenu *fAttachAttributesMenu; 125 BPopUpMenu *fAccountMenu, *fReplyToMenu; 126 BMenu *fReplyPreambleMenu; 127 BTextControl *fReplyPreamble; 128 BPopUpMenu *fSignatureMenu; 129 BPopUpMenu *fEncodingMenu; 130 BPopUpMenu *fWarnUnencodableMenu; 131 BPopUpMenu *fSpellCheckStartOnMenu; 132 BPopUpMenu *fButtonBarMenu; 133 }; 134 135 #endif /* _PREFS_H */ 136