summaryrefslogtreecommitdiff
path: root/plugingui/testmain.cc
diff options
context:
space:
mode:
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