1 /* 2 * Copyright (c) 2003-4 Kian Duffy <myob@users.sourceforge.net> 3 * Parts Copyright (C) 1998,99 Kazuho Okui and Takashi Murai. 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining 6 * a copy of this software and associated documentation files or portions 7 * thereof (the "Software"), to deal in the Software without restriction, 8 * including without limitation the rights to use, copy, modify, merge, 9 * publish, distribute, sublicense, and/or sell copies of the Software, 10 * and to permit persons to whom the Software is furnished to do so, subject 11 * to the following conditions: 12 * 13 * * Redistributions of source code must retain the above copyright notice, 14 * this list of conditions and the following disclaimer. 15 * 16 * * Redistributions in binary form must reproduce the above copyright notice 17 * in the binary, as well as this list of conditions and the following 18 * disclaimer in the documentation and/or other materials provided with 19 * the distribution. 20 * 21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 22 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 24 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 27 * THE SOFTWARE. 28 * 29 */ 30 #ifndef TERMWIN_H 31 #define TERMWIN_H 32 33 #include <Menu.h> 34 #include <Window.h> 35 #include <MessageRunner.h> 36 37 #include "PrefHandler.h" 38 39 class BFont; 40 class TermView; 41 class TermParse; 42 class CodeConv; 43 class PrefDlg; 44 class PrefDlg2; 45 class FindDlg; 46 47 48 class TermWindow : public BWindow { 49 public: 50 TermWindow(BRect frame, const char* title); 51 ~TermWindow(); 52 53 void Quit (void); 54 bool QuitRequested (void); 55 void TermWinActivate (void); 56 status_t GetSupportedSuites (BMessage *msg); 57 BHandler* ResolveSpecifier (BMessage *msg, int32 index, 58 BMessage *specifier, int32 form, 59 const char *property); 60 61 private: 62 void InitWindow (void); 63 void SetupMenu (void); 64 // void colRequested (void); 65 void MessageReceived (BMessage *message); 66 void WindowActivated (bool); 67 int GetTimeZone (void); 68 void MenusBeginning(void); 69 // void doShowHelp (uint32 command); 70 // Printing 71 status_t DoPageSetup (void); 72 void DoPrint (void); 73 74 /* 75 * data member 76 */ 77 TermParse *fTermParse; 78 BMenuBar *fMenubar; 79 BMenu *fFilemenu, *fEditmenu, *fEncodingmenu, *fHelpmenu, *fFontMenu, *fWindowSizeMenu, *fNewFontMenu; 80 TermView *fTermView; 81 BView *fBaseView; 82 CodeConv *fCodeConv; 83 BMessage *fPrintSettings; 84 PrefDlg *fPrefWindow; 85 FindDlg *fFindPanel; 86 BMessageRunner *fWindowUpdate; 87 BMenuItem *item; 88 }; 89 90 #endif // TERMWIN_H 91