home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / thandl.zip / TDEMO.HPP < prev    next >
C/C++ Source or Header  |  1993-12-05  |  4KB  |  136 lines

  1. /*-----------------------------------------------------------------------*/
  2. /* filename -       tdemo.hpp                                            */
  3. /*                                                                       */
  4. /* function(s)                                                           */
  5. /*                  declarations for the TDemoDialog and TDemoApp        */
  6. /*                  classes                                              */
  7. /*                                                                       */
  8. /* author -         Michael "Mick" Newton                                */
  9. /*                                                                       */
  10. /*-----------------------------------------------------------------------*/
  11.  
  12. /*-----------------------------------------------------------------------*/
  13. /*                                                                       */
  14. /*    TDEMO.HPP                                                          */
  15. /*                                                                       */
  16. /*    THandler shareware version 2.0                                     */
  17. /*    Copyright (C) 1992,1993 Comsoft Software                           */
  18. /*    All Rights Reserved.                                               */
  19. /*                                                                       */
  20. /*-----------------------------------------------------------------------*/
  21.  
  22.  
  23. #if !defined __TDEMO_HPP
  24. #define __TDEMO_HPP
  25.  
  26.  
  27. // Forward references to Turbo Vision classes *****************************
  28.  
  29. class far TApplication;
  30. class far TDeskTop;
  31. class far TDialog;
  32. class far TEvent;
  33. class far TMenuBar;
  34. class far TPalette;
  35. class far TRect;
  36. class far TStatusLine;
  37.  
  38.  
  39.  
  40.  
  41.  
  42. // Forward references to non-Turbo Vision classes *************************
  43.  
  44. class far THandler;
  45.  
  46.  
  47.  
  48.  
  49.  
  50. // Constants **************************************************************
  51.  
  52. // Menubar and dialog commands
  53. const cmAbout      = 200,
  54.       cmOptions    = 201,
  55.       cmTests      = 202,
  56.       cmDriveA     = 203,
  57.       cmDriveB     = 204,
  58.       cmLPT1       = 205,
  59.       cmLPT2       = 206,
  60.       cmLPT3       = 207,
  61.       hcNone       = hcNoContext;
  62.  
  63. // Bit masks for TOptionsDataRec 'use' checkboxes
  64. const ofUseSounds  = 0x0001,
  65.       ofExtPal     = 0x0002,
  66.       ofSuspendTV  = 0x0004,
  67.       ofUseDosISR  = 0x0008;
  68.  
  69.  
  70.  
  71.  
  72.  
  73. // Data structures ********************************************************
  74.  
  75. // For options dialog
  76. struct TOptionsDataRec
  77. {
  78.    ushort use;          // THandler options checkbox
  79.    ushort video;        // Video mode radio button
  80. };
  81.  
  82.  
  83.  
  84.  
  85.  
  86. // TDemoDialog ************************************************************
  87.  
  88. class TDemoDialog : public TDialog
  89. {
  90.    public:
  91.       TDemoDialog(const TRect& bounds, const char *aTitle);
  92.       virtual void handleEvent(TEvent& event);
  93. };
  94.  
  95.  
  96.  
  97.  
  98.  
  99. // TDemoApp ***************************************************************
  100.  
  101. class TDemoApp : public TApplication
  102. {
  103.    public:
  104.       TDemoApp();
  105.       virtual void shutDown();
  106.       virtual Boolean valid(ushort command);
  107.       virtual TPalette& getPalette() const;
  108.       virtual void handleEvent(TEvent& Event);
  109.       static TDeskTop *initDeskTop(TRect r);
  110.       static TMenuBar *initMenuBar(TRect r);
  111.       static TStatusLine *initStatusLine(TRect r);
  112.    protected:
  113.    private:
  114.       Boolean status;             // Object status
  115.       TOptionsDataRec optrec;     // Options dialog data
  116.       THandler *newHandler;       // Pointer to error handler object
  117.       void about();               // About dialog
  118.       void options();             // Options dialog
  119.       ushort testDevices();       // Device test dialog
  120. };
  121.  
  122.  
  123.  
  124.  
  125.  
  126. // Non-member function declarations ***************************************
  127.  
  128. void displayMessage();
  129. void exitfunc();
  130.  
  131.  
  132. #endif
  133.  
  134. //                                End of TDEMO.HPP
  135.  
  136.