Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreControlBar.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_CONTROLBAR__
8#define __HDI_CORE_CONTROLBAR__
9
10#if defined(HDI_CORE_AIP_MODE)
11
12#include "hdicoreRect.h"
13#include "hdicoreWindow.h"
14
15namespace hdi
16{
17 namespace core
18 {
19 class Callback;
20 class Widget;
21
22 typedef AIControlBarRef PlatformControlBarPtr;
23
27 class ControlBar : public Window
28 {
29 public:
33 static const double typicalHeight;
34
47
56
68 ControlBar(const Rect& frame_, const double minWidth_, const double maxWidth_);
69
75 virtual ~ControlBar();
76
85 virtual ControlBar& operator=(const ControlBar& rhs_);
86
100 virtual ControlBar* clone() const;
101
112 virtual void destroy();
113
125 virtual PlatformControlBarPtr platformControlBar() const;
126
132 virtual void show();
133
139 virtual void hide();
140
148 virtual bool visible() const;
149
159 virtual void setVisible(const bool visible_);
160
168 virtual double width() const;
169
177 virtual void setWidth(const double w_);
178
186 virtual void move(const Point& loc_);
187
196 virtual bool addWidget(const Widget& widget_);
197
206 virtual bool removeWidget(const Widget& widget_);
207
215 virtual Callback* const showCallback() const;
216
224 virtual void setShowCallback(const Callback& cb_);
225
233 virtual Callback* const hideCallback() const;
234
242 virtual void setHideCallback(const Callback& cb_);
243
251 virtual Callback* const resizeCallback() const;
252
260 virtual void setResizeCallback(const Callback& cb_);
261
267 virtual void update() const;
268 };
269
270 typedef std::unique_ptr<ControlBar> ControlBarUP;
271 typedef std::shared_ptr<ControlBar> ControlBarSP;
272 typedef std::weak_ptr<ControlBar> ControlBarWP;
273 }
274}
275
276#endif
277// HDI_CORE_AIP_MODE
278
279#endif
280// __HDI_CORE_CONTROLBAR__
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Used to add a control bar to Illustrator's UI and contain various UI widgets.
Definition: hdicoreControlBar.h:28
virtual Callback *const resizeCallback() const
Gets the callback set for the control bar resize, or NULL if none.
virtual void hide()
Hides the control bar.
virtual void setVisible(const bool visible_)
Sets control bar visibility.
ControlBar(const ControlBar &cb_)
Constructs a new ControlBar object from an existing ControlBar object (copy constructor)
virtual Callback *const hideCallback() const
Gets the registered callback for the control bar hiding, or NULL if none.
virtual void update() const
Forces the widgets in the control bar to update/redraw.
virtual ControlBar * clone() const
Convenience method to clone a ControlBar object on the heap.
virtual void setResizeCallback(const Callback &cb_)
Sets/updates the callback for the control bar resize.
virtual void destroy()
Destroys the UI control bar, converting the target object to an empty ControlBar object (see the defa...
virtual bool addWidget(const Widget &widget_)
Adds a widget (label, button, text field, etc.) to the control bar.
ControlBar(const Rect &frame_, const double minWidth_, const double maxWidth_)
Constructs a new ControlBar object.
virtual bool removeWidget(const Widget &widget_)
Removes a widget (label, button, text field, etc.) from the control bar.
virtual void setShowCallback(const Callback &cb_)
Sets/updates the callback for the control bar showing.
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:33
virtual bool visible() const
Gets whether the control bar is visible.
virtual ControlBar & operator=(const ControlBar &rhs_)
Allows one ControlBar object to be assigned from another.
ControlBar()
Constructs an empty ControlBar object.
virtual void move(const Point &loc_)
Moves the control bar.
virtual void setWidth(const double w_)
Sets the width of the control bar.
virtual PlatformControlBarPtr platformControlBar() const
Gets the platform-specific control bar, around which the target object is wrapped.
virtual void show()
Shows the control bar.
virtual Callback *const showCallback() const
Gets the registered callback for the control bar showing, or NULL if none.
virtual ~ControlBar()
Destructs a ControlBar object.
virtual void setHideCallback(const Callback &cb_)
Sets/updates the callback for the control bar hiding.
Describes a point in the 2-dimensional (x,y) coordinate system, typically in an Illustrator document ...
Definition: hdicorePoint.h:38
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition: hdicoreRect.h:34
Base class for all interface widgets; handles many common needs, e.g. text, position,...
Definition: hdicoreWidget.h:30
Used as a base class for modal dialogs, panels, and control bars.
Definition: hdicoreWindow.h:26
Header file for describing rectangles.
Header file for a class to create and manipulate plugin windows.