# HG changeset patch
# User am@osimis.io
# Date 1529479539 -7200
# Node ID 126c9c0c9333196513e35b890971a0ecc0bbe2b8
# Parent b4642964c355acd1ba5aead7d81181be112a8d21
SimpleViewer demo running both with SDL and Wasm
diff -r b4642964c355 -r 126c9c0c9333 Applications/Samples/SampleList.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Applications/Samples/SampleList.h Wed Jun 20 09:25:39 2018 +0200
@@ -0,0 +1,37 @@
+// The macro "ORTHANC_STONE_SAMPLE" must be set by the CMake script
+
+#if ORTHANC_STONE_SAMPLE == 1
+#include "EmptyApplication.h"
+typedef OrthancStone::Samples::EmptyApplication Application;
+
+#elif ORTHANC_STONE_SAMPLE == 2
+#include "TestPatternApplication.h"
+typedef OrthancStone::Samples::TestPatternApplication Application;
+
+#elif ORTHANC_STONE_SAMPLE == 3
+#include "SingleFrameApplication.h"
+typedef OrthancStone::Samples::SingleFrameApplication Application;
+
+#elif ORTHANC_STONE_SAMPLE == 4
+#include "SingleVolumeApplication.h"
+typedef OrthancStone::Samples::SingleVolumeApplication Application;
+
+#elif ORTHANC_STONE_SAMPLE == 5
+#include "BasicPetCtFusionApplication.h"
+typedef OrthancStone::Samples::BasicPetCtFusionApplication Application;
+
+#elif ORTHANC_STONE_SAMPLE == 6
+#include "SynchronizedSeriesApplication.h"
+typedef OrthancStone::Samples::SynchronizedSeriesApplication Application;
+
+#elif ORTHANC_STONE_SAMPLE == 7
+#include "LayoutPetCtFusionApplication.h"
+typedef OrthancStone::Samples::LayoutPetCtFusionApplication Application;
+
+#elif ORTHANC_STONE_SAMPLE == 8
+#include "SimpleViewerApplication.h"
+typedef OrthancStone::Samples::SimpleViewerApplication Application;
+
+#else
+#error Please set the ORTHANC_STONE_SAMPLE macro
+#endif
diff -r b4642964c355 -r 126c9c0c9333 Applications/Samples/SampleMainWasm.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Applications/Samples/SampleMainWasm.cpp Wed Jun 20 09:25:39 2018 +0200
@@ -0,0 +1,37 @@
+/**
+ * Stone of Orthanc
+ * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
+ * Department, University Hospital of Liege, Belgium
+ * Copyright (C) 2017-2018 Osimis S.A., Belgium
+ *
+ * This program is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation, either version 3 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ **/
+
+#include "Platforms/Wasm/WasmWebService.h"
+#include "Platforms/Wasm/WasmViewport.h"
+
+#include
+
+#include "SampleList.h"
+
+
+OrthancStone::BasicWasmApplication* CreateUserApplication() {
+
+ printf("C++: CreateUserApplication\n");
+ OrthancStone::WidgetViewport* viewport = CreateWasmViewportFromCpp("canvas");
+ OrthancStone::WidgetViewport* viewport2 = CreateWasmViewportFromCpp("canvas2");
+ printf("C++: CreateUserApplication - wasm viewport created\n");
+
+ return new Application(viewport, viewport2);
+}
\ No newline at end of file
diff -r b4642964c355 -r 126c9c0c9333 Applications/Samples/Web/index.html
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Applications/Samples/Web/index.html Wed Jun 20 09:25:39 2018 +0200
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+ Wasm Samples
+
+
+
+