home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_GEN / FACETV.ZIP / FACE_TV.H < prev    next >
C/C++ Source or Header  |  1994-01-05  |  3KB  |  93 lines

  1. /************************************************************************
  2. **
  3. ** @(#)face_tv.h    01/05/94    Chris Ahlstrom
  4. **
  5. ** C++
  6. **
  7. **    Contains, at present, an interface to the menu fields.
  8. ** This module is for the test program for the FACE_TV library.
  9. **
  10. *************************************************************************/
  11.  
  12.  
  13. #if !defined(FACE_TV_h)                    // { FACE_TV_h
  14. #define FACE_TV_h
  15.  
  16. #include "filedlg.h"            // FilePicker declarations
  17. #include "heapview.h"            // for testing of the heap
  18. #include "dosshell.h"            // DOS-shell support
  19. #include "menubars.h"            // supports menu-bar application
  20. #include "tbox.h"            // support dialog-box application
  21. #include "screnmsg.h"            // supports menu-bar application
  22. #include "tv_confg.h"            // SimpleConfiguration class
  23. #include "x_delay.h"            // DelayParameters class
  24.  
  25. extern int showFloatInBox
  26. (
  27.     double value
  28. );
  29.  
  30.  
  31. /************************************************************************
  32. ** TFaceApp
  33. **
  34. **    Obtains the menu/status bar initialization routines, the
  35. ** doDialog(), and shell() from the base objects.
  36. ** Note that TBox and DosShell could be considered "has-a" classes, and
  37. ** could be implemented as objects that are part of the TFaceApp class,
  38. ** instead of letting TFaceApp inherit from them.
  39. **
  40. **    But DosShell does have some private/protected members, so we'd
  41. ** need to use inheritance to get at its private members.  Anyway,
  42. ** I set it up this way before really knowing much about the concept
  43. ** of "has-a".
  44. **
  45. *************************************************************************/
  46.  
  47. class TFaceApp : public MenuBarApp, public TBox, private DosShell
  48. {
  49.  
  50. public:
  51.  
  52.     TFaceApp();
  53.     ~TFaceApp();
  54.  
  55.     virtual void handleEvent        // TV override
  56.     (
  57.     TEvent& event
  58.     );
  59.     void face_dialogs            // file dialogs
  60.     (
  61.     FileOperation rw,
  62.     char *fname
  63.     );
  64.     virtual void idle();        // Updates heap view
  65.  
  66.     int respTest();            // ResponseDevice test
  67.     int delayTest
  68.     (
  69.     DelayParameters *delays
  70.     );
  71.  
  72.     UserMessages *msgArea;        // points to this class's errors
  73.     ErrorCode appError;            // storage for the error code
  74.     FilePicker *configFile;        // name of the configuration file
  75.     TDialog *showBox;            // sample box for showing
  76.  
  77. protected:
  78.  
  79.     SimpleConfiguration *equipmentConfig;    // hard-wired list of equipment
  80.  
  81. private:
  82.  
  83.     TWindowScreen *testsWindow;
  84.     void initTFaceApp();            // initial set-up
  85.     int textMode;            // current (desired) text mode
  86.     THeapView *heap;            // Heap view for debugging
  87.  
  88. };
  89.  
  90.  
  91. #endif                            // } FACE_TV_h
  92.  
  93.