Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

bmapp.h

Go to the documentation of this file.
00001 #ifndef __BMAPP_H_INCLUDED__
00002 #define __BMAPP_H_INCLUDED__
00003 
00004 // $Id$
00005 
00006 //**********************************************************************
00007 //                                                                     *
00008 //    Description:   'Bell Master' TurboVision application class.      *
00009 //                                                                     *
00010 //    Author:        Chris White (whitecf@bcs.org.uk)                  *
00011 //                                                                     *
00012 //    Copyright (C) 2002  Monitor Computing Services Ltd.              *
00013 //                                                                     *
00014 //    This program is free software; you can redistribute it and/or    *
00015 //    modify it under the terms of the GNU General Public License      *
00016 //    as published by the Free Software Foundation; either version 2   *
00017 //    of the License, or any later version.                            *
00018 //                                                                     *
00019 //    This program is distributed in the hope that it will be useful,  *
00020 //    but WITHOUT ANY WARRANTY; without even the implied warranty of   *
00021 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
00022 //    GNU General Public License for more details.                     *
00023 //                                                                     *
00024 //    You should have received a copy of the GNU General Public        *
00025 //    License (http://www.gnu.org/copyleft/gpl.html) along with this   *
00026 //    program; if not, write to:                                       *
00027 //       The Free Software Foundation Inc.,                            *
00028 //       59 Temple Place - Suite 330,                                  *
00029 //       Boston, MA  02111-1307,                                       *
00030 //       USA.                                                          *
00031 //                                                                     *
00032 //**********************************************************************
00033 //                                                                     *
00034 //    Notes:                                                           *
00035 //                                                                     *
00036 //**********************************************************************
00037 
00038 
00039 // Forward declerations
00040 class TStatusLine;
00041 class TMenuBar;
00042 class TEvent;
00043 
00044 #define Uses_TApplication
00045 #define Uses_TRect
00046 
00047 #include <tvision\tv.h>
00048 
00049 
00050 namespace Monitor {
00051 namespace BellMaster {
00052 
00053 
00054 // Forward declerations within namespace
00055 class BellCode;
00056 class BellCodeList;
00057 class Signalman;
00058 class SignalmanList;
00059 class Tapper;
00060 class TapperWin;
00061 
00062 
00066 class App : public TApplication
00067 {
00068 public:
00069     App();
00070 
00071     virtual ~App();
00072 
00077     static TStatusLine*
00078     initStatusLine(TRect    r);
00079 
00083     static TMenuBar*
00084     initMenuBar(TRect    r);
00085 
00090     virtual void
00091     handleEvent(TEvent&    event);
00092 
00098     void
00099     idle();
00100 
00101 
00102 private:
00106     SignalmanList*    signalmen;
00107 
00111     BellCodeList*    bellCodes;
00112 
00116     Signalman*    listeningSignalman;
00117 
00121     void
00122     loadBellCodeFile();
00123     
00129     void
00130     loadBellCodesFromFile(const char*    fileName);
00131 
00139     BellCode*
00140     selectBellCode(BellCodeList&    availableCodes);
00141 
00147     void
00148     beatBellCode(Tapper&    tapper);
00149 
00155     void
00156     signalmanHearBell(TapperWin*    tapperWindow);
00157 
00163     void
00164     signalmanRingCode(Tapper&    tapper);
00165 
00169     void
00170     loadSignalmanFile();
00171 
00177     void
00178     loadSignalmanFromFile(const char*    fileName);
00179 
00183     void
00184     unloadSignalman();
00185 
00194     Signalman*
00195     selectSignalman(SignalmanList&    availableSignalmen);
00196 
00202     void
00203     closeModal(TView*    oldView);
00204 
00210     void
00211     showModal(TView*    newView);
00212 };  // class App
00213 
00214 };  // namespace BellMaster
00215 };  // namespace Monitor
00216 
00217 #endif // __BMAPP_H_INCLUDED__

Generated on Wed Oct 29 20:55:43 2003 for Bellmaster BC Turbo Vision by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002