DISTRHO Plugin Framework
StandaloneWindow.hpp
1 /*
2  * DISTRHO Plugin Framework (DPF)
3  * Copyright (C) 2012-2015 Filipe Coelho <falktx@falktx.com>
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any purpose with
6  * or without fee is hereby granted, provided that the above copyright notice and this
7  * permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
10  * TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
11  * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
12  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
13  * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef DGL_STANDALONE_WINDOW_HPP_INCLUDED
18 #define DGL_STANDALONE_WINDOW_HPP_INCLUDED
19 
20 #include "Application.hpp"
21 #include "Widget.hpp"
22 #include "Window.hpp"
23 
24 START_NAMESPACE_DGL
25 
26 // -----------------------------------------------------------------------
27 
29  public Window
30 {
31 public:
32  /**
33  Constructor.
34  */
36 
37  /**
38  Show window and execute application.
39  */
40  void exec();
41 
42 private:
43  Widget* fWidget;
44 
45  /** @internal */
46  void onReshape(uint width, uint height) override;
47 
48  /** @internal */
49  void _addWidget(Widget* widget) override;
50 
51  /** @internal */
52  void _removeWidget(Widget* widget) override;
53 
54  DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(StandaloneWindow)
55 };
56 
57 // -----------------------------------------------------------------------
58 
59 END_NAMESPACE_DGL
60 
61 #endif // DGL_STANDALONE_WINDOW_HPP_INCLUDED
Definition: Window.hpp:30
Definition: StandaloneWindow.hpp:28
Definition: Application.hpp:41
Definition: Widget.hpp:59