home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / pmics.zip / wcomm.hh < prev    next >
Text File  |  1994-12-13  |  3KB  |  126 lines

  1. #ifndef WCOMM_DEFINED
  2. #define WCOMM_DEFINED
  3. //**************************************************************************
  4. // Class:   CommWindow                                                     *
  5. //                                                                         *
  6. // Purpose: Terminal emulation window.                                     *
  7. //                                                                         *
  8. //**************************************************************************
  9.  
  10. #include <iframe.hpp>
  11. #include <icmdhdr.hpp>
  12. #include <iedithdr.hpp>
  13. #include <ientryfd.hpp>
  14. #include <istattxt.hpp>
  15. #include <icheckbx.hpp>
  16. #include <iradiobt.hpp>
  17. #include <iselhdr.hpp>
  18. #include <ilistbox.hpp>
  19. #include <ikeyhdr.hpp>
  20. #include <istring.hpp>
  21.  
  22. class ACommFilter;
  23. class CommEditHandler;
  24. class CommMsgHandler;
  25.  
  26. class CommWindow : public IListBox,
  27.            public IKeyboardHandler
  28. {
  29. public:                               //Define the public Information
  30.   CommWindow(unsigned long windowId, //Constructor for this class
  31.          IWindow *parent);
  32.   Boolean         key(IKeyboardEvent &evt);
  33.   void            lookForChallenge (IString &line);
  34.   void            fontDialog();
  35.   ACommFilter     *commFilter;
  36.   void            timerTick(int count = -1);
  37.   Boolean         cr2lf,
  38.                   bs2del,
  39.                   localecho;
  40. private:                              //Define the private Information
  41.   CommEditHandler     *editHandler;
  42.   CommMsgHandler      *msgHandler;
  43. };
  44.  
  45.  
  46. class ACommFilter
  47. {
  48. public:
  49.   virtual Boolean filter(IString &) = 0;
  50. };
  51.  
  52.  
  53. class ACommFilterStyle12 : public ACommFilter
  54. {
  55. public:
  56.   Boolean filter(IString &);
  57. };
  58.  
  59.  
  60.  
  61. class CommMsgHandler : public IHandler
  62. {
  63. public:
  64.   CommMsgHandler(CommWindow *w) { commWindow = w; }
  65.   Boolean dispatchHandlerEvent(IEvent &evt);
  66. private:
  67.   CommWindow    *commWindow;
  68. };
  69.  
  70.  
  71. class CommEditHandler : public IEditHandler
  72. {
  73. public:
  74.   Boolean edit (IControlEvent &evt);
  75. };
  76.  
  77.  
  78. class AMatchSelectHandler;
  79.  
  80. class AMatchDialog : public IFrameWindow, public ICommandHandler
  81. {
  82.   public:                               //Define the public Information
  83.     AMatchDialog(IWindow *parent,
  84.          IWindow *owner,
  85.          IWindow *commWin,
  86.          IString cName,
  87.          int     cIsRated,
  88.          int     cWildType,
  89.          int     isWhite,
  90.          int     isBlack,
  91.          IString cClock,
  92.          IString cOddsClock);        //Constructor for this class
  93.  
  94.     IEntryField    *clock,
  95.                    *oddsClock,
  96.                    *wildType;
  97.     IRadioButton   *white,
  98.                    *black,
  99.                    *neutral;
  100.     IStaticText    *opponent;
  101.     ICheckBox      *rated,
  102.                    *wild;
  103.     IWindow        *commWind;   // save so we can set focus at end
  104.     Boolean        initialRated,
  105.                    initialWhite,
  106.                    initialBlack;
  107.     int            initialWildType;
  108.     IString        initialClock,
  109.                    initialOddsClock;
  110.  
  111.     AMatchSelectHandler *selectHdr;
  112.  
  113.   protected:
  114.     Boolean command (ICommandEvent& cmdEvent);
  115. };
  116.  
  117.  
  118. class AMatchSelectHandler : public ISelectHandler
  119. {
  120. protected:
  121.   virtual Boolean selected( IControlEvent &evt );
  122. };
  123.  
  124. #endif
  125.  
  126.