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

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  GEMform
  4. //
  5. //  A GEMform interacts with the user through a GEM form (or dialog).
  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 GEMf_h
  16. #define GEMf_h
  17.  
  18. #include <gemfb.h>
  19. #include <gemrawo.h>
  20. #include <bool.h>
  21.  
  22. class GEMrawobject;
  23. class GEMobject;
  24. class GEMrsc;
  25. class GEMevent;
  26.  
  27. class GEMform
  28. {
  29. public:
  30.     GEMform(const GEMrsc& in, int RSCindex);
  31.     GEMform(const GEMform&);
  32.     virtual ~GEMform();
  33.  
  34.     int Do(); // Centred
  35.     virtual int Do(int x, int y);
  36.  
  37.     bool Zooms(bool b);
  38.  
  39.     virtual void RedrawObject(int RSCindex);
  40.     virtual void RedrawObject(int RSCindex,int Cx,int Cy,int Cw,int Ch); // Clipped
  41.  
  42.     int Parent(int RSCindex) const;
  43.  
  44.     // See GEMrawobject for conversion function to GEMobject*
  45.     GEMrawobject& operator[](int RSCindex) const { return Obj[RSCindex]; }
  46.  
  47.     virtual void AlignObject(int RSCindex, int xmult=8, int ymult=1);
  48.  
  49.     int Map(int Do(GEMrawobject*, int), bool skiphidden=TRUE, int RSCfrom=0, int RSCto=-1);
  50.  
  51.     virtual GEMfeedback DoItem(int item, const GEMevent& e);
  52.  
  53. private:
  54.     int myindex;
  55.  
  56. protected:
  57.     bool ZoomOn;
  58.     GEMrawobject *Obj;
  59.     virtual int FormDo();
  60.     int xoffset,yoffset,xmult,ymult;
  61. };
  62. inline    bool GEMform::Zooms(bool b)    { bool t=b; ZoomOn=b; return t; }
  63.  
  64. #endif
  65.