diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-03-26 11:21:43 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-03-26 12:28:07 +0200 |
commit | b0cf022ea75b763531e6ae63abccadf2bfa7a84b (patch) | |
tree | a113840f350f45c907d14597d5765f402201a164 /plugingui/testmain.cc | |
parent | a56b3d5eac05d0f51757d510553ad2d23b60235b (diff) |
Make plugingui test app nest the UI in a native window.
Diffstat (limited to 'plugingui/testmain.cc')
-rw-r--r-- | plugingui/testmain.cc | 19 |
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 |