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

fltstpr.h

Go to the documentation of this file.
00001 #ifndef __FLTSTPR_H_INCLUDED__
00002 #define __FLTSTPR_H_INCLUDED__
00003 
00004 // $Id: fltstpr.h,v 1.2 2003/10/29 19:54:14 whitecf Exp $
00005 
00006 //**********************************************************************
00007 //                                                                     *
00008 //    Description:   TurboVision float stepper class.                  *
00009 //                                                                     *
00010 //    Author:        Chris White (whitecf@bcs.org.uk)                  *
00011 //                                                                     *
00012 //    Copyright (C) 2003  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 TEvent;
00041 class TRect;
00042 class WatcherList;
00043 
00044 #define Uses_TInputLine
00045 
00046 #include <watchble.h>
00047 
00048 #include <tvision\tv.h>
00049 
00050 
00051 namespace Monitor {
00052 namespace Utility {
00053 
00054 
00055 
00059 class FloatStepper : public Watchable, public TInputLine
00060 {
00061 public:
00065     FloatStepper(const TRect&    newBounds,
00066                  int             newMaxLen,
00067                  const char      *newFormat,
00068                  const float     newDisplayScaler = 1.0);
00069 
00073     virtual ~FloatStepper();
00074 
00075 
00079     void
00080     setState(ushort    aState, Boolean    enable);
00081 
00085     virtual void
00086     handleEvent(TEvent&    event);
00087 
00093     void
00094     setScaler(const float     newDisplayScaler);
00095 
00100     void
00101     displayValue();
00102 
00108     virtual void
00109     getData(void *rec);
00110 
00116     virtual void
00117     setData(void *rec);
00118 
00119 
00120 private:
00124     float         value;
00128     const char    *format;
00132     float         displayScaler;
00133 
00137     float
00138     getValue() {return value;}
00139 
00147     int
00148     setValue(float    newValue);
00149 
00157     void
00158     changeValue(float    newValue);
00159 
00165     void
00166     readValue();
00167 };
00168 
00169 };  // namespace Utility
00170 };  // namespace Monitor
00171 
00172 #endif // __FLTSTPR_H_INCLUDED__

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