Mercurial > hg > orthanc-stone
view Platforms/Wasm/WasmViewport.cpp @ 1328:fd616c4a5904 broker
Added mechanism to prevent callbacks from being sent on dead WebAssemblyViewport objects
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 27 Mar 2020 12:54:27 +0100 |
parents | 4f2416d519b4 |
children |
line wrap: on
line source
#include "WasmViewport.h" #include <vector> #include <memory> std::vector<std::shared_ptr<Deprecated::WidgetViewport>> wasmViewports; void AttachWidgetToWasmViewport(const char* htmlCanvasId, Deprecated::IWidget* centralWidget) { std::shared_ptr<Deprecated::WidgetViewport> viewport(CreateWasmViewportFromCpp(htmlCanvasId)); viewport->SetCentralWidget(centralWidget); wasmViewports.push_back(viewport); }