home *** CD-ROM | disk | FTP | other *** search
- #ifndef __object_h
- #define __object_h
-
- #include <theatrix.h>
-
- struct point
- {
- int x,y;
- };
-
- struct rect
- {
- int l,t,r,b,w,h; // left,top,right,bottom,width,height
- };
-
- //--------------------------------------
- // Object
- // the base class for any graphical object
- // maintains a location on the screen
- // draws itself
- //--------------------------------------
- class Object : public Performer
- {
- // data
- private:
- protected:
- point loc;
- int width, height;
- public:
-
- // functions
- private:
- protected:
- public:
- Object() : Performer() {};
- virtual void OnDraw(void)=0;
- void SetXY( int X, int Y ) { loc.x=X, loc.y=Y; }
- point GetPosition(void) { return loc; }
- };
-
- #endif //__object_h
-