Channelled selection/focus state shared by editor and in-game presentations. 更多...
#include <EditorSelection.h>
Public 类型 | |
| using | Listener = std::function< void(const SelectionSnapshot &)> |
Public 成员函数 | |
| Result< SelectionSnapshot > | set (std::string channel, std::vector< SelectionItem > items, std::optional< SelectionItem > primary=std::nullopt) |
| Atomically replace a channel selection and optional primary item. | |
| Result< SelectionSnapshot > | clear (const std::string &channel) |
| Clear a channel while retaining a monotonic sequence. | |
| SelectionSnapshot | snapshot (const std::string &channel) const |
| Read one channel, returning an empty sequence-zero snapshot when absent. | |
| Result< void > | subscribe (std::string owner, Listener listener) |
| Subscribe an owner callback; owner replacement and unload are deterministic. | |
| bool | unsubscribe (const std::string &owner) |
| Remove one listener owner. | |
详细描述
Channelled selection/focus state shared by editor and in-game presentations.
在文件 EditorSelection.h 第 31 行定义.
成员类型定义说明
◆ Listener
| using eve::editor::EditorSelectionService::Listener = std::function<void(const SelectionSnapshot&)> |
在文件 EditorSelection.h 第 33 行定义.
成员函数说明
◆ clear()
| Result< SelectionSnapshot > eve::editor::EditorSelectionService::clear | ( | const std::string & | channel | ) |
Clear a channel while retaining a monotonic sequence.
在文件 EditorSelection.cpp 第 29 行定义.
引用了 set().
被这些函数引用 eve::editor::EditorWorkspace::clearSelectionChecked().
◆ set()
| Result< SelectionSnapshot > eve::editor::EditorSelectionService::set | ( | std::string | channel, |
| std::vector< SelectionItem > | items, | ||
| std::optional< SelectionItem > | primary = std::nullopt |
||
| ) |
Atomically replace a channel selection and optional primary item.
在文件 EditorSelection.cpp 第 7 行定义.
引用了 eve::editing::SelectionSnapshot::channel , 以及 value.
被这些函数引用 clear() , 以及 eve::editor::EditorWorkspace::selectItem().
◆ snapshot()
| SelectionSnapshot eve::editor::EditorSelectionService::snapshot | ( | const std::string & | channel | ) | const |
Read one channel, returning an empty sequence-zero snapshot when absent.
在文件 EditorSelection.cpp 第 31 行定义.
引用了 eve::editing::SelectionSnapshot::channel , 以及 found.
被这些函数引用 eve::editor::EditorWorkspace::getPrimarySelection(), eve::editor::EditorWorkspace::getSelectionCount(), eve::editor::EditorWorkspace::getSelectionItem(), eve::editor::EditorWorkspace::getSelectionSequence(), eve::editor::EditorWorkspace::getSelectionType() , 以及 eve::editor::EditorWorkspace::selectItem().
◆ subscribe()
| Result< void > eve::editor::EditorSelectionService::subscribe | ( | std::string | owner, |
| Listener | listener | ||
| ) |
Subscribe an owner callback; owner replacement and unload are deterministic.
在文件 EditorSelection.cpp 第 39 行定义.
◆ unsubscribe()
| bool eve::editor::EditorSelectionService::unsubscribe | ( | const std::string & | owner | ) |
Remove one listener owner.
在文件 EditorSelection.cpp 第 47 行定义.
该类的文档由以下文件生成:
- src/modules/editor/EditorSelection.h
- src/modules/editor/EditorSelection.cpp