Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Member Functions | List of all members
hdi::core::FloatingDialog Class Reference

Used to create and display a floating dialog to the user, which is similar to a modal dialog but non-blocking. More...

#include <hdicoreFloatingDialog.h>

Inheritance diagram for hdi::core::FloatingDialog:
Inheritance graph
[legend]
Collaboration diagram for hdi::core::FloatingDialog:
Collaboration graph
[legend]

Public Member Functions

 FloatingDialog ()
 Constructs an empty FloatingDialog object. More...
 
 FloatingDialog (const FloatingDialog &fd_)
 Constructs a new FloatingDialog object from an existing FloatingDialog object (copy constructor) More...
 
 FloatingDialog (const std::string &name_, const Size &size_)
 Constructs a FloatingDialog object with a given name and size. More...
 
virtual ~FloatingDialog ()
 Destructs a FloatingDialog object. More...
 
virtual FloatingDialogoperator= (const FloatingDialog &rhs_)
 Allows one FloatingDialog object to be assigned from another. More...
 
virtual FloatingDialogclone () const
 Convenience method to clone a FloatingDialog object on the heap. More...
 
virtual void destroy ()
 Destroys the UI floating dialog, converting the target object to an empty FloatingDialog object (see the default constructor for more info on empty FloatingDialog objects) More...
 
virtual PlatformFloatingDialogPtr platformFloatingDialog () const
 Gets the platform-specific floating dialog, around which the target object is wrapped. More...
 
virtual bool visible () const
 Gets whether the dialog is visible. More...
 
virtual void show ()
 Shows the floating dialog. More...
 
virtual void hide ()
 Hides the floating dialog. More...
 
virtual bool addWidget (const Widget &widget_)
 Adds a widget (label, button, text field, etc.) to the floating dialog. More...
 
virtual bool removeWidget (const Widget &widget_)
 Removes a widget (label, button, text field, etc.) from the floating dialog. More...
 
virtual std::string title () const
 Gets the current floating dialog title. More...
 
virtual void setTitle (const std::string &title_)
 Sets the current floating dialog title. More...
 
virtual Size size () const
 Gets the floating dialog's size. More...
 
virtual void setSize (const Size &size_)
 Sets the floating dialog's size. More...
 
virtual void update () const
 Forces the widgets in the floating dialog to update/redraw. More...
 
virtual Callback *const closeCallback () const
 Gets the current close button callback. More...
 
virtual void setCloseCallback (const Callback &cb_)
 Sets the close button callback for the dialog. More...
 
virtual Callback *const focusCallback () const
 Gets the current dialog focus callback. More...
 
void setFocusCallback (const Callback &cb_)
 Sets the dialog focus callback. More...
 
virtual Callback *const blurCallback () const
 Gets the current dialog blur callback. More...
 
void setBlurCallback (const Callback &cb_)
 Sets the dialog blur callback. More...
 
- Public Member Functions inherited from hdi::core::Window
virtual ~Window ()
 Destructs a Window object. More...
 
virtual bool isEmpty () const
 Gets whether the target Window object is empty (constructed with the default ctor) More...
 
virtual WindowType windowType ()
 Gets the type of window. More...
 
virtual bool operator== (const Window &rhs_) const
 Tests whether a given Window object is the same as another. More...
 
virtual bool operator!= (const Window &rhs_) const
 Tests whether a given Window object is not the same as another. More...
 
virtual const WidgetVector widgets () const
 Gets a list of all widgets contained by the target window. More...
 
virtual bool addWidgetGroup (const WidgetGroup &wg_)
 Adds a widget group to the window. More...
 
virtual bool removeWidgetGroup (const WidgetGroup &wg_)
 Removes a widget group from the window. More...
 
virtual TabOrder *const tabOrder () const
 Gets the tab order object for the window. More...
 

Additional Inherited Members

- Public Types inherited from hdi::core::Window
typedef std::vector< Widget * > WidgetVector
 
- Protected Member Functions inherited from hdi::core::Window
 Window ()
 Constructs an empty Window object. More...
 
 Window (const Window &w_)
 Constructs a new Window object from an existing Window object (copy constructor) More...
 
 Window (const WindowType type_)
 Constructs a Window object. More...
 
virtual Windowoperator= (const Window &)
 Internal use only. More...
 
- Protected Attributes inherited from hdi::core::Window
void * _data
 Private implementation data.
 

Detailed Description

Used to create and display a floating dialog to the user, which is similar to a modal dialog but non-blocking.

Constructor & Destructor Documentation

hdi::core::FloatingDialog::FloatingDialog ( )

Constructs an empty FloatingDialog object.

Author
GW
Date
07/2014
Note
To test if a FloatingDialog object is empty, call isEmpty() on it
Empty FloatingDialog objects do not relate to any actual UI dialog; they are designed to be "receivers" of some other FloatingDialog object via the overloaded assignment operator. Empty FloatingDialog objects are useless until such time (though it is safe to call any of their methods).
hdi::core::FloatingDialog::FloatingDialog ( const FloatingDialog fd_)

Constructs a new FloatingDialog object from an existing FloatingDialog object (copy constructor)

Author
GW
Date
07/2014
Parameters
fd_Existing FloatingDialog object
hdi::core::FloatingDialog::FloatingDialog ( const std::string &  name_,
const Size size_ 
)

Constructs a FloatingDialog object with a given name and size.

Author
GW
Date
07/2014
Parameters
name_Name (title) of the dialog, as UTF-8
size_Width and height
Note
All floating dialogs are presented in the center of the screen.
virtual hdi::core::FloatingDialog::~FloatingDialog ( )
virtual

Destructs a FloatingDialog object.

Author
GW
Date
07/2014

Member Function Documentation

virtual bool hdi::core::FloatingDialog::addWidget ( const Widget widget_)
virtual

Adds a widget (label, button, text field, etc.) to the floating dialog.

Author
GW
Date
07/2014
Parameters
widget_Widget to place in the dialog
Returns
true if the widget was added, false otherwise

Reimplemented from hdi::core::Window.

virtual Callback* const hdi::core::FloatingDialog::blurCallback ( ) const
virtual

Gets the current dialog blur callback.

Author
GW
Date
07/2014
Returns
A pointer to the currently registered blur callback, or NULL for none
virtual FloatingDialog* hdi::core::FloatingDialog::clone ( ) const
virtual

Convenience method to clone a FloatingDialog object on the heap.

Author
GW
Date
07/2014
Returns
A pointer to the new FloatingDialog object
Note
If you subclass FloatingDialog, you MUST overload this method yourself! If you don't and/or your clone() method does not return an instance of your FloatingDialog subclass, you will experience "object slicing" when e.g. adding the modal dialog to a window collection.
Warning
The caller must manage the memory for the returned FloatingDialog object.

Implements hdi::core::Window.

virtual Callback* const hdi::core::FloatingDialog::closeCallback ( ) const
virtual

Gets the current close button callback.

Author
GW
Date
07/2014
Returns
A pointer to the currently registered close button callback, or NULL for none
virtual void hdi::core::FloatingDialog::destroy ( )
virtual

Destroys the UI floating dialog, converting the target object to an empty FloatingDialog object (see the default constructor for more info on empty FloatingDialog objects)

Author
GW
Date
07/2014
Note
This method must be called for any existing floating dialogs by the time the plugin is shutting down. If you no longer retain any of your own references to a floating dialog then the lib will call this method for you as it is shutting down.
virtual Callback* const hdi::core::FloatingDialog::focusCallback ( ) const
virtual

Gets the current dialog focus callback.

Author
GW
Date
07/2014
Returns
A pointer to the currently registered focus callback, or NULL for none
virtual void hdi::core::FloatingDialog::hide ( )
virtual

Hides the floating dialog.

Author
GW
Date
07/2014
virtual FloatingDialog& hdi::core::FloatingDialog::operator= ( const FloatingDialog rhs_)
virtual

Allows one FloatingDialog object to be assigned from another.

Author
GW
Date
07/2014
Parameters
rhs_Righthand side of the = operator; the object to copy values from
Returns
The target FloatingDialog object, but with its value updated to match that of rhs_
virtual PlatformFloatingDialogPtr hdi::core::FloatingDialog::platformFloatingDialog ( ) const
virtual

Gets the platform-specific floating dialog, around which the target object is wrapped.

Author
GW
Date
07/2014
Returns
Pointer to platform-specific floating dialog. See PlatformFloatingDialogPtr typedef.
Note
Generally, you shouldn't need to call this method. Only use it if you know what you're doing. If a specific piece of UI functionality is not handled by this class (or related classes), then it should probably be added to the hdi_core library.
virtual bool hdi::core::FloatingDialog::removeWidget ( const Widget widget_)
virtual

Removes a widget (label, button, text field, etc.) from the floating dialog.

Author
GW
Date
07/2014
Parameters
widget_Widget to remove from the dialog
Returns
true if the widget was removed, false otherwise

Reimplemented from hdi::core::Window.

void hdi::core::FloatingDialog::setBlurCallback ( const Callback cb_)

Sets the dialog blur callback.

Author
GW
Date
07/2014
Parameters
cb_New callback (target and action) for when the dialog becomes blurred
virtual void hdi::core::FloatingDialog::setCloseCallback ( const Callback cb_)
virtual

Sets the close button callback for the dialog.

Author
GW
Date
07/2014
Parameters
cb_New callback (target and action) for when the close button is clicked
void hdi::core::FloatingDialog::setFocusCallback ( const Callback cb_)

Sets the dialog focus callback.

Author
GW
Date
07/2014
Parameters
cb_New callback (target and action) for when the dialog becomes focused
virtual void hdi::core::FloatingDialog::setSize ( const Size size_)
virtual

Sets the floating dialog's size.

Author
GW
Date
07/2014
Parameters
size_New dialog size
virtual void hdi::core::FloatingDialog::setTitle ( const std::string &  title_)
virtual

Sets the current floating dialog title.

Author
GW
Date
07/2014
Parameters
title_New string value for the floating dialog title, as UTF-8
virtual void hdi::core::FloatingDialog::show ( )
virtual

Shows the floating dialog.

Author
GW
Date
07/2014

Implements hdi::core::Window.

virtual Size hdi::core::FloatingDialog::size ( ) const
virtual

Gets the floating dialog's size.

Author
GW
Date
07/2014
Returns
A Size object representing the dialog's dimensions
virtual std::string hdi::core::FloatingDialog::title ( ) const
virtual

Gets the current floating dialog title.

Author
GW
Date
07/2014
Returns
String value for the floating dialog title, as UTF-8
virtual void hdi::core::FloatingDialog::update ( ) const
virtual

Forces the widgets in the floating dialog to update/redraw.

Author
GW
Date
07/2014

Implements hdi::core::Window.

virtual bool hdi::core::FloatingDialog::visible ( ) const
virtual

Gets whether the dialog is visible.

Author
GW
Date
07/2014
Returns
true if the dialog is visible, false otherwise

Implements hdi::core::Window.