Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreWidgetGroup.h
Go to the documentation of this file.
1 
8 #ifndef __HDI_CORE_WIDGET_GROUP__
9 #define __HDI_CORE_WIDGET_GROUP__
10 
11 #include <vector>
12 
13 #include "hdicorePoint.h"
14 
15 namespace hdi
16 {
17  namespace core
18  {
19  class Widget;
20 
26  {
27  public:
28  typedef std::vector< Widget* > WidgetVector;
29 
35  WidgetGroup();
36 
44  WidgetGroup(const WidgetGroup& group_);
45 
51  virtual ~WidgetGroup();
52 
61  virtual WidgetGroup& operator=(const WidgetGroup& rhs_);
62 
71  virtual bool operator==(const WidgetGroup& rhs_) const;
72 
81  virtual bool operator!=(const WidgetGroup& rhs_) const;
82 
94  virtual void add(const Widget& w_);
95 
107  virtual void remove(const Widget& w_);
108 
117  virtual void clear();
118 
127  virtual bool hasWidget(const Widget& w_);
128 
136  virtual const WidgetVector widgets() const;
137 
145  virtual Point origin() const;
146 
155  virtual void setOrigin(const Point& pt_);
156 
164  virtual double width() const;
165 
173  virtual double height() const;
174 
182  virtual void setEnabled(const bool enable_);
183 
191  virtual void setVisible(const bool visible_);
192 
198  virtual void update();
199 
200 
201  private:
205  void* __data;
206  };
207 
208  typedef std::auto_ptr<WidgetGroup> WidgetGroupAP;
209  }
210 }
211 
212 #endif
213 // __HDI_CORE_WIDGET_GROUP__
WidgetGroup()
Constructs a new widget group.
Base class for all interface widgets; handles many common needs, e.g. text, position, size, etc.
Definition: hdicoreWidget.h:39
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition: hdicorePoint.h:26
virtual void setOrigin(const Point &pt_)
Sets the top-left-most point for the contained widgets.
virtual bool operator==(const WidgetGroup &rhs_) const
Tests whether a given WidgetGroup object is the same as another.
virtual double height() const
Gets the total height of all the contained widgets.
virtual void setEnabled(const bool enable_)
Enables or disables all the contained widgets.
virtual void setVisible(const bool visible_)
Shows or hides all the contained widgets.
virtual void add(const Widget &w_)
Adds a widget to the group.
virtual Point origin() const
Gets the top-left-most point for the contained widgets.
virtual double width() const
Gets the total width of all the contained widgets.
virtual void clear()
Removes all widgets currently contained by the group.
virtual bool operator!=(const WidgetGroup &rhs_) const
Tests whether a given WidgetGroup object is not the same as another.
Header file for describing 2D points.
Definition: hdicoreaiArray.h:12
virtual bool hasWidget(const Widget &w_)
Checks for the existence of a widget in the group.
virtual ~WidgetGroup()
WidgetGroup destructor.
Allows for grouping widgets together, such that all can be added to a window in one call...
Definition: hdicoreWidgetGroup.h:25
virtual const WidgetVector widgets() const
Gets a vector of the contained widgets.
virtual void update()
Force all the contained widgets to update (i.e. cause them to redraw)
virtual WidgetGroup & operator=(const WidgetGroup &rhs_)
Allows one WidgetGroup object to be assigned from another.