00001 #ifndef __BMSGWIN_H_INCLUDED__ 00002 #define __BMSGWIN_H_INCLUDED__ 00003 //********************************************************************** 00004 // * 00005 // Filename: bmsgwin.h * 00006 // Date: 30 Mar 2002 * 00007 // File Version: 1 * 00008 // * 00009 // Description: Window to display list of signalmen from which * 00010 // the user makes a single selection. * 00011 // * 00012 // Author: Chris White (whitecf@bcs.org.uk) * 00013 // Company: Monitor Computing Services Ltd. * 00014 // * 00015 //********************************************************************** 00016 // * 00017 // Copyright (C) 2002 Monitor Computing Services Ltd. * 00018 // * 00019 // This program is free software; you can redistribute it and/or * 00020 // modify it under the terms of the GNU General Public License * 00021 // as published by the Free Software Foundation; either version 2 * 00022 // of the License, or any later version. * 00023 // * 00024 // This program is distributed in the hope that it will be useful, * 00025 // but WITHOUT ANY WARRANTY; without even the implied warranty of * 00026 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00027 // GNU General Public License for more details. * 00028 // * 00029 // You should have received a copy of the GNU General Public * 00030 // License (http://www.gnu.org/copyleft/gpl.html) along with this * 00031 // program; if not, write to: * 00032 // The Free Software Foundation Inc., * 00033 // 59 Temple Place - Suite 330, * 00034 // Boston, MA 02111-1307, * 00035 // USA. * 00036 // * 00037 //********************************************************************** 00038 // * 00039 // Notes: * 00040 // * 00041 //********************************************************************** 00042 00043 00044 // Forward declerations 00045 class TEvent; 00046 class TRect; 00047 class TPalette; 00048 class TRect; 00049 class TScrollBar; 00050 00051 #define Uses_TListViewer 00052 #define Uses_TDialog 00053 00054 #include <tvision\tv.h> 00055 00056 00057 namespace Monitor { 00058 namespace BellMaster { 00059 00060 00061 // Forward declerations within namespace 00062 class Signalman; 00063 class SignalmanList; 00064 00065 00066 00067 class SignalmanWindow : public TDialog 00068 { 00069 public: 00070 00075 SignalmanWindow (const SignalmanList& newSignalmen, 00076 TRect& r); 00077 00082 virtual void 00083 handleEvent(TEvent& event); 00084 00088 Signalman* 00089 getSelectedSignalman(); 00090 00091 private: 00092 class ListView : public TListViewer 00093 { 00094 public: 00095 00101 ListView(const SignalmanList& newSignalmen, 00102 const TRect& bounds, 00103 TScrollBar *aVScrollBar); 00104 00113 virtual void 00114 getText(char *dest, short item, short maxLen); 00115 00116 const SignalmanList& signalmen; 00117 }; 00118 00122 ListView *listView; 00123 }; // class SignalmanWindow 00124 00125 }; // namespace BellMaster 00126 }; // namespace Monitor 00127 00128 00129 #endif // __BMSGWIN_H_INCLUDED__