#ifndef __WIDGETS_H__ #define __WIDGETS_H__ #include #include namespace mogltk { class widget : public Base { public: virtual ~widget(); void move(int x, int y); void resize(int sx, int sy); int GetX(); int GetY(); int GetH(); int GetW(); int GetAX(); int GetAY(); int GetAX2(); int GetAY2(); void fulldraw(); shape * Shaper(); protected: widget(widget * father, int x, int y, int sx, int sy, int type, String name, shape *); virtual void draw() = 0; private: void computeabs(); int x, y, sx, sy, ax, ay, ax2, ay2; widget * father, * next, * prev, * child, * root; static widget * focused; int type; String name, caption; shape * sh; void idraw(); }; class drawer : public Base { public: virtual void draw(widget *) = 0; }; class Root : public widget { public: Root(shape *, drawer * = 0); void setdrawer(drawer *); protected: virtual void draw(); drawer * dr; }; }; #endif