Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

IWidget.h

Go to the documentation of this file.
00001 #ifndef HEADER_IWIDGET_H
00002 #define HEADER_IWIDGET_H
00003 
00004 class MouseStroke;
00005 
00006 #include "Drawable.h"
00007 #include "V2.h"
00008 
00009 #include "SDL.h"
00010 
00011 /**
00012  * Widget interface.
00013  */
00014 class IWidget : public Drawable {
00015     protected:
00016         V2 m_shift;
00017         std::string m_tip;
00018     protected:
00019         virtual void own_mouseButton(const MouseStroke &/*stroke*/) {}
00020         virtual std::string own_getTip(const V2 &/*loc*/) { return m_tip; }
00021     public:
00022         IWidget() : m_shift(0, 0) {}
00023         virtual int getW() const = 0;
00024         virtual int getH() const = 0;
00025         virtual void setShift(const V2 &shift) { m_shift = shift; }
00026         virtual void setTip(const std::string &tip) { m_tip = tip; }
00027 
00028         void mouseButton(const MouseStroke &stroke);
00029         std::string getTip(const V2 &loc);
00030         bool isInside(const V2 &loc);
00031 };
00032 
00033 #endif

Generated on Wed Jun 1 09:54:31 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2