• Main Page
  • Namespaces
  • Classes
  • Files
  • File List

hotspot.h

Go to the documentation of this file.
00001 #ifndef WIT_HOTSPOT_H
00002 #define WIT_HOTSPOT_H
00003 
00004 #include "geometry.h"
00005 #include <vector>
00006 #include <memory>
00007 
00008 namespace wit {
00009 
00010 class EventHandler;
00011 class HotspotPrivate;
00012 class Hotspot;
00013 typedef std::vector<Hotspot*> HotspotList;
00014 
00015 class Hotspot {
00016 public:
00017     Hotspot();
00018     virtual ~Hotspot();
00019 
00020     bool isEnabled() const;
00021     void setEnabled(bool on);
00022 
00023     Rect boundingBox() const;
00024     bool boundingBoxContains(float x, float y);
00025 
00026     Polygon region() const;
00027     void setRegion(const Rect& rect);
00028     void setRegion(const Polygon& polygon);
00029     bool contains(float x, float y);
00030 
00031     void setEventHandler(EventHandler* handler);
00032     EventHandler* eventHandler() const;
00033 
00034     int zIndex() const;
00035     void setZIndex(int z);
00036 
00037     static std::auto_ptr<HotspotList> findAtPoint(float x, float y);
00038     
00039 private:
00040     friend class HotspotPrivate;
00041     HotspotPrivate* d;
00042 };
00043 
00044 }
00045 
00046 #endif

Generated on Sat Sep 3 2011 10:25:00 for wit by  doxygen 1.7.2