home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / c / intuitionpp / ipp / waiter.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-06  |  1.4 KB  |  59 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. ///////////////////////////////////////////////////////////////////////////////
  3. ///////////////////                                        ////////////////////
  4. ///////////////////           file : waiter.h              ////////////////////
  5. ///////////////////                                        ////////////////////
  6. ///////////////////////////////////////////////////////////////////////////////
  7. ///////////////////////////////////////////////////////////////////////////////
  8. //
  9. //    Class WNode :
  10. //
  11. //        - Node for multiple windows handling
  12. //
  13. //
  14. //    Class Waiter :
  15. //
  16. //        - Object to wich you can link different windows and pass control
  17. //        to it, for it can wait for and dispatch messages to their owner.
  18. //
  19. //        - softcontrol() and hardcontrol() as the same effect that those
  20. //        in 'MsgWindow' but for multiple windows.
  21. //
  22. //    See 'MsgWindow.h for further detail.
  23.  
  24.  
  25.  
  26. #ifndef __WAITER__
  27. #define __WAITER__
  28.  
  29. #include <ipp/msgwindow.h>
  30.  
  31.  
  32. class MsgWNode
  33. {
  34. public:
  35.     MsgWindow *wn;
  36.     MsgWNode *nextwnode;
  37.  
  38.     MsgWNode();
  39.     ~MsgWNode();
  40. };
  41.  
  42.  
  43. class Waiter
  44. {
  45. protected:
  46.     MsgWNode *mwlist;
  47.     unsigned long waitingmask;
  48. public:
  49.     Waiter();
  50.     ~Waiter();
  51.     virtual BOOL linkwindow(MsgWindow& window);
  52.     virtual MsgWindow * rmwindow(MsgWindow& window);
  53.     virtual void rmwindows();
  54.     MsgWindow * softcontrol(IMessage& messagenothandled);
  55.     void hardcontrol();
  56. };
  57.  
  58. #endif //__WAITER__
  59.