Composition model shared by project-specific developer and runtime editors. 更多...
#include <EditorWorkspace.h>
Public 成员函数 | |
| EditorWorkspace (std::string id, std::string title) | |
| Create a workspace with stable identity and display title. | |
| const std::string & | getId () const |
| Stable project-defined workspace id. | |
| const std::string & | getTitle () const |
| User-facing workspace title. | |
| void | setTitle (const std::string &title) |
| Change the display title without changing workspace identity. | |
| Result< WorkspacePanelDescriptor > | registerPanel (WorkspacePanelDescriptor descriptor) |
| Register a checked owning panel descriptor. | |
| Result< WorkspacePanelDescriptor > | movePanel (const StableId &id, WorkspaceRegion region, int order) |
| Move a panel using a strongly typed dock region. | |
| Result< WorkspacePanelDescriptor > | removePanel (const StableId &id) |
| Remove a panel and return its final owning descriptor. | |
| Result< WorkspacePanelDescriptor > | activatePanel (const StableId &id) |
| Activate a visible panel with structured not-found/rejected results. | |
| Result< WorkspacePanelDescriptor > | panelAt (std::size_t index) const |
| Return an owning panel snapshot instead of an ambiguous empty field. | |
| bool | registerPanel (const std::string &id, const std::string &title, const std::string ®ion, int order) |
| Register a panel descriptor. | |
| bool | removePanel (const std::string &id) |
| Remove a panel descriptor by id. | |
| void | clearPanels () |
| Remove every panel descriptor. | |
| bool | movePanel (const std::string &id, const std::string ®ion, int order) |
| Compatibility-only string/boolean facade over movePanel(id, region, order). | |
| bool | setPanelCapability (const std::string &id, const std::string &capability) |
| Attach a capability requirement used by the host when filtering panels. | |
| bool | setPanelContext (const std::string &id, const std::string &context) |
| Attach a semantic input context such as scene, graph, or timeline. | |
| bool | setPanelVisible (const std::string &id, bool visible) |
| Show or hide a panel without removing its descriptor. | |
| bool | setPanelSingleton (const std::string &id, bool singleton) |
| Mark whether hosts should allow more than one instance of this panel type. | |
| bool | activatePanel (const std::string &id) |
| Make a registered visible panel the active semantic surface. | |
| const std::string & | getActivePanel () const |
| Active panel id, or an empty string. | |
| int | getPanelCount () const |
| Number of registered panels in deterministic region/order/id order. | |
| std::string | getPanelId (int index) const |
| Panel id by deterministic index. | |
| std::string | getPanelTitle (int index) const |
| Panel title by deterministic index. | |
| std::string | getPanelRegion (int index) const |
| Panel dock region by deterministic index. | |
| std::string | getPanelCapability (int index) const |
| Panel capability requirement by deterministic index. | |
| std::string | getPanelContext (int index) const |
| Panel input context by deterministic index. | |
| int | getPanelOrder (int index) const |
| Panel order by deterministic index. | |
| bool | getPanelVisible (int index) const |
| Panel visibility by deterministic index. | |
| bool | getPanelSingleton (int index) const |
| Panel singleton policy by deterministic index. | |
| void | setRegionSize (const std::string ®ion, float pixels) |
| Configure one standard dock region size in pixels. | |
| void | layout (float width, float height) |
| Compute standard dock rectangles for the requested host size. | |
| float | getRegionX (const std::string ®ion) const |
| Computed region X coordinate. | |
| float | getRegionY (const std::string ®ion) const |
| Computed region Y coordinate. | |
| float | getRegionW (const std::string ®ion) const |
| Computed region width. | |
| float | getRegionH (const std::string ®ion) const |
| Computed region height. | |
| bool | setMode (const std::string &mode) |
| Set a project-defined mode such as edit, play, material, or animation. | |
| Result< StableId > | setModeId (StableId mode) |
| Set a strongly identified workspace mode. | |
| const std::string & | getMode () const |
| Current project-defined mode. | |
| bool | select (const std::string &channel, const std::string &domain, const std::string &target, const std::string &item, const std::string &type, bool additive) |
| Select one stable item in a semantic channel. | |
| Result< SelectionSnapshot > | selectItem (std::string channel, SelectionItem item, bool additive) |
| Select one already typed item without string domain parsing. | |
| bool | clearSelection (const std::string &channel) |
| Clear one semantic selection channel. | |
| Result< SelectionSnapshot > | clearSelectionChecked (const std::string &channel) |
| Clear one selection channel without discarding diagnostics. | |
| int | getSelectionCount (const std::string &channel) const |
| Number of selected items in a channel. | |
| std::string | getSelectionItem (const std::string &channel, int index) const |
| Selected stable item id by channel/index. | |
| std::string | getSelectionType (const std::string &channel, int index) const |
| Selected item type by channel/index. | |
| std::string | getPrimarySelection (const std::string &channel) const |
| Primary selected item id for a channel. | |
| std::uint64_t | getSelectionSequence (const std::string &channel) const |
| Monotonic selection sequence for MVVM change detection. | |
| bool | focus (const std::string &channel, const std::string &surface, const std::string &item) |
| Set UI-toolkit-independent focus for a channel. | |
| Result< EditorFocusSnapshot > | focusItem (const std::string &channel, StableId surface, StableId item) |
| Focus a strongly identified surface and item without discarding diagnostics. | |
| std::string | getFocusedSurface (const std::string &channel) const |
| Focused surface id for a channel. | |
| std::uint64_t | getRevision () const |
| Monotonic structural revision for cheap ViewModel synchronization. | |
详细描述
Composition model shared by project-specific developer and runtime editors.
The workspace deliberately contains no rendering or widget code. Games register semantic panels and render the descriptors with ui, an external toolkit, or an automation host. Selection and focus use the same channelled V2 services used by command/property providers, so a custom editor and an in-game builder can share their model without sharing a pixel layout.
在文件 EditorWorkspace.h 第 43 行定义.
构造及析构函数说明
◆ EditorWorkspace()
| eve::editor::EditorWorkspace::EditorWorkspace | ( | std::string | id, |
| std::string | title | ||
| ) |
Create a workspace with stable identity and display title.
在文件 EditorWorkspace.cpp 第 34 行定义.
成员函数说明
◆ activatePanel() [1/2]
| Result< WorkspacePanelDescriptor > eve::editor::EditorWorkspace::activatePanel | ( | const StableId & | id | ) |
Activate a visible panel with structured not-found/rejected results.
在文件 EditorWorkspace.cpp 第 169 行定义.
引用了 eve::Status::success(), eve::Result< T >::success(), value , 以及 eve::editor::WorkspacePanelDescriptor::visible.
被这些函数引用 activatePanel(), eve::procgen_editor::MeshModifierEditor::activateTool(), eve::animation_editor::AnimationClipEditor::configureWorkspace(), eve::audio_editor::AudioSourceEditor::configureWorkspace(), eve::avatar_editor::AvatarDocumentEditor::configureWorkspace(), eve::biome_editor::BiomeRulesEditor::configureWorkspace(), eve::procgen_editor::MeshModifierEditor::configureWorkspace(), eve::procgen_editor::ProcgenScriptEditor::configureWorkspace(), eve::ui_editor::UiThemeEditor::configureWorkspace(), eve::voxel_editor::VoxelCatalogEditor::configureWorkspace() , 以及 eve::editor::ActionTimelineEditor::configureWorkspace().
◆ activatePanel() [2/2]
| bool eve::editor::EditorWorkspace::activatePanel | ( | const std::string & | id | ) |
Make a registered visible panel the active semantic surface.
在文件 EditorWorkspace.cpp 第 165 行定义.
引用了 activatePanel().
◆ clearPanels()
| void eve::editor::EditorWorkspace::clearPanels | ( | ) |
Remove every panel descriptor.
在文件 EditorWorkspace.cpp 第 90 行定义.
◆ clearSelection()
| bool eve::editor::EditorWorkspace::clearSelection | ( | const std::string & | channel | ) |
Clear one semantic selection channel.
在文件 EditorWorkspace.cpp 第 277 行定义.
◆ clearSelectionChecked()
| Result< SelectionSnapshot > eve::editor::EditorWorkspace::clearSelectionChecked | ( | const std::string & | channel | ) |
Clear one selection channel without discarding diagnostics.
在文件 EditorWorkspace.cpp 第 281 行定义.
引用了 eve::editor::EditorSelectionService::clear().
被这些函数引用 clearSelection().
◆ focus()
| bool eve::editor::EditorWorkspace::focus | ( | const std::string & | channel, |
| const std::string & | surface, | ||
| const std::string & | item | ||
| ) |
◆ focusItem()
| Result< EditorFocusSnapshot > eve::editor::EditorWorkspace::focusItem | ( | const std::string & | channel, |
| StableId | surface, | ||
| StableId | item | ||
| ) |
Focus a strongly identified surface and item without discarding diagnostics.
在文件 EditorWorkspace.cpp 第 318 行定义.
引用了 eve::editor::EditorFocusService::focus().
被这些函数引用 eve::procgen_editor::MeshModifierEditor::activateTool() , 以及 focus().
◆ getActivePanel()
|
inline |
Active panel id, or an empty string.
在文件 EditorWorkspace.h 第 90 行定义.
◆ getFocusedSurface()
| std::string eve::editor::EditorWorkspace::getFocusedSurface | ( | const std::string & | channel | ) | const |
Focused surface id for a channel.
在文件 EditorWorkspace.cpp 第 325 行定义.
引用了 eve::editor::EditorFocusService::snapshot(), eve::editing::FocusSnapshot::surface , 以及 eve::UuidIdAdapter< Tag >::value().
◆ getId()
|
inline |
Stable project-defined workspace id.
在文件 EditorWorkspace.h 第 49 行定义.
◆ getMode()
|
inline |
Current project-defined mode.
在文件 EditorWorkspace.h 第 129 行定义.
◆ getPanelCapability()
| std::string eve::editor::EditorWorkspace::getPanelCapability | ( | int | index | ) | const |
◆ getPanelContext()
| std::string eve::editor::EditorWorkspace::getPanelContext | ( | int | index | ) | const |
◆ getPanelCount()
|
inline |
Number of registered panels in deterministic region/order/id order.
在文件 EditorWorkspace.h 第 93 行定义.
◆ getPanelId()
| std::string eve::editor::EditorWorkspace::getPanelId | ( | int | index | ) | const |
◆ getPanelOrder()
| int eve::editor::EditorWorkspace::getPanelOrder | ( | int | index | ) | const |
◆ getPanelRegion()
| std::string eve::editor::EditorWorkspace::getPanelRegion | ( | int | index | ) | const |
◆ getPanelSingleton()
| bool eve::editor::EditorWorkspace::getPanelSingleton | ( | int | index | ) | const |
◆ getPanelTitle()
| std::string eve::editor::EditorWorkspace::getPanelTitle | ( | int | index | ) | const |
◆ getPanelVisible()
| bool eve::editor::EditorWorkspace::getPanelVisible | ( | int | index | ) | const |
◆ getPrimarySelection()
| std::string eve::editor::EditorWorkspace::getPrimarySelection | ( | const std::string & | channel | ) | const |
Primary selected item id for a channel.
在文件 EditorWorkspace.cpp 第 305 行定义.
引用了 eve::editing::SelectionSnapshot::primary , 以及 eve::editor::EditorSelectionService::snapshot().
◆ getRegionH()
| float eve::editor::EditorWorkspace::getRegionH | ( | const std::string & | region | ) | const |
Computed region height.
在文件 EditorWorkspace.cpp 第 238 行定义.
◆ getRegionW()
| float eve::editor::EditorWorkspace::getRegionW | ( | const std::string & | region | ) | const |
Computed region width.
在文件 EditorWorkspace.cpp 第 237 行定义.
◆ getRegionX()
| float eve::editor::EditorWorkspace::getRegionX | ( | const std::string & | region | ) | const |
Computed region X coordinate.
在文件 EditorWorkspace.cpp 第 235 行定义.
◆ getRegionY()
| float eve::editor::EditorWorkspace::getRegionY | ( | const std::string & | region | ) | const |
Computed region Y coordinate.
在文件 EditorWorkspace.cpp 第 236 行定义.
◆ getRevision()
|
inline |
Monotonic structural revision for cheap ViewModel synchronization.
在文件 EditorWorkspace.h 第 162 行定义.
◆ getSelectionCount()
| int eve::editor::EditorWorkspace::getSelectionCount | ( | const std::string & | channel | ) | const |
Number of selected items in a channel.
在文件 EditorWorkspace.cpp 第 287 行定义.
引用了 eve::editing::SelectionSnapshot::items , 以及 eve::editor::EditorSelectionService::snapshot().
◆ getSelectionItem()
| std::string eve::editor::EditorWorkspace::getSelectionItem | ( | const std::string & | channel, |
| int | index | ||
| ) | const |
Selected stable item id by channel/index.
在文件 EditorWorkspace.cpp 第 291 行定义.
引用了 index, eve::editing::SelectionSnapshot::items , 以及 eve::editor::EditorSelectionService::snapshot().
◆ getSelectionSequence()
| std::uint64_t eve::editor::EditorWorkspace::getSelectionSequence | ( | const std::string & | channel | ) | const |
Monotonic selection sequence for MVVM change detection.
在文件 EditorWorkspace.cpp 第 310 行定义.
引用了 eve::editing::SelectionSnapshot::sequence , 以及 eve::editor::EditorSelectionService::snapshot().
◆ getSelectionType()
| std::string eve::editor::EditorWorkspace::getSelectionType | ( | const std::string & | channel, |
| int | index | ||
| ) | const |
Selected item type by channel/index.
在文件 EditorWorkspace.cpp 第 298 行定义.
引用了 index, eve::editing::SelectionSnapshot::items, eve::editor::EditorSelectionService::snapshot() , 以及 type.
◆ getTitle()
|
inline |
User-facing workspace title.
在文件 EditorWorkspace.h 第 51 行定义.
◆ layout()
| void eve::editor::EditorWorkspace::layout | ( | float | width, |
| float | height | ||
| ) |
Compute standard dock rectangles for the requested host size.
在文件 EditorWorkspace.cpp 第 233 行定义.
引用了 height, eve::editor::EditorDock::layout() , 以及 width.
◆ movePanel() [1/2]
| Result< WorkspacePanelDescriptor > eve::editor::EditorWorkspace::movePanel | ( | const StableId & | id, |
| WorkspaceRegion | region, | ||
| int | order | ||
| ) |
Move a panel using a strongly typed dock region.
在文件 EditorWorkspace.cpp 第 102 行定义.
引用了 eve::editor::WorkspacePanelDescriptor::order, order, eve::editor::WorkspacePanelDescriptor::region, eve::Status::success(), eve::Result< T >::success(), value , 以及 eve::editor::workspaceRegionName().
被这些函数引用 movePanel().
◆ movePanel() [2/2]
| bool eve::editor::EditorWorkspace::movePanel | ( | const std::string & | id, |
| const std::string & | region, | ||
| int | order | ||
| ) |
Compatibility-only string/boolean facade over movePanel(id, region, order).
在文件 EditorWorkspace.cpp 第 97 行定义.
引用了 movePanel() , 以及 order.
◆ panelAt()
| Result< WorkspacePanelDescriptor > eve::editor::EditorWorkspace::panelAt | ( | std::size_t | index | ) | const |
Return an owning panel snapshot instead of an ambiguous empty field.
在文件 EditorWorkspace.cpp 第 121 行定义.
引用了 index.
◆ registerPanel() [1/2]
| bool eve::editor::EditorWorkspace::registerPanel | ( | const std::string & | id, |
| const std::string & | title, | ||
| const std::string & | region, | ||
| int | order | ||
| ) |
Register a panel descriptor.
- 返回
- False for an empty/duplicate id or an unsupported dock region.
- 注解
- Compatibility-only string/boolean facade over registerPanel(descriptor).
在文件 EditorWorkspace.cpp 第 42 行定义.
引用了 descriptor, id, order, registerPanel() , 以及 title.
◆ registerPanel() [2/2]
| Result< WorkspacePanelDescriptor > eve::editor::EditorWorkspace::registerPanel | ( | WorkspacePanelDescriptor | descriptor | ) |
Register a checked owning panel descriptor.
在文件 EditorWorkspace.cpp 第 48 行定义.
引用了 descriptor , 以及 id.
被这些函数引用 eve::animation_editor::AnimationClipEditor::configureWorkspace(), eve::audio_editor::AudioSourceEditor::configureWorkspace(), eve::avatar_editor::AvatarDocumentEditor::configureWorkspace(), eve::biome_editor::BiomeRulesEditor::configureWorkspace(), eve::procgen_editor::MeshModifierEditor::configureWorkspace(), eve::procgen_editor::ProcgenScriptEditor::configureWorkspace(), eve::ui_editor::UiThemeEditor::configureWorkspace(), eve::voxel_editor::VoxelCatalogEditor::configureWorkspace(), eve::editor::ActionTimelineEditor::configureWorkspace() , 以及 registerPanel().
◆ removePanel() [1/2]
| Result< WorkspacePanelDescriptor > eve::editor::EditorWorkspace::removePanel | ( | const StableId & | id | ) |
Remove a panel and return its final owning descriptor.
在文件 EditorWorkspace.cpp 第 77 行定义.
引用了 found, removed , 以及 value.
被这些函数引用 removePanel().
◆ removePanel() [2/2]
| bool eve::editor::EditorWorkspace::removePanel | ( | const std::string & | id | ) |
◆ select()
| bool eve::editor::EditorWorkspace::select | ( | const std::string & | channel, |
| const std::string & | domain, | ||
| const std::string & | target, | ||
| const std::string & | item, | ||
| const std::string & | type, | ||
| bool | additive | ||
| ) |
Select one stable item in a semantic channel.
- 参数
-
additive Preserve existing items in the channel when true.
在文件 EditorWorkspace.cpp 第 256 行定义.
引用了 ok, selectItem(), target , 以及 type.
◆ selectItem()
| Result< SelectionSnapshot > eve::editor::EditorWorkspace::selectItem | ( | std::string | channel, |
| SelectionItem | item, | ||
| bool | additive | ||
| ) |
Select one already typed item without string domain parsing.
在文件 EditorWorkspace.cpp 第 263 行定义.
引用了 eve::UuidIdAdapter< Tag >::empty(), eve::editing::SelectionItem::item, eve::editing::SelectionSnapshot::items, eve::editor::EditorSelectionService::set(), eve::editor::EditorSelectionService::snapshot() , 以及 eve::editing::SelectionItem::target.
被这些函数引用 eve::procgen_editor::MeshModifierEditor::configureWorkspace() , 以及 select().
◆ setMode()
| bool eve::editor::EditorWorkspace::setMode | ( | const std::string & | mode | ) |
Set a project-defined mode such as edit, play, material, or animation.
在文件 EditorWorkspace.cpp 第 240 行定义.
引用了 setModeId().
◆ setModeId()
Set a strongly identified workspace mode.
在文件 EditorWorkspace.cpp 第 244 行定义.
引用了 eve::UuidIdAdapter< Tag >::empty(), eve::Status::success(), eve::Result< T >::success() , 以及 eve::UuidIdAdapter< Tag >::value().
被这些函数引用 eve::procgen_editor::MeshModifierEditor::activateTool() , 以及 setMode().
◆ setPanelCapability()
| bool eve::editor::EditorWorkspace::setPanelCapability | ( | const std::string & | id, |
| const std::string & | capability | ||
| ) |
Attach a capability requirement used by the host when filtering panels.
在文件 EditorWorkspace.cpp 第 128 行定义.
引用了 eve::editor::WorkspacePanelDescriptor::capability.
被这些函数引用 eve::animation_editor::AnimationClipEditor::configureWorkspace(), eve::audio_editor::AudioSourceEditor::configureWorkspace(), eve::avatar_editor::AvatarDocumentEditor::configureWorkspace(), eve::biome_editor::BiomeRulesEditor::configureWorkspace(), eve::procgen_editor::ProcgenScriptEditor::configureWorkspace(), eve::ui_editor::UiThemeEditor::configureWorkspace(), eve::voxel_editor::VoxelCatalogEditor::configureWorkspace() , 以及 eve::editor::ActionTimelineEditor::configureWorkspace().
◆ setPanelContext()
| bool eve::editor::EditorWorkspace::setPanelContext | ( | const std::string & | id, |
| const std::string & | context | ||
| ) |
Attach a semantic input context such as scene, graph, or timeline.
在文件 EditorWorkspace.cpp 第 137 行定义.
引用了 context , 以及 eve::editor::WorkspacePanelDescriptor::context.
被这些函数引用 eve::animation_editor::AnimationClipEditor::configureWorkspace(), eve::audio_editor::AudioSourceEditor::configureWorkspace(), eve::avatar_editor::AvatarDocumentEditor::configureWorkspace(), eve::biome_editor::BiomeRulesEditor::configureWorkspace(), eve::procgen_editor::ProcgenScriptEditor::configureWorkspace(), eve::ui_editor::UiThemeEditor::configureWorkspace(), eve::voxel_editor::VoxelCatalogEditor::configureWorkspace() , 以及 eve::editor::ActionTimelineEditor::configureWorkspace().
◆ setPanelSingleton()
| bool eve::editor::EditorWorkspace::setPanelSingleton | ( | const std::string & | id, |
| bool | singleton | ||
| ) |
Mark whether hosts should allow more than one instance of this panel type.
在文件 EditorWorkspace.cpp 第 156 行定义.
◆ setPanelVisible()
| bool eve::editor::EditorWorkspace::setPanelVisible | ( | const std::string & | id, |
| bool | visible | ||
| ) |
Show or hide a panel without removing its descriptor.
在文件 EditorWorkspace.cpp 第 146 行定义.
引用了 eve::editor::WorkspacePanelDescriptor::visible , 以及 visible.
◆ setRegionSize()
| void eve::editor::EditorWorkspace::setRegionSize | ( | const std::string & | region, |
| float | pixels | ||
| ) |
Configure one standard dock region size in pixels.
在文件 EditorWorkspace.cpp 第 228 行定义.
◆ setTitle()
| void eve::editor::EditorWorkspace::setTitle | ( | const std::string & | title | ) |
Change the display title without changing workspace identity.
在文件 EditorWorkspace.cpp 第 36 行定义.
引用了 title.
该类的文档由以下文件生成:
- src/modules/editor/EditorWorkspace.h
- src/modules/editor/EditorWorkspace.cpp