Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreControlBar.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_CONTROLBAR__
8 #define __HDI_CORE_CONTROLBAR__
9 
10 #include "hdicoreRect.h"
11 #include "hdicoreWindow.h"
12 
13 namespace hdi
14 {
15  namespace core
16  {
17  class Callback;
18  class Widget;
19 
20  typedef AIControlBarRef PlatformControlBarPtr;
21 
25  class ControlBar : public Window
26  {
27  public:
31  static const double typicalHeight;
32 
44  ControlBar();
45 
53  ControlBar(const ControlBar& cb_);
54 
66  ControlBar(const Rect& frame_, const double minWidth_, const double maxWidth_);
67 
73  virtual ~ControlBar();
74 
83  virtual ControlBar& operator=(const ControlBar& rhs_);
84 
98  virtual ControlBar* clone() const;
99 
110  virtual void destroy();
111 
123  virtual PlatformControlBarPtr platformControlBar() const;
124 
130  virtual void show();
131 
137  virtual void hide();
138 
146  virtual bool visible() const;
147 
157  virtual void setVisible(const bool visible_);
158 
166  virtual double width() const;
167 
175  virtual void setWidth(const double w_);
176 
184  virtual void move(const Point& loc_);
185 
194  virtual bool addWidget(const Widget& widget_);
195 
204  virtual bool removeWidget(const Widget& widget_);
205 
213  virtual Callback* const showCallback() const;
214 
222  virtual void setShowCallback(const Callback& cb_);
223 
231  virtual Callback* const hideCallback() const;
232 
240  virtual void setHideCallback(const Callback& cb_);
241 
249  virtual Callback* const resizeCallback() const;
250 
258  virtual void setResizeCallback(const Callback& cb_);
259 
265  virtual void update() const;
266  };
267 
268  typedef std::auto_ptr<ControlBar> ControlBarAP;
269  }
270 }
271 
272 #endif
273 // __HDI_CORE_CONTROLBAR__
virtual Callback *const resizeCallback() const
Gets the callback set for the control bar resize, or NULL if none.
Base class for all interface widgets; handles many common needs, e.g. text, position, size, etc.
Definition: hdicoreWidget.h:39
virtual void update() const
Forces the widgets in the control bar to update/redraw.
virtual void setShowCallback(const Callback &cb_)
Sets/updates the callback for the control bar showing.
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition: hdicorePoint.h:26
virtual void setResizeCallback(const Callback &cb_)
Sets/updates the callback for the control bar resize.
virtual Callback *const showCallback() const
Gets the registered callback for the control bar showing, or NULL if none.
Header file for a class to create and manipulate Illustrator modal dialogs.
virtual PlatformControlBarPtr platformControlBar() const
Gets the platform-specific control bar, around which the target object is wrapped.
virtual bool removeWidget(const Widget &widget_)
Removes a widget (label, button, text field, etc.) from the control bar.
virtual void show()
Shows the control bar.
Header file for describing rectangles.
virtual void setVisible(const bool visible_)
Sets control bar visibility.
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition: hdicoreRect.h:26
virtual double width() const
Gets the current width of the control bar.
static const double typicalHeight
Most Illustrator control bars are this height, at 1x resolution.
Definition: hdicoreControlBar.h:31
Base class for templated __Callback class.
Definition: hdicoreCallback.h:67
virtual ~ControlBar()
Destructs a ControlBar object.
virtual ControlBar & operator=(const ControlBar &rhs_)
Allows one ControlBar object to be assigned from another.
virtual void hide()
Hides the control bar.
virtual ControlBar * clone() const
Convenience method to clone a ControlBar object on the heap.
virtual void move(const Point &loc_)
Moves the control bar.
virtual bool visible() const
Gets whether the control bar is visible.
Definition: hdicoreaiArray.h:12
virtual void setHideCallback(const Callback &cb_)
Sets/updates the callback for the control bar hiding.
Used to add a control bar to Illustrator&#39;s UI and contain various UI widgets.
Definition: hdicoreControlBar.h:25
virtual Callback *const hideCallback() const
Gets the registered callback for the control bar hiding, or NULL if none.
virtual bool addWidget(const Widget &widget_)
Adds a widget (label, button, text field, etc.) to the control bar.
virtual void setWidth(const double w_)
Sets the width of the control bar.
Used as a base class for modal dialogs, panels, and control bars.
Definition: hdicoreWindow.h:25
ControlBar()
Constructs an empty ControlBar object.
virtual void destroy()
Destroys the UI control bar, converting the target object to an empty ControlBar object (see the defa...