Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreFloatingDialog.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_FLOATING_DIALOG__
8 #define __HDI_CORE_FLOATING_DIALOG__
9 
10 #include "hdicoreSize.h"
11 #include "hdicoreWindow.h"
12 
13 namespace hdi
14 {
15  namespace core
16  {
17  class Callback;
18  class Widget;
19 
20  #if defined(MAC_ENV)
21  typedef NSWindow* PlatformFloatingDialogPtr;
22  #elif defined(WIN_ENV)
23  typedef CDialog* PlatformFloatingDialogPtr;
24  #endif
25 
30  class FloatingDialog : public Window
31  {
32  public:
45 
53  FloatingDialog(const FloatingDialog& fd_);
54 
65  FloatingDialog(const std::string& name_, const Size& size_);
66 
72  virtual ~FloatingDialog();
73 
82  virtual FloatingDialog& operator=(const FloatingDialog& rhs_);
83 
98  virtual FloatingDialog* clone() const;
99 
110  virtual void destroy();
111 
123  virtual PlatformFloatingDialogPtr platformFloatingDialog() const;
124 
132  virtual bool visible() const;
133 
139  virtual void show();
140 
146  virtual void hide();
147 
156  virtual bool addWidget(const Widget& widget_);
157 
166  virtual bool removeWidget(const Widget& widget_);
167 
175  virtual std::string title() const;
176 
184  virtual void setTitle(const std::string& title_);
185 
193  virtual Size size() const;
194 
202  virtual void setSize(const Size& size_);
203 
209  virtual void update() const;
210 
218  virtual Callback* const closeCallback() const;
219 
227  virtual void setCloseCallback(const Callback& cb_);
228 
236  virtual Callback* const focusCallback() const;
237 
245  void setFocusCallback(const Callback& cb_);
246 
254  virtual Callback* const blurCallback() const;
255 
263  void setBlurCallback(const Callback& cb_);
264  };
265 
266  typedef std::auto_ptr<FloatingDialog> FloatingDialogAP;
267  }
268 }
269 
270 #endif
271 // __HDI_CORE_FLOATING_DIALOG__
virtual bool visible() const
Gets whether the dialog is visible.
Base class for all interface widgets; handles many common needs, e.g. text, position, size, etc.
Definition: hdicoreWidget.h:39
Header file for a class to create and manipulate Illustrator modal dialogs.
virtual Callback *const blurCallback() const
Gets the current dialog blur callback.
virtual void hide()
Hides the floating dialog.
virtual FloatingDialog & operator=(const FloatingDialog &rhs_)
Allows one FloatingDialog object to be assigned from another.
void setFocusCallback(const Callback &cb_)
Sets the dialog focus callback.
virtual Callback *const focusCallback() const
Gets the current dialog focus callback.
Base class for templated __Callback class.
Definition: hdicoreCallback.h:67
virtual bool removeWidget(const Widget &widget_)
Removes a widget (label, button, text field, etc.) from the floating dialog.
virtual ~FloatingDialog()
Destructs a FloatingDialog object.
Header file for describing 2D dimensions (width and height)
virtual bool addWidget(const Widget &widget_)
Adds a widget (label, button, text field, etc.) to the floating dialog.
virtual std::string title() const
Gets the current floating dialog title.
virtual void setTitle(const std::string &title_)
Sets the current floating dialog title.
virtual FloatingDialog * clone() const
Convenience method to clone a FloatingDialog object on the heap.
virtual Size size() const
Gets the floating dialog's size.
Contains a width and height for a rectangular shape.
Definition: hdicoreSize.h:24
Definition: hdicoreaiArray.h:12
virtual void setSize(const Size &size_)
Sets the floating dialog's size.
void setBlurCallback(const Callback &cb_)
Sets the dialog blur callback.
virtual void show()
Shows the floating dialog.
Used to create and display a floating dialog to the user, which is similar to a modal dialog but non-...
Definition: hdicoreFloatingDialog.h:30
virtual PlatformFloatingDialogPtr platformFloatingDialog() const
Gets the platform-specific floating dialog, around which the target object is wrapped.
FloatingDialog()
Constructs an empty FloatingDialog object.
virtual void update() const
Forces the widgets in the floating dialog to update/redraw.
virtual void setCloseCallback(const Callback &cb_)
Sets the close button callback for the dialog.
virtual void destroy()
Destroys the UI floating dialog, converting the target object to an empty FloatingDialog object (see ...
Used as a base class for modal dialogs, panels, and control bars.
Definition: hdicoreWindow.h:25
virtual Callback *const closeCallback() const
Gets the current close button callback.