annotate Platforms/Wasm/WasmViewport.cpp @ 242:092db46c6291 am

improved SDL/Wasm unification
author am@osimis.io
date Wed, 20 Jun 2018 14:20:55 +0200
parents
children 4f2416d519b4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
242
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
1 #include "WasmViewport.h"
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
2
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
3 #include <vector>
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
4 #include <memory>
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
5
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
6 std::vector<std::shared_ptr<OrthancStone::WidgetViewport>> wasmViewports;
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
7
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
8 void AttachWidgetToWasmViewport(const char* htmlCanvasId, OrthancStone::IWidget* centralWidget) {
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
9 std::shared_ptr<OrthancStone::WidgetViewport> viewport(CreateWasmViewportFromCpp(htmlCanvasId));
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
10 viewport->SetCentralWidget(centralWidget);
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
11
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
12 wasmViewports.push_back(viewport);
092db46c6291 improved SDL/Wasm unification
am@osimis.io
parents:
diff changeset
13 }