An convenience wrapper around an event to send to a webview.
More...
#include <mostlyharmless_WebEvent.h>
An convenience wrapper around an event to send to a webview.
◆ WebEvent() [1/2]
mostly_harmless::events::WebEvent::WebEvent |
( |
std::string | id_, |
|
|
nlohmann::json | content_ ) |
Constructs a WebEvent from an id, and some json.
- Parameters
-
id_ | Some name the event should have - useful for js CustomEvents, etc. |
content_ | The json content for the event. |
◆ WebEvent() [2/2]
Constructs a WebEvent from a ProcToGuiParamEvent. Sets id to param, and content to:
{
"paramId": The event's pid,
"value" The event's value
}
- Parameters
-
◆ content
nlohmann::json mostly_harmless::events::WebEvent::content |
The event's json content.
◆ id
std::string mostly_harmless::events::WebEvent::id |
The documentation for this struct was generated from the following file: