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

Context supplied by EditorSession to tools. 更多...

#include <EditorTool.h>

Public 成员函数

 EditorContext (EditorSession *session=nullptr)
 Editor context.
 
EditorSession * session () const
 Session currently dispatching the tool callback.
 
IEditableTarget * target () const
 Target currently bound to the session.
 
EditorTransactions & transactions () const
 Transactions.
 
bool execute (std::unique_ptr< IEditCommand > command) const
 Send a command through constraints into the active transaction.
 
Result< void > executeChecked (std::unique_ptr< IEditCommand > command) const
 Send a command without discarding validation or transaction diagnostics.
 
template<typename Capability >
Capability * targetCapability () const
 Query a capability from the current target.
 

友元

class EditorSession
 

详细描述

Context supplied by EditorSession to tools.

Later editor capabilities (targets, transactions, overlays, selection) attach to this stable context instead of adding concrete tool cases to the session.

在文件 EditorTool.h 第 71 行定义.

构造及析构函数说明

◆ EditorContext()

eve::editor::EditorContext::EditorContext ( EditorSession *  session = nullptr)
inlineexplicit

Editor context.

在文件 EditorTool.h 第 74 行定义.

成员函数说明

◆ execute()

bool eve::editor::EditorContext::execute ( std::unique_ptr< IEditCommand >  command) const

Send a command through constraints into the active transaction.

在文件 EditorSession.cpp 第 19 行定义.

引用了 eve::editor::EditorSession::execute().

◆ executeChecked()

Result< void > eve::editor::EditorContext::executeChecked ( std::unique_ptr< IEditCommand >  command) const

Send a command without discarding validation or transaction diagnostics.

在文件 EditorSession.cpp 第 23 行定义.

引用了 eve::editor::EditorSession::executeChecked().

◆ session()

EditorSession * eve::editor::EditorContext::session ( ) const
inline

Session currently dispatching the tool callback.

返回
Borrowed session pointer, or null. @lifetime Valid only for the current dispatch callback.

在文件 EditorTool.h 第 77 行定义.

◆ target()

IEditableTarget * eve::editor::EditorContext::target ( ) const

Target currently bound to the session.

返回
Borrowed target pointer, or null. @lifetime Valid only for the current dispatch callback.

在文件 EditorSession.cpp 第 15 行定义.

引用了 eve::editor::EditorSession::target().

被这些函数引用 targetCapability().

◆ targetCapability()

template<typename Capability >
Capability * eve::editor::EditorContext::targetCapability ( ) const

Query a capability from the current target.

Target capability.

返回
Borrowed capability pointer, or null. @lifetime Valid only for the current dispatch callback.

Target capability.

返回
Borrowed capability pointer, or null. @lifetime Valid only for the current dispatch callback.

在文件 EditorTool.h 第 168 行定义.

引用了 current , 以及 target().

◆ transactions()

EditorTransactions & eve::editor::EditorContext::transactions ( ) const

Transactions.

在文件 EditorSession.cpp 第 17 行定义.

引用了 eve::editor::EditorSession::transactions().

友元及相关函数文档

◆ EditorSession

friend class EditorSession
friend

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


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