FEditorDockPanelRegistry
Same stable-address contract as the registry above: Find hands out a pointer into the storage and callers dispatch through it, so descriptors live in a deque and a re-registration retires the old entry rather than destroying a std::function that may be running.
- Module
- EditorFramework
- Header
#include "EditorFramework/EditorPanelRegistry.h"- Namespace
Mowo
The instance is defined in the EditorFramework library. It used to be a function-local static in this header, which is one instance per image that includes it: a plugin DLL would have registered into its own copy and the editor would never have seen the panel.
Public functions
| Returns | Name | Description |
|---|---|---|
FEditorDockPanelRegistry& | Get | |
void | Register | |
void | Unregister | A plugin calls this from its ShutdownModule. |
void | SetUnregisterHandler | Installed by the editor: closes and releases every live instance of a kind that is about to be unregistered. |
uint32_t | Revision | Bumped by every registration, so a menu built from All() can tell that a plugin enabled after startup added a panel it does not list yet. |
const FEditorDockPanelDesc* | Find | |
std::vector<const FEditorDockPanelDesc*> | All |
Function details
Get
static FEditorDockPanelRegistry& Get()Register
void Register(FEditorDockPanelDesc desc)Unregister
void Unregister(const std::string& kind)A plugin calls this from its ShutdownModule. The factory is code inside the plugin's DLL, so it has to be destroyed while that DLL is still mapped — a std::function destroyed after the unload calls into freed pages. The entry itself is retired, not erased, so a pointer Find handed out earlier stays readable; its Create is simply empty. Live panels go first, through the handler the editor installs: their widgets, and the shared-pointer control blocks that own them, were allocated by the plugin's code too.
SetUnregisterHandler
void SetUnregisterHandler(std::function<void(const std::string& kind)> handler)Installed by the editor: closes and releases every live instance of a kind that is about to be unregistered.
Revision
uint32_t Revision() constBumped by every registration, so a menu built from All() can tell that a plugin enabled after startup added a panel it does not list yet.
Find
const FEditorDockPanelDesc* Find(const std::string& kind) constAll
std::vector<const FEditorDockPanelDesc*> All() const