diff Applications/Sdl/BasicSdlApplicationContext.cpp @ 233:68856534f005 am

added layout to VSOL, SDL & wasm working
author am@osimis.io
date Fri, 15 Jun 2018 14:29:25 +0200
parents 84844649a8fd
children 092db46c6291
line wrap: on
line diff
--- a/Applications/Sdl/BasicSdlApplicationContext.cpp	Fri Jun 15 11:23:04 2018 +0200
+++ b/Applications/Sdl/BasicSdlApplicationContext.cpp	Fri Jun 15 14:29:25 2018 +0200
@@ -25,7 +25,7 @@
 {
   IWidget& BasicSdlApplicationContext::SetCentralWidget(IWidget* widget)   // Takes ownership
   {
-    centralViewport_.SetCentralWidget(widget);
+    centralViewport_->SetCentralWidget(widget);
     return *widget;
   }
 
@@ -44,10 +44,11 @@
   }
   
 
-  BasicSdlApplicationContext::BasicSdlApplicationContext(Orthanc::WebServiceParameters& orthanc) :
+  BasicSdlApplicationContext::BasicSdlApplicationContext(Orthanc::WebServiceParameters& orthanc, WidgetViewport* centralViewport) :
     oracle_(viewportMutex_, 4),  // Use 4 threads to download
     //oracle_(viewportMutex_, 1),  // Disable threading to be reproducible
     webService_(oracle_, orthanc),
+    centralViewport_(centralViewport),
     stopped_(true),
     updateDelay_(100)   // By default, 100ms between each refresh of the content
   {
@@ -59,7 +60,7 @@
   {
     oracle_.Start();
 
-    if (centralViewport_.HasUpdateContent())
+    if (centralViewport_->HasUpdateContent())
     {
       stopped_ = false;
       updateThread_ = boost::thread(UpdateThread, this);