Go to the documentation of this file.00001 #ifndef _ITEM_H_
00002 #define _ITEM_H_
00003
00004 #ifdef WIN32
00005 #include <windows.h>
00006 #endif
00007
00008 #ifndef __APPLE__
00009 #include "GL/gl.h"
00010 #else
00011 #include "OpenGL/gl.h"
00012 #endif
00013
00014
00026 class iil4mitkItem {
00027
00028 public:
00029
00033 iil4mitkItem();
00034
00035 virtual ~iil4mitkItem() {}
00036
00044 virtual void display (iil4mitkWidget* widget) = 0;
00045
00051 virtual void remove (iil4mitkWidget* widget);
00052
00056 void move (const float x, const float y);
00057
00061 float x () const;
00062 float y () const;
00063
00068 virtual float width () const;
00069 virtual float height () const;
00070
00078 virtual void setColor (const float red, const float green, const float blue, const float alpha);
00079
00083 float red () const;
00084 float green () const;
00085 float blue () const;
00086 float alpha () const;
00087
00092 void setLineWidth (const float width);
00093
00097 float lineWidth () const;
00098
00102 void setPickable (const bool on);
00103
00108 bool pickable () const;
00109
00116 virtual iil4mitkItem* picked (iil4mitkWidget* widget, const float x, const float y);
00117
00123 void setScalable (const bool scalable);
00124
00128 bool scalable () const;
00129
00137 void setConstraint (iil4mitkWidget* widget);
00138
00142 iil4mitkWidget* constraint () const;
00143
00148 void setVisible (const bool visible);
00149
00154 bool visible () const;
00155
00159 void show ();
00160
00164 void hide ();
00165
00166 private:
00167
00171 float _x, _y;
00172
00176 float _red, _green, _blue, _alpha;
00177
00181 float _lineWidth;
00182
00186 iil4mitkWidget* _constraint;
00187
00192 bool _visible;
00193
00197 bool _pickable;
00198
00204 bool _scalable;
00205
00206 };
00207
00208 #endif