summaryrefslogtreecommitdiff
path: root/dgl/StandaloneWindow.hpp
diff options
context:
space:
mode:
authorfalkTX <falktx@gmail.com>2015-05-05 16:27:21 +0200
committerfalkTX <falktx@gmail.com>2015-05-05 16:27:21 +0200
commitc4008e33687ea8649ddf016dd6cac0733e5bc73e (patch)
tree464914b131d5306a620f32b018b22a24396c74bd /dgl/StandaloneWindow.hpp
parent37783ee192766e38a54c64641a442ab8a52e9d1a (diff)
Hide some implementation details on private structs
Diffstat (limited to 'dgl/StandaloneWindow.hpp')
-rw-r--r--dgl/StandaloneWindow.hpp50
1 files changed, 15 insertions, 35 deletions
diff --git a/dgl/StandaloneWindow.hpp b/dgl/StandaloneWindow.hpp
index 0a510413..72d6ea2b 100644
--- a/dgl/StandaloneWindow.hpp
+++ b/dgl/StandaloneWindow.hpp
@@ -29,47 +29,27 @@ class StandaloneWindow : public Application,
public Window
{
public:
- StandaloneWindow()
- : Application(),
- Window((Application&)*this),
- fWidget(nullptr) {}
+ /**
+ Constructor.
+ */
+ StandaloneWindow();
- void exec()
- {
- Window::show();
- Application::exec();
- }
-
-protected:
- void onReshape(uint width, uint height) override
- {
- if (fWidget != nullptr)
- fWidget->setSize(width, height);
- Window::onReshape(width, height);
- }
+ /**
+ Show window and execute application.
+ */
+ void exec();
private:
Widget* fWidget;
- void _addWidget(Widget* widget) override
- {
- if (fWidget == nullptr)
- {
- fWidget = widget;
- fWidget->fNeedsFullViewport = true;
- }
- Window::_addWidget(widget);
- }
+ /** @internal */
+ void onReshape(uint width, uint height) override;
+
+ /** @internal */
+ void _addWidget(Widget* widget) override;
- void _removeWidget(Widget* widget) override
- {
- if (fWidget == widget)
- {
- fWidget->fNeedsFullViewport = false;
- fWidget = nullptr;
- }
- Window::_removeWidget(widget);
- }
+ /** @internal */
+ void _removeWidget(Widget* widget) override;
DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(StandaloneWindow)
};