载入中...
搜索中...
未找到
eve::editor::EditorWorkspace类 参考

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 &region, 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 &region, 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 &region, 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 &region) const
 Computed region X coordinate.
 
float getRegionY (const std::string &region) const
 Computed region Y coordinate.
 
float getRegionW (const std::string &region) const
 Computed region width.
 
float getRegionH (const std::string &region) 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]

◆ 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().

◆ 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 
)

Set UI-toolkit-independent focus for a channel.

在文件 EditorWorkspace.cpp 第 314 行定义.

引用了 focusItem().

◆ 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()

const std::string & eve::editor::EditorWorkspace::getActivePanel ( ) const
inline

Active panel id, or an empty string.

在文件 EditorWorkspace.h 第 90 行定义.

◆ getFocusedSurface()

std::string eve::editor::EditorWorkspace::getFocusedSurface ( const std::string &  channel) const

◆ getId()

const std::string & eve::editor::EditorWorkspace::getId ( ) const
inline

Stable project-defined workspace id.

在文件 EditorWorkspace.h 第 49 行定义.

◆ getMode()

const std::string & eve::editor::EditorWorkspace::getMode ( ) const
inline

Current project-defined mode.

在文件 EditorWorkspace.h 第 129 行定义.

◆ getPanelCapability()

std::string eve::editor::EditorWorkspace::getPanelCapability ( int  index) const

Panel capability requirement by deterministic index.

在文件 EditorWorkspace.cpp 第 203 行定义.

引用了 index.

◆ getPanelContext()

std::string eve::editor::EditorWorkspace::getPanelContext ( int  index) const

Panel input context by deterministic index.

在文件 EditorWorkspace.cpp 第 208 行定义.

引用了 index.

◆ getPanelCount()

int eve::editor::EditorWorkspace::getPanelCount ( ) const
inline

Number of registered panels in deterministic region/order/id order.

在文件 EditorWorkspace.h 第 93 行定义.

◆ getPanelId()

std::string eve::editor::EditorWorkspace::getPanelId ( int  index) const

Panel id by deterministic index.

在文件 EditorWorkspace.cpp 第 188 行定义.

引用了 index.

◆ getPanelOrder()

int eve::editor::EditorWorkspace::getPanelOrder ( int  index) const

Panel order by deterministic index.

在文件 EditorWorkspace.cpp 第 213 行定义.

引用了 index.

◆ getPanelRegion()

std::string eve::editor::EditorWorkspace::getPanelRegion ( int  index) const

Panel dock region by deterministic index.

在文件 EditorWorkspace.cpp 第 198 行定义.

引用了 index.

◆ getPanelSingleton()

bool eve::editor::EditorWorkspace::getPanelSingleton ( int  index) const

Panel singleton policy by deterministic index.

在文件 EditorWorkspace.cpp 第 223 行定义.

引用了 index.

◆ getPanelTitle()

std::string eve::editor::EditorWorkspace::getPanelTitle ( int  index) const

Panel title by deterministic index.

在文件 EditorWorkspace.cpp 第 193 行定义.

引用了 index.

◆ getPanelVisible()

bool eve::editor::EditorWorkspace::getPanelVisible ( int  index) const

Panel visibility by deterministic index.

在文件 EditorWorkspace.cpp 第 218 行定义.

引用了 index.

◆ 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 行定义.

引用了 eve::editor::EditorDock::getRegionH().

◆ getRegionW()

float eve::editor::EditorWorkspace::getRegionW ( const std::string &  region) const

Computed region width.

在文件 EditorWorkspace.cpp 第 237 行定义.

引用了 eve::editor::EditorDock::getRegionW().

◆ getRegionX()

float eve::editor::EditorWorkspace::getRegionX ( const std::string &  region) const

Computed region X coordinate.

在文件 EditorWorkspace.cpp 第 235 行定义.

引用了 eve::editor::EditorDock::getRegionX().

◆ getRegionY()

float eve::editor::EditorWorkspace::getRegionY ( const std::string &  region) const

Computed region Y coordinate.

在文件 EditorWorkspace.cpp 第 236 行定义.

引用了 eve::editor::EditorDock::getRegionY().

◆ getRevision()

std::uint64_t eve::editor::EditorWorkspace::getRevision ( ) const
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()

const std::string & eve::editor::EditorWorkspace::getTitle ( ) const
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 
)

◆ 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]

◆ 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)

Remove a panel descriptor by id.

在文件 EditorWorkspace.cpp 第 72 行定义.

引用了 removePanel().

◆ 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.

参数
additivePreserve 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 
)

◆ 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()

Result< StableId > eve::editor::EditorWorkspace::setModeId ( StableId  mode)

◆ setPanelCapability()

◆ setPanelContext()

◆ 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 行定义.

引用了 eve::editor::WorkspacePanelDescriptor::singleton.

◆ 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 行定义.

引用了 pixels , 以及 eve::editor::EditorDock::setRegionSize().

◆ setTitle()

void eve::editor::EditorWorkspace::setTitle ( const std::string &  title)

Change the display title without changing workspace identity.

在文件 EditorWorkspace.cpp 第 36 行定义.

引用了 title.


该类的文档由以下文件生成: