Builds a processor's editors. More...
#include <editor_host.hpp>
Public Member Functions | |
| virtual | ~EditorFactory ()=default |
| virtual bool | supports (EditorRole role) const =0 |
| Whether this factory builds editors for role. | |
| virtual std::unique_ptr< Editor > | create (Processor &processor, EditorContext &context, EditorRole role)=0 |
| A new, unattached editor for processor in role, or null when the role is not supported. | |
| virtual void | prewarm () |
| Warm process-wide caches (compiled scripts, parsed documents, fonts) so the first create() does not do that work inside the host's view-creation call. | |
Builds a processor's editors.
Owned by the processor (Processor::editor_factory()) and alive as long as the processor.
|
virtualdefault |
|
pure virtual |
A new, unattached editor for processor in role, or null when the role is not supported.
context outlives the editor. Several editors may be alive at once, for one role or several. processor is valid only until the host invalidates the editor or begins closing it for a departing plug-in instance (see Editor); state after that is reached through context, whose ports refuse calls once disconnected.
|
inlinevirtual |
Warm process-wide caches (compiled scripts, parsed documents, fonts) so the first create() does not do that work inside the host's view-creation call.
A host calls it at most once per factory, on a background thread, possibly while create() runs on the main thread; the factory synchronizes its own caches. It must not touch processor state or call the host. Default: nothing to warm.
|
pure virtual |
Whether this factory builds editors for role.