Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicorePanel.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_PANEL__
8#define __HDI_CORE_PANEL__
9
10#if defined(HDI_CORE_AIP_MODE)
11
12#include "hdicoreImageIDs.h"
13#include "hdicoreRect.h"
14#include "hdicoreSVGIDs.h"
15#include "hdicoreWindow.h"
16
17namespace hdi
18{
19 namespace pui
20 {
21 class Panel;
22 }
23
24 namespace core
25 {
26 class Callback;
27 class Flyout;
28 class Widget;
29
30 typedef AIPanelRef PlatformPanelPtr;
31
35 class Panel : public Window
36 {
37 public:
41 static const double typicalWidth;
42
54
62 Panel(const Panel& p_);
63
79 const std::string& name_,
80 const Size& size_,
81 const bool resizableW_,
82 const bool resizableH_,
83 const ImageIDs& iconIDs_
84 );
85
101 const std::string& name_,
102 const Size& size_,
103 const bool resizableW_,
104 const bool resizableH_,
105 const SVGIDs& iconIDs_
106 );
107
113 virtual ~Panel();
114
123 virtual Panel& operator=(const Panel& rhs_);
124
138 virtual Panel* clone() const;
139
150 virtual void destroy();
151
163 virtual PlatformPanelPtr platformPanel() const;
164
170 virtual void show();
171
177 virtual void hide();
178
186 virtual bool visible() const;
187
197 virtual void setVisible(const bool visible_);
198
207 virtual Rect frame() const;
208
216 virtual void setFrame(const Rect& frame_);
217
225 virtual void setSize(const Size& s_);
226
234 virtual void setHeight(const double height_);
235
244 virtual Size minimumSize() const;
245
255 virtual void setMinimumSize(const Size& min_);
256
265 virtual Size maximumSize() const;
266
276 virtual void setMaximumSize(const Size& max_);
277
286 virtual bool addWidget(const Widget& widget_);
287
296 virtual bool removeWidget(const Widget& widget_);
297
305 std::string title() const;
306
314 void setTitle(const std::string& title_);
315
326 virtual Flyout* const flyoutMenu() const;
327
335 virtual void setFlyoutMenu(const Flyout& flyout_);
336
344 virtual Callback* const showCallback() const;
345
353 virtual void setShowCallback(const Callback& cb_);
354
362 virtual Callback* const hideCallback() const;
363
371 virtual void setHideCallback(const Callback& cb_);
372
380 virtual Callback* const resizeCallback() const;
381
389 virtual void setResizeCallback(const Callback& cb_);
390
396 virtual void update() const;
397
398
399 private:
400 friend class Flyout;
401 friend pui::Panel* __accessImpl(const Panel&);
402 friend Panel __accessCtor(pui::Panel* const);
403
409 void* __impl() const;
410
416 Panel(pui::Panel* const);
417 };
418
419 typedef std::unique_ptr<Panel> PanelUP;
420 typedef std::shared_ptr<Panel> PanelSP;
421 typedef std::weak_ptr<Panel> PanelWP;
422
423 extern pui::Panel* __accessImpl(const Panel&);
424 extern Panel __accessCtor(pui::Panel* const);
425 }
426}
427
428#endif
429// HDI_CORE_AIP_MODE
430
431#endif
432// __HDI_CORE_PANEL__
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Flyout menu, which can be added to a Panel for additional options.
Definition: hdicoreFlyout.h:33
Stores both light and dark image PNGI resource IDs, such that app UI brightness changes can be proper...
Definition: hdicoreImageIDs.h:21
Used to add a panel to Illustrator's UI and contain various UI widgets.
Definition: hdicorePanel.h:36
virtual void setVisible(const bool visible_)
Sets panel visibility.
virtual void setMaximumSize(const Size &max_)
Sets the maximum panel size, if the panel is resizeable in any direction (otherwise,...
virtual void update() const
Forces the widgets in the panel to update/redraw (including the flyout, if any)
virtual ~Panel()
Destructs a Panel object.
Panel(const std::string &name_, const Size &size_, const bool resizableW_, const bool resizableH_, const SVGIDs &iconIDs_)
Constructs a new Panel object.
virtual Callback *const resizeCallback() const
Gets the callback set for the panel resize, or NULL if none.
virtual void show()
Shows the panel.
virtual Panel * clone() const
Convenience method to clone a Panel object on the heap.
virtual Callback *const showCallback() const
Gets the registered callback for the panel showing, or NULL if none.
virtual void setResizeCallback(const Callback &cb_)
Sets/updates the callback for the panel resize.
virtual bool removeWidget(const Widget &widget_)
Removes a widget (label, button, text field, etc.) from the panel.
virtual void hide()
Hides the panel.
virtual void setSize(const Size &s_)
Sets the panel's dimensions.
virtual void destroy()
Destroys the UI panel, converting the target object to an empty Panel object (see the default constru...
static const double typicalWidth
Most Illustrator panels are this width.
Definition: hdicorePanel.h:41
virtual bool addWidget(const Widget &widget_)
Adds a widget (label, button, text field, etc.) to the panel.
virtual Panel & operator=(const Panel &rhs_)
Allows one Panel object to be assigned from another.
virtual void setShowCallback(const Callback &cb_)
Sets/updates the callback for the panel showing.
Panel(const Panel &p_)
Constructs a new Panel object from an existing Panel object (copy constructor)
virtual void setMinimumSize(const Size &min_)
Sets the minimum panel size, if the panel is resizeable in any direction (otherwise,...
virtual bool visible() const
Gets whether the panel is visible.
std::string title() const
Gets the current panel title.
virtual void setHeight(const double height_)
Sets the panel's height (keeping the location and width the same)
Panel()
Constructs an empty Panel object.
virtual Callback *const hideCallback() const
Gets the registered callback for the panel hiding, or NULL if none.
virtual PlatformPanelPtr platformPanel() const
Gets the platform-specific panel, around which the target object is wrapped.
virtual Size minimumSize() const
Gets the minimum panel size, if the panel is resizeable in any direction (otherwise,...
Panel(const std::string &name_, const Size &size_, const bool resizableW_, const bool resizableH_, const ImageIDs &iconIDs_)
Constructs a new Panel object.
virtual Size maximumSize() const
Gets the maximum panel size, if the panel is resizeable in any direction (otherwise,...
virtual void setFrame(const Rect &frame_)
Sets the panel's frame (location and size)
void setTitle(const std::string &title_)
Sets the current panel title.
virtual Flyout *const flyoutMenu() const
Gets the current flyout menu for the panel, or NULL if none.
virtual void setFlyoutMenu(const Flyout &flyout_)
Sets/updates the flyout menu for the panel.
virtual Rect frame() const
Gets the panel's frame.
virtual void setHideCallback(const Callback &cb_)
Sets/updates the callback for the panel hiding.
Contains Point and Size objects to describe a rectangle that exists at a specific point of given dime...
Definition: hdicoreRect.h:34
Stores both light and dark SVG resource IDs, such that app UI brightness changes can be properly hand...
Definition: hdicoreSVGIDs.h:21
Contains a width and height for a rectangular shape.
Definition: hdicoreSize.h:25
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 handling image IDs and their higher resolution variants.
Header file for describing rectangles.
Header file for handling vector graphic IDs.
Header file for a class to create and manipulate plugin windows.