Hot Door CORE  0.7.1
Adobe® Illustrator® Plug-in Library
hdicoreWindow.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_WINDOW__
8 #define __HDI_CORE_WINDOW__
9 
10 #include <vector>
11 
12 #include "hdicoreTypes.h"
13 
14 namespace hdi
15 {
16  namespace core
17  {
18  class TabOrder;
19  class Widget;
20  class WidgetGroup;
21 
25  class Window
26  {
27  public:
28  typedef std::vector< Widget* > WidgetVector;
29 
35  virtual ~Window();
36 
47  virtual Window* clone() const = 0;
48 
56  virtual bool isEmpty() const;
57 
67  virtual WindowType windowType();
68 
77  virtual bool operator==(const Window& rhs_) const;
78 
87  virtual bool operator!=(const Window& rhs_) const;
88 
96  virtual bool visible() const = 0;
97 
103  virtual void show() = 0;
104 
112  virtual const WidgetVector widgets() const;
113 
122  virtual bool addWidget(const Widget& widget_);
123 
132  virtual bool removeWidget(const Widget& widget_);
133 
142  virtual bool addWidgetGroup(const WidgetGroup& wg_);
143 
152  virtual bool removeWidgetGroup(const WidgetGroup& wg_);
153 
161  virtual TabOrder* const tabOrder() const;
162 
168  virtual void update() const = 0;
169 
185  virtual double scalingFactor() const;
186 
187 
188  protected:
192  void* _data;
193 
204  Window();
205 
216  Window(const Window& w_);
217 
225  Window(const WindowType type_);
226 
232  virtual Window& operator=(const Window&);
233  };
234 
235  typedef std::auto_ptr<Window> WindowAP;
236  }
237 }
238 
239 #endif
240 // __HDI_CORE_WINDOW__
Allows for finer control of widget focus/tab key ordering.
Definition: hdicoreTabOrder.h:23
Base class for all interface widgets; handles many common needs, e.g. text, position, size, etc.
Definition: hdicoreWidget.h:39
virtual ~Window()
Destructs a Window object.
virtual bool operator!=(const Window &rhs_) const
Tests whether a given Window object is not the same as another.
virtual bool addWidget(const Widget &widget_)
Adds a widget (label, button, text field, etc.) to the window.
virtual TabOrder *const tabOrder() const
Gets the tab order object for the window.
Window()
Constructs an empty Window object.
virtual void show()=0
Shows the window.
virtual Window & operator=(const Window &)
Internal use only.
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
WindowType
Describes the type of a Window object, allowing for proper casting to its subclass.
Definition: hdicoreTypes.h:344
virtual bool operator==(const Window &rhs_) const
Tests whether a given Window object is the same as another.
virtual const WidgetVector widgets() const
Gets a list of all widgets contained by the target window.
virtual double scalingFactor() const
Gets the factor by which the UI is scaled for the given window (i.e. for HiDPI support) ...
virtual void update() const =0
Forces the widgets in the modal dialog to update/redraw.
virtual bool isEmpty() const
Gets whether the target Window object is empty (constructed with the default ctor) ...
Definition: hdicoreaiArray.h:12
void * _data
Private implementation data.
Definition: hdicoreWindow.h:192
virtual bool removeWidget(const Widget &widget_)
Removes a widget (label, button, text field, etc.) from the window.
virtual bool removeWidgetGroup(const WidgetGroup &wg_)
Removes a widget group from the window.
virtual bool addWidgetGroup(const WidgetGroup &wg_)
Adds a widget group to the window.
Allows for grouping widgets together, such that all can be added to a window in one call...
Definition: hdicoreWidgetGroup.h:25
virtual bool visible() const =0
Gets whether the window is visible.
Used as a base class for modal dialogs, panels, and control bars.
Definition: hdicoreWindow.h:25
virtual Window * clone() const =0
Convenience method to clone a Window object, taking its subclass type into account for proper memory ...
virtual WindowType windowType()
Gets the type of window.