Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
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
14namespace 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< std::shared_ptr<Widget> > WidgetVector;
29
35 virtual ~Window();
36
47 virtual Window* clone() const = 0;
48
56 virtual bool isEmpty() const;
57
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
181 virtual double scalingFactor() const;
182
183
184 protected:
188 void* _data;
189
201
212 Window(const Window& w_);
213
221 Window(const WindowType type_);
222
228 virtual Window& operator=(const Window&);
229 };
230
231 typedef std::unique_ptr<Window> WindowUP;
232 typedef std::shared_ptr<Window> WindowSP;
233 typedef std::weak_ptr<Window> WindowWP;
234 }
235}
236
237#endif
238// __HDI_CORE_WINDOW__
Allows for finer control of widget focus/tab key ordering.
Definition: hdicoreTabOrder.h:24
Allows for grouping widgets together, such that all can be added to a window in one call,...
Definition: hdicoreWidgetGroup.h:26
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
virtual TabOrder *const tabOrder() const
Gets the tab order object for the window.
virtual bool addWidgetGroup(const WidgetGroup &wg_)
Adds a widget group to the window.
void * _data
Private implementation data.
Definition: hdicoreWindow.h:188
virtual Window * clone() const =0
Convenience method to clone a Window object, taking its subclass type into account for proper memory ...
virtual void update() const =0
Forces the widgets in the modal dialog to update/redraw.
Window(const Window &w_)
Constructs a new Window object from an existing Window object (copy constructor)
virtual bool operator==(const Window &rhs_) const
Tests whether a given Window object is the same as another.
virtual double scalingFactor() const
Gets the factor by which the UI is scaled for the given window (i.e. for HiDPI support)
Window()
Constructs an empty Window object.
virtual bool isEmpty() const
Gets whether the target Window object is empty (constructed with the default ctor)
virtual bool addWidget(const Widget &widget_)
Adds a widget (label, button, text field, etc.) to the window.
virtual bool removeWidgetGroup(const WidgetGroup &wg_)
Removes a widget group from the window.
Window(const WindowType type_)
Constructs a Window object.
virtual const WidgetVector widgets() const
Gets a list of all widgets contained by the target window.
virtual bool operator!=(const Window &rhs_) const
Tests whether a given Window object is not the same as another.
virtual void show()=0
Shows the window.
virtual bool removeWidget(const Widget &widget_)
Removes a widget (label, button, text field, etc.) from the window.
virtual bool visible() const =0
Gets whether the window is visible.
virtual WindowType windowType()
Gets the type of window.
virtual ~Window()
Destructs a Window object.
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:822