MeshLib Documentation
Loading...
Searching...
No Matches
MRWasmUnavailablePlugin.h
Go to the documentation of this file.
1#pragma once
2#ifdef __EMSCRIPTEN__
3#include "MRCommonPlugins/exports.h"
8#include "MRPch/MRWasm.h"
9
10namespace MR
11{
12
13class WasmUnavailableObjectVoxels
14{
15public:
16 constexpr static const char* TypeName() noexcept { return "ObjectVoxels"; }
17};
18
19class MRCOMMONPLUGINS_CLASS WasmUnavailableItem : public RibbonMenuItem
20{
21public:
22 WasmUnavailableItem( const std::string& name ) :
23 RibbonMenuItem( name ) {}
24
25 virtual bool action() override
26 {
27 showDownloadWindow_();
28 return false;
29 }
30
31 EMSCRIPTEN_KEEPALIVE void showDownloadWindow_()
32 {
33 #pragma clang diagnostic push
34#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
35 EM_ASM( showDownloadWindow() );
36#pragma clang diagnostic pop
37 }
38};
39
40}
41
42#define MR_REGISTER_WASM_UNAVAILABLE_ITEM( pluginType, name )\
43 static MR::RibbonMenuItemAdder<MR::WasmUnavailableItem> ribbonMenuItemAdder##pluginType##_(name);
44
45#endif
std::string name(const T &primitive)
Definition MRFeatures.h:297
Definition MRCameraOrientationPlugin.h:8