summaryrefslogtreecommitdiff
path: root/plugingui/testmain.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-03-26 11:21:43 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-03-26 12:28:07 +0200
commitb0cf022ea75b763531e6ae63abccadf2bfa7a84b (patch)
treea113840f350f45c907d14597d5765f402201a164 /plugingui/testmain.cc
parenta56b3d5eac05d0f51757d510553ad2d23b60235b (diff)
Make plugingui test app nest the UI in a native window.
Diffstat (limited to 'plugingui/testmain.cc')
-rw-r--r--plugingui/testmain.cc19
1 files changed, 16 insertions, 3 deletions
diff --git a/plugingui/testmain.cc b/plugingui/testmain.cc
index b1697eb..0bbd21f 100644
--- a/plugingui/testmain.cc
+++ b/plugingui/testmain.cc
@@ -35,19 +35,32 @@
#include <hugin.hpp>
#include <settings.h>
+#include "window.h"
#include "mainwindow.h"
int main()
{
INFO(example, "We are up and running");
+ GUI::Window parent{nullptr};
+ parent.setCaption("PluginGui Test Application");
+
Settings settings;
- GUI::MainWindow main_window(settings, nullptr);
+ GUI::MainWindow main_window(settings, parent.getNativeWindowHandle());
+
+ parent.show();
main_window.show();
- main_window.resize(370, 330);
- while(main_window.processEvents())
+ parent.resize(370, 330);
+
+ while(true)
{
+ parent.eventHandler()->processEvents();
+ if(!main_window.processEvents())
+ {
+ break;
+ }
+
#if DG_PLATFORM == DG_PLATFORM_WINDOWS
SleepEx(50, FALSE);
#else