home *** CD-ROM | disk | FTP | other *** search
/ GEMini Atari / GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso / zip / program / gempp15b.zoo / include / gema.h < prev    next >
C/C++ Source or Header  |  1993-04-25  |  2KB  |  70 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  GEMactivity
  4. //
  5. //  A GEMactivity is an interaction with the user through the GEM interface.
  6. //
  7. //  This file is Copyright 1992,1993 by Warwick W. Allison.
  8. //  This file is part of the gem++ library.
  9. //  You are free to copy and modify these sources, provided you acknowledge
  10. //  the origin by retaining this notice, and adhere to the conditions
  11. //  described in the file COPYING.LIB.
  12. //
  13. /////////////////////////////////////////////////////////////////////////////
  14.  
  15. #ifndef GEMa_h
  16. #define GEMa_h
  17.  
  18. #include <gemfb.h>
  19.  
  20. class GEMmenu;
  21. class GEMdeskaccessory;
  22. class GEMwindow;
  23. class GEMtimer;
  24. class GEMkeysink;
  25. class GEMevent;
  26.  
  27. class GEMactivity
  28. {
  29. public:
  30.     GEMactivity();
  31.  
  32.     virtual ~GEMactivity();
  33.  
  34.     // Standard main-loop...
  35.     void Do();
  36.  
  37.     // Components, so you may build your own...
  38.     void BeginDo();
  39.     GEMfeedback OneDo();
  40.     void EndDo();
  41.  
  42.     // These are for call by GEM* classes
  43.     void AddWindow(GEMwindow&);
  44.     void RemoveWindow(GEMwindow&);
  45.     void SetMenu(GEMmenu*);
  46.     void SetTimer(GEMtimer*);
  47.     void SetKeySink(GEMkeysink*);
  48.     void SetDeskAccessory(GEMdeskaccessory*);
  49.     void Topped(const GEMwindow&);
  50.     void Bottomed(const GEMwindow&);
  51.  
  52. private:
  53.     GEMfeedback PerformMessage(const GEMevent&);
  54.     struct WL {
  55.         WL(GEMwindow *Wind, WL *n);
  56.         GEMwindow *Window;
  57.         struct WL *Next;
  58.         struct WL *Prev;
  59.     } *W;
  60.     GEMwindow* Window(int ID) const;
  61.     WL* ListWindow(int ID) const;
  62.  
  63.     GEMmenu *Menu;
  64.     GEMdeskaccessory *Acc;
  65.     GEMtimer *Timer;
  66.     GEMkeysink *KeySink;
  67. };
  68.  
  69. #endif
  70.