Workspace controller for one authored UI theme catalog. 更多...
#include <UiThemeEditor.h>
Public 成员函数 | |
| UiThemeEditor (std::string targetId) | |
| Construct a catalog seeded with built-in Dark and Light assets. | |
| UiThemeEditor (const UiThemeEditor &)=delete | |
| UiThemeEditor & | operator= (const UiThemeEditor &)=delete |
| const ui_editing::UiThemeCatalogTarget & | target () const noexcept |
| Borrow the authoritative theme catalog. | |
| ui_editing::Result< void > | configureWorkspace (editor::EditorWorkspace &workspace) const |
| Install Themes / Preview / Inspector panels. | |
| ui_editing::Result< void > | selectTheme (std::string id) |
| ui_editing::Result< void > | createFromPreset (std::string id, std::string name, std::string preset) |
| ui_editing::Result< void > | duplicateSelected (std::string id, std::string name) |
| ui_editing::Result< void > | deleteSelected () |
| ui_editing::Result< void > | setActiveSelected () |
| ui_editing::Result< void > | resetSelectedToBase () |
| ui_editing::Result< void > | setToken (const std::string &path, const ui_editing::EditorValue &value) |
| ui_editing::Result< editor::TransactionReceipt > | undo () |
| ui_editing::Result< editor::TransactionReceipt > | redo () |
| ui_editing::Result< void > | applyPreviewHost (const std::string &hostName) |
| Copy the selected theme onto a live UIHost without changing globalTheme. | |
| bool | canUndo () const noexcept |
| bool | canRedo () const noexcept |
| Can redo. | |
| std::uint64_t | revision () const noexcept |
| Revision. | |
| std::uint64_t | previewRevision () const noexcept |
| Preview revision. | |
| std::string | selectedId () const |
| Selected id. | |
| std::string | activeId () const |
| Active id. | |
| std::string | previewRuntimeName () const |
| Preview runtime name. | |
| int | themeCount () const |
| Theme count. | |
| std::string | themeId (int index) const |
| Theme id. | |
| std::string | themeName (int index) const |
| Theme name. | |
| bool | isThemeSelected (int index) const |
| True when theme selected. | |
| bool | isThemeActive (int index) const |
| True when theme active. | |
| float | getColorChannel (const std::string &path, int channel) const |
| Returns the color channel. | |
| float | getFloat (const std::string &path) const |
| Returns the float. | |
详细描述
Workspace controller for one authored UI theme catalog.
Owns the catalog, local undo and a revision-bound Theme preview copy. Gallery hosts consume the preview through a host-local Theme override; process globalTheme() changes only after a successful setActive publish.
@ownership Editor owns the catalog. Preview getters copy values. @threadaffinity Owner thread only. @reentrancy No unknown callbacks.
在文件 UiThemeEditor.h 第 30 行定义.
构造及析构函数说明
◆ UiThemeEditor() [1/2]
|
explicit |
Construct a catalog seeded with built-in Dark and Light assets.
在文件 UiThemeEditor.cpp 第 23 行定义.
◆ UiThemeEditor() [2/2]
|
delete |
成员函数说明
◆ activeId()
|
inline |
◆ applyPreviewHost()
| ui_editing::Result< void > eve::ui_editor::UiThemeEditor::applyPreviewHost | ( | const std::string & | hostName | ) |
Copy the selected theme onto a live UIHost without changing globalTheme.
- 参数
-
hostName Retained UI host name (typically the preview panel id).
在文件 UiThemeEditor.cpp 第 174 行定义.
引用了 eve::ui_editing::UiThemePreviewSnapshot::documentRevision, eve::ui::UISystem::findHost(), host, eve::ui::UIHost::resolve(), eve::editing::EditableTargetState::revision(), eve::ui_editing::UiThemePreviewSnapshot::status , 以及 eve::ui_editing::UiThemePreviewSnapshot::theme.
◆ canRedo()
|
inlinenoexcept |
◆ canUndo()
|
inlinenoexcept |
在文件 UiThemeEditor.h 第 63 行定义.
◆ configureWorkspace()
| ui_editing::Result< void > eve::ui_editor::UiThemeEditor::configureWorkspace | ( | editor::EditorWorkspace & | workspace | ) | const |
Install Themes / Preview / Inspector panels.
- 注解
- Does not retain
workspace.
在文件 UiThemeEditor.cpp 第 30 行定义.
引用了 eve::editor::EditorWorkspace::activatePanel(), context, id, order, eve::editor::EditorWorkspace::registerPanel(), eve::editor::EditorWorkspace::setPanelCapability(), eve::editor::EditorWorkspace::setPanelContext() , 以及 title.
◆ createFromPreset()
| ui_editing::Result< void > eve::ui_editor::UiThemeEditor::createFromPreset | ( | std::string | id, |
| std::string | name, | ||
| std::string | preset | ||
| ) |
在文件 UiThemeEditor.cpp 第 109 行定义.
引用了 created, eve::ui_editing::UiThemeCatalogTarget::makeCreateFromPreset() , 以及 name.
◆ deleteSelected()
| ui_editing::Result< void > eve::ui_editor::UiThemeEditor::deleteSelected | ( | ) |
◆ duplicateSelected()
| ui_editing::Result< void > eve::ui_editor::UiThemeEditor::duplicateSelected | ( | std::string | id, |
| std::string | name | ||
| ) |
在文件 UiThemeEditor.cpp 第 120 行定义.
引用了 eve::ui_editing::UiThemeCatalogTarget::makeDuplicate() , 以及 name.
◆ getColorChannel()
| float eve::ui_editor::UiThemeEditor::getColorChannel | ( | const std::string & | path, |
| int | channel | ||
| ) | const |
Returns the color channel.
在文件 UiThemeEditor.cpp 第 212 行定义.
引用了 eve::editing::Value::getIf(), number, path, eve::ui_editing::UiThemeCatalogTarget::read(), value , 以及 eve::editing::PropertyReadResult::value.
◆ getFloat()
| float eve::ui_editor::UiThemeEditor::getFloat | ( | const std::string & | path | ) | const |
Returns the float.
在文件 UiThemeEditor.cpp 第 221 行定义.
引用了 eve::editing::Value::getIf(), number, path, eve::ui_editing::UiThemeCatalogTarget::read(), value , 以及 eve::editing::PropertyReadResult::value.
◆ isThemeActive()
| bool eve::ui_editor::UiThemeEditor::isThemeActive | ( | int | index | ) | const |
True when theme active.
在文件 UiThemeEditor.cpp 第 207 行定义.
引用了 eve::ui_editing::UiThemeCatalogTarget::activeId() , 以及 index.
◆ isThemeSelected()
| bool eve::ui_editor::UiThemeEditor::isThemeSelected | ( | int | index | ) | const |
◆ operator=()
|
delete |
◆ previewRevision()
|
inlinenoexcept |
Preview revision.
在文件 UiThemeEditor.h 第 69 行定义.
引用了 eve::ui_editing::UiThemePreviewSnapshot::documentRevision.
◆ previewRuntimeName()
|
inline |
Preview runtime name.
在文件 UiThemeEditor.h 第 75 行定义.
◆ redo()
| ui_editing::Result< editor::TransactionReceipt > eve::ui_editor::UiThemeEditor::redo | ( | ) |
在文件 UiThemeEditor.cpp 第 166 行定义.
引用了 eve::Result< T >::failure() , 以及 eve::editor::LocalTransactionBackend::redo().
◆ resetSelectedToBase()
| ui_editing::Result< void > eve::ui_editor::UiThemeEditor::resetSelectedToBase | ( | ) |
◆ revision()
|
inlinenoexcept |
◆ selectedId()
|
inline |
Selected id.
在文件 UiThemeEditor.h 第 71 行定义.
◆ selectTheme()
| ui_editing::Result< void > eve::ui_editor::UiThemeEditor::selectTheme | ( | std::string | id | ) |
在文件 UiThemeEditor.cpp 第 102 行定义.
引用了 eve::Result< T >::failure() , 以及 eve::ui_editing::UiThemeCatalogTarget::theme().
◆ setActiveSelected()
| ui_editing::Result< void > eve::ui_editor::UiThemeEditor::setActiveSelected | ( | ) |
◆ setToken()
| ui_editing::Result< void > eve::ui_editor::UiThemeEditor::setToken | ( | const std::string & | path, |
| const ui_editing::EditorValue & | value | ||
| ) |
在文件 UiThemeEditor.cpp 第 149 行定义.
引用了 eve::ui_editing::UiThemeCatalogTarget::makeSet(), path , 以及 value.
◆ target()
|
inlinenoexcept |
Borrow the authoritative theme catalog.
在文件 UiThemeEditor.h 第 39 行定义.
◆ themeCount()
|
inline |
◆ themeId()
| std::string eve::ui_editor::UiThemeEditor::themeId | ( | int | index | ) | const |
◆ themeName()
| std::string eve::ui_editor::UiThemeEditor::themeName | ( | int | index | ) | const |
◆ undo()
| ui_editing::Result< editor::TransactionReceipt > eve::ui_editor::UiThemeEditor::undo | ( | ) |
该类的文档由以下文件生成:
- src/modules/ui/editor/UiThemeEditor.h
- src/modules/ui/editor/UiThemeEditor.cpp