What the host gives an editor.
More...
#include <editor_host.hpp>
|
| virtual | ~EditorContext ()=default |
| virtual ParamPort & | params ()=0 |
| | Parameter access. Several editors may share one port.
|
| virtual VisualPort * | visuals ()=0 |
| | The processor's published values and meters, or null when it declares none.
|
| virtual bool | request_resize (const EditorSize &size)=0 |
| | Ask the host to resize the editor's window to size.
|
| virtual bool | host_action (const HostActionRequest &request)=0 |
| | Ask the host to take request.
|
| virtual EditorHostKind | host_kind () const =0 |
| | Whether the editor runs inside a plug-in host or the standalone app.
|
| virtual void * | query_extension (std::string_view) |
| | A host capability beyond the members above, by stable string id, or null when this host does not offer it.
|
What the host gives an editor.
Implemented by the host; outlives every editor created with it. Main thread.
◆ ~EditorContext()
| virtual pulp::format::EditorContext::~EditorContext |
( |
| ) |
|
|
virtualdefault |
◆ host_action()
| virtual bool pulp::format::EditorContext::host_action |
( |
const HostActionRequest & | request | ) |
|
|
pure virtual |
Ask the host to take request.
False when the host does not support that action or declined it.
◆ host_kind()
| virtual EditorHostKind pulp::format::EditorContext::host_kind |
( |
| ) |
const |
|
pure virtual |
Whether the editor runs inside a plug-in host or the standalone app.
◆ params()
| virtual ParamPort & pulp::format::EditorContext::params |
( |
| ) |
|
|
pure virtual |
Parameter access. Several editors may share one port.
◆ query_extension()
| virtual void * pulp::format::EditorContext::query_extension |
( |
std::string_view | | ) |
|
|
inlinevirtual |
A host capability beyond the members above, by stable string id, or null when this host does not offer it.
This is how the contract grows without breaking prebuilt editors or hosts: appending a virtual to this class would shift the vtable an editor built against an older header calls through, while a new capability added here is just a new id. The id names an interface documented next to it (a reverse-DNS string such as "dev.pulp.editor.example/1", versioned in the id itself); the returned pointer is that interface, owned by the host and valid while this context lives. An editor that does not know an id never asks for it, and a host that does not know one returns null.
The GPU device is not reached this way: an editor acquires it from the shared GPU runtime with a role tag.
◆ request_resize()
| virtual bool pulp::format::EditorContext::request_resize |
( |
const EditorSize & | size | ) |
|
|
pure virtual |
Ask the host to resize the editor's window to size.
True when the host accepted; the host then calls Editor::set_size(). False when the host refuses or cannot resize; the editor keeps its current size.
◆ visuals()
| virtual VisualPort * pulp::format::EditorContext::visuals |
( |
| ) |
|
|
pure virtual |
The processor's published values and meters, or null when it declares none.
The documentation for this class was generated from the following file:
- /home/runner/work/pulp/pulp/core/format/include/pulp/format/editor_host.hpp