view Platforms/Wasm/WasmViewport.cpp @ 785:67d0a8da4afe am-dev

made typescript more future-proof (not completed, I finally disabled a few warnings in my tsconfig.json)
author Alain Mazy <alain@mazy.be>
date Mon, 27 May 2019 22:41:51 +0200
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);
}