Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
hdi::core::Window Class Referenceabstract

Used as a base class for modal dialogs, panels, and control bars. More...

#include <hdicoreWindow.h>

Inheritance diagram for hdi::core::Window:
Inheritance graph
[legend]

Public Types

typedef std::vector< Widget * > WidgetVector
 

Public Member Functions

virtual ~Window ()
 Destructs a Window object. More...
 
virtual Windowclone () const =0
 Convenience method to clone a Window object, taking its subclass type into account for proper memory management. 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 bool visible () const =0
 Gets whether the window is visible. More...
 
virtual void show ()=0
 Shows the window. More...
 
virtual const WidgetVector widgets () const
 Gets a list of all widgets contained by the target window. More...
 
virtual bool addWidget (const Widget &widget_)
 Adds a widget (label, button, text field, etc.) to the window. More...
 
virtual bool removeWidget (const Widget &widget_)
 Removes a widget (label, button, text field, etc.) from the 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...
 
virtual void update () const =0
 Forces the widgets in the modal dialog to update/redraw. More...
 

Protected Member Functions

 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

void * _data
 Private implementation data.
 

Detailed Description

Used as a base class for modal dialogs, panels, and control bars.

Constructor & Destructor Documentation

virtual hdi::core::Window::~Window ( )
virtual

Destructs a Window object.

Author
GW
Date
09/2013
hdi::core::Window::Window ( )
protected

Constructs an empty Window object.

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

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

Author
GW
Date
10/2013
Parameters
w_Existing Window object
Note
This constructor should not be called directly; subclasses should "overload" it and call another ctor.
hdi::core::Window::Window ( const WindowType  type_)
protected

Constructs a Window object.

Author
GW
Date
09/2013
Parameters
type_Type of window that is being constructed (indicative of the Window subclass)

Member Function Documentation

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

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

Author
GW
Date
09/2013
Parameters
widget_Widget to place in the window
Returns
true if the widget could be added, false otherwise

Reimplemented in hdi::core::ModalDialog, hdi::core::Panel, hdi::core::ControlBar, and hdi::core::FloatingDialog.

virtual bool hdi::core::Window::addWidgetGroup ( const WidgetGroup wg_)
virtual

Adds a widget group to the window.

Author
GW
Date
02/2015
Parameters
wg_Widget group to place in the window
Returns
true if the widgets could be added, false otherwise
virtual Window* hdi::core::Window::clone ( ) const
pure virtual

Convenience method to clone a Window object, taking its subclass type into account for proper memory management.

Author
GW
Date
10/2013
Returns
A pointer to the new Window object
Warning
The caller must manage the memory for the returned Window object.

Implemented in hdi::core::ModalDialog, hdi::core::Panel, hdi::core::ControlBar, and hdi::core::FloatingDialog.

virtual bool hdi::core::Window::isEmpty ( ) const
virtual

Gets whether the target Window object is empty (constructed with the default ctor)

Author
GW
Date
09/2013
Returns
true if the target Window object is empty, false otherwise
virtual bool hdi::core::Window::operator!= ( const Window rhs_) const
virtual

Tests whether a given Window object is not the same as another.

Author
GW
Date
09/2013
Parameters
rhs_Window to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different UI windows, false otherwise
virtual Window& hdi::core::Window::operator= ( const Window )
protectedvirtual

Internal use only.

Author
GW
Date
12/2014
virtual bool hdi::core::Window::operator== ( const Window rhs_) const
virtual

Tests whether a given Window object is the same as another.

Author
GW
Date
09/2013
Parameters
rhs_Window to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same UI window, false otherwise
virtual bool hdi::core::Window::removeWidget ( const Widget widget_)
virtual

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

Author
GW
Date
09/2013
Parameters
widget_Widget to remove from the window
Returns
true if the widget was removed, false otherwise

Reimplemented in hdi::core::ModalDialog, hdi::core::Panel, hdi::core::ControlBar, and hdi::core::FloatingDialog.

virtual bool hdi::core::Window::removeWidgetGroup ( const WidgetGroup wg_)
virtual

Removes a widget group from the window.

Author
GW
Date
02/2015
Parameters
wg_Widget group to remove from the window
Returns
true if the widgets were removed, false otherwise
virtual void hdi::core::Window::show ( )
pure virtual

Shows the window.

Author
GW
Date
09/2013

Implemented in hdi::core::ModalDialog, hdi::core::Panel, hdi::core::FloatingDialog, and hdi::core::ControlBar.

virtual TabOrder* const hdi::core::Window::tabOrder ( ) const
virtual

Gets the tab order object for the window.

Author
GW
Date
10/2013
Returns
A pointer to the TabOrder object for the target window (all Window objects have one)
virtual void hdi::core::Window::update ( ) const
pure virtual

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

Author
GW
Date
09/2013

Implemented in hdi::core::ModalDialog, hdi::core::Panel, hdi::core::ControlBar, and hdi::core::FloatingDialog.

virtual bool hdi::core::Window::visible ( ) const
pure virtual

Gets whether the window is visible.

Author
GW
Date
09/2013
Returns
true if the window is visible, false otherwise

Implemented in hdi::core::ModalDialog, hdi::core::Panel, hdi::core::ControlBar, and hdi::core::FloatingDialog.

virtual const WidgetVector hdi::core::Window::widgets ( ) const
virtual

Gets a list of all widgets contained by the target window.

Author
GW
Date
09/2013
Returns
A list of all widgets contained by the window
virtual WindowType hdi::core::Window::windowType ( )
virtual

Gets the type of window.

Author
GW
Date
09/2013
Returns
The type of the window
Note
This is useful for knowing how to cast a Window object to its proper subclass