Serializable catalog of named UI themes with one active publication slot. 更多...
#include <UiTheme.h>
Public 成员函数 | |
| UiThemeCatalogTarget (std::string id) | |
| Construct a catalog seeded with built-in dark and light assets. | |
| TargetId | targetId () const override |
| Target id. | |
| TargetDescriptor | describe () const override |
| Describe. | |
| void * | queryCapability (const CapabilityId &capability) override |
| Query Inspector and snapshot capabilities. | |
| Result< void > | applyDomainOperation (const DomainOperation &operation) override |
| Applies domain operation. | |
| std::unique_ptr< IDomainOperationTarget > | cloneDomainState () const override |
| Clones domain state. | |
| Result< void > | commitDomainState (std::unique_ptr< IDomainOperationTarget > candidate) override |
| Commits domain state. | |
| const std::vector< UiThemeAsset > & | themes () const noexcept |
| Borrow authored themes in catalog order. | |
| const ObjectId & | activeId () const noexcept |
| Active publication id; empty only if the catalog failed to seed. | |
| Result< UiThemeAsset > | theme (const ObjectId &id) const |
| Copy one named theme, or NotFound. | |
| std::string | runtimeName (const ObjectId &id) const |
| Runtime name written to ui::globalThemeName(): dark, light, or custom. | |
| Result< DomainOperation > | makeCreateFromPreset (const ObjectId &id, std::string name, UiThemeBasePreset preset) const |
| Make create from preset. | |
| Result< DomainOperation > | makeDuplicate (const ObjectId &source, const ObjectId &id, std::string name) const |
| Make duplicate. | |
| Result< DomainOperation > | makeRename (const ObjectId &id, std::string name) const |
| Make rename. | |
| Result< DomainOperation > | makeDelete (const ObjectId &id) const |
| Make delete. | |
| Result< DomainOperation > | makeSetActive (const ObjectId &id) const |
| Make set active. | |
| Result< DomainOperation > | makeResetToBase (const ObjectId &id) const |
| Make reset to base. | |
| eve::Result< eve::Revision > | currentRevision (const SelectionSnapshot &selection) const override |
| Current revision. | |
| PropertySchema | schema (const SelectionSnapshot &selection) const override |
| Schema. | |
| PropertyReadResult | read (const SelectionSnapshot &selection, const PropertyPath &path) const override |
| Reads . | |
| Result< DomainOperation > | makeSet (const SelectionSnapshot &selection, const PropertyPath &path, const EditorValue &value, PropertySetMode mode) const override |
| Make set. | |
| Result< DomainOperation > | makeReset (const SelectionSnapshot &selection, const PropertyPath &path) const override |
| Make reset. | |
| EditorValue | snapshotValue () const override |
| Snapshot value. | |
| Result< void > | loadSnapshot (const EditorValue &snapshot) |
| Loads snapshot. | |
| std::vector< EditorDiagnostic > | validate () const |
| Validate. | |
Public 成员函数 继承自 eve::editing::EditableTargetState | |
| EditableTargetState (Revision initial=1) | |
| Constructs the shared state with an explicit initial revision. | |
| EditRegion | dirtyRegion () const override |
| Return the accumulated dirty region. | |
| void | clearDirtyRegion () override |
| Discard the dirty region; the revision does not change. | |
| std::uint64_t | revision () const override |
| Return the current revision. | |
| Revision | revisionValue () const noexcept |
| Return the revision as the shared protocol revision type. | |
Public 成员函数 继承自 eve::editing::IEditableTarget | |
| virtual | ~IEditableTarget ()=default |
| Releases IEditableTarget resources. | |
| virtual void * | queryCapability (const CapabilityId &capability) |
| Query an optional stable capability. | |
| template<class C > | |
| eve::OptionalRef< C > | capability () |
| Query a capability through its interface-owned stable identity. | |
| template<class C > | |
| eve::OptionalRef< const C > | capability () const |
| Capability. | |
| template<class C > | |
| C * | query () |
| Queries query. | |
| template<class C > | |
| const C * | query () const |
| Queries query. | |
Public 成员函数 继承自 eve::editing::IDomainOperationTarget | |
| ~IDomainOperationTarget () override=default | |
| Releases IDomainOperationTarget resources. | |
Public 成员函数 继承自 eve::editing::IDomainOperationTargetStaging | |
| virtual | ~IDomainOperationTargetStaging ()=default |
| Releases IDomainOperationTargetStaging resources. | |
Public 成员函数 继承自 eve::editing::IPropertyProvider | |
| virtual | ~IPropertyProvider ()=default |
| Releases IPropertyProvider resources. | |
| virtual Result< DomainOperation > | makeSet (const SelectionSnapshot &selection, const PropertyPath &path, const Value &value, PropertySetMode mode) const =0 |
| Make set. | |
Public 成员函数 继承自 eve::editing::IEditingSnapshotProvider | |
| virtual | ~IEditingSnapshotProvider ()=default |
| Releases IEditingSnapshotProvider resources. | |
静态 Public 成员函数 | |
| static CapabilityId | propertyCapabilityId () |
| Inspector capability published by describe(). | |
静态 Public 成员函数 继承自 eve::editing::IPropertyProvider | |
| static CapabilityId | editingCapabilityId () |
| Stable capability identity for generic property editing. | |
静态 Public 成员函数 继承自 eve::editing::IEditingSnapshotProvider | |
| static CapabilityId | editingCapabilityId () |
| Stable capability identity shared by every editable domain target. | |
额外继承的成员函数 | |
Protected 成员函数 继承自 eve::editing::EditableTargetState | |
| void | widenDirty (int x, int y) |
| Widen the dirty region without advancing the revision. | |
| void | widenDirty (const EditRegion ®ion) |
| Widen the dirty region without advancing the revision. | |
| void | widenDirty () |
| Mark an unknown area dirty without advancing the revision. | |
| void | bumpRevision () |
| Advance the revision without touching the dirty region. | |
| void | setRevision (Revision revision) |
| Adopt a revision observed elsewhere, without advancing it. | |
| void | setDirtyRegion (const EditRegion ®ion) |
| Replace the dirty region wholesale, without advancing the revision. | |
| void | markDirty (int x, int y) |
| Include one cell in the dirty region and advance the revision. | |
| void | markDirty (const EditRegion ®ion) |
| Include a whole region and advance the revision. | |
| void | markDirty () |
| Mark an unknown area dirty and advance the revision. | |
详细描述
构造及析构函数说明
◆ UiThemeCatalogTarget()
|
explicit |
Construct a catalog seeded with built-in dark and light assets.
- 参数
-
id Stable editor target identity.
在文件 UiTheme.cpp 第 80 行定义.
引用了 eve::ui_editing::UiThemeAsset::basePreset, eve::ui_editing::Dark, eve::ui::Theme::dark(), eve::ui_editing::UiThemeAsset::id, light, eve::ui_editing::Light, eve::ui::Theme::light(), eve::ui_editing::UiThemeAsset::name , 以及 eve::ui_editing::UiThemeAsset::tokens.
成员函数说明
◆ activeId()
|
inlinenoexcept |
Active publication id; empty only if the catalog failed to seed.
被这些函数引用 eve::ui_editor::UiThemeEditor::activeId(), eve::ui_editor::UiThemeEditor::deleteSelected(), eve::ui_editor::UiThemeEditor::isThemeActive() , 以及 eve::ui_editing::UiThemeRuntimePublisher::publish().
◆ applyDomainOperation()
|
overridevirtual |
Applies domain operation.
实现了 eve::editing::IDomainOperationTarget.
在文件 UiTheme.cpp 第 179 行定义.
引用了 eve::editing::EditableTargetState::bumpRevision(), operation , 以及 eve::editing::EditableTargetState::widenDirty().
◆ cloneDomainState()
|
overridevirtual |
◆ commitDomainState()
|
overridevirtual |
◆ currentRevision()
|
overridevirtual |
Current revision.
重载 eve::editing::IPropertyProvider .
在文件 UiThemeProperty.cpp 第 22 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::editing::EditableTargetState::revisionValue() , 以及 eve::Result< T >::success().
◆ describe()
|
overridevirtual |
◆ loadSnapshot()
| Result< void > eve::ui_editing::UiThemeCatalogTarget::loadSnapshot | ( | const EditorValue & | snapshot | ) |
Loads snapshot.
在文件 UiTheme.cpp 第 318 行定义.
引用了 eve::editing::EditableTargetState::bumpRevision(), eve::editing::IEditableTarget::clearDirtyRegion() , 以及 eve::editing::Value::getIf().
◆ makeCreateFromPreset()
| Result< DomainOperation > eve::ui_editing::UiThemeCatalogTarget::makeCreateFromPreset | ( | const ObjectId & | id, |
| std::string | name, | ||
| UiThemeBasePreset | preset | ||
| ) | const |
Make create from preset.
在文件 UiTheme.cpp 第 212 行定义.
引用了 eve::ui_editing::UiThemeAsset::basePreset, eve::ui_editing::Custom, id, eve::ui_editing::UiThemeAsset::id, name, eve::ui_editing::UiThemeAsset::name, eve::ui_editing::themeFromPreset() , 以及 eve::ui_editing::UiThemeAsset::tokens.
◆ makeDelete()
| Result< DomainOperation > eve::ui_editing::UiThemeCatalogTarget::makeDelete | ( | const ObjectId & | id | ) | const |
◆ makeDuplicate()
| Result< DomainOperation > eve::ui_editing::UiThemeCatalogTarget::makeDuplicate | ( | const ObjectId & | source, |
| const ObjectId & | id, | ||
| std::string | name | ||
| ) | const |
Make duplicate.
在文件 UiTheme.cpp 第 237 行定义.
引用了 eve::ui_editing::UiThemeAsset::basePreset, eve::ui_editing::Custom, id, eve::ui_editing::UiThemeAsset::id, name, eve::ui_editing::UiThemeAsset::name , 以及 source.
◆ makeRename()
| Result< DomainOperation > eve::ui_editing::UiThemeCatalogTarget::makeRename | ( | const ObjectId & | id, |
| std::string | name | ||
| ) | const |
◆ makeReset()
|
overridevirtual |
Make reset.
实现了 eve::editing::IPropertyProvider.
在文件 UiThemeProperty.cpp 第 75 行定义.
引用了 descriptor, eve::editing::PropertySchema::find(), makeSet(), path , 以及 schema().
被这些函数引用 makeSet().
◆ makeResetToBase()
| Result< DomainOperation > eve::ui_editing::UiThemeCatalogTarget::makeResetToBase | ( | const ObjectId & | id | ) | const |
Make reset to base.
在文件 UiTheme.cpp 第 301 行定义.
引用了 current, eve::ui_editing::Custom , 以及 eve::ui_editing::themeFromPreset().
被这些函数引用 eve::ui_editor::UiThemeEditor::resetSelectedToBase().
◆ makeSet()
|
override |
Make set.
在文件 UiThemeProperty.cpp 第 45 行定义.
引用了 eve::ui_editing::assignThemeToken(), eve::ui_editing::UiThemeAsset::basePreset, eve::ui_editing::Custom, descriptor, eve::editing::PropertySchema::find(), eve::ui_editing::UiThemeAsset::id, eve::editing::SelectionSnapshot::items, makeReset(), ok, path, schema(), eve::ui_editing::UiThemeAsset::tokens, eve::editing::validatePropertyValue() , 以及 value.
被这些函数引用 makeReset() , 以及 eve::ui_editor::UiThemeEditor::setToken().
◆ makeSetActive()
| Result< DomainOperation > eve::ui_editing::UiThemeCatalogTarget::makeSetActive | ( | const ObjectId & | id | ) | const |
◆ propertyCapabilityId()
|
inlinestatic |
Inspector capability published by describe().
被这些函数引用 describe() , 以及 queryCapability().
◆ queryCapability()
|
override |
Query Inspector and snapshot capabilities.
- 返回
- Borrowed pointer owned by this catalog, or null. @lifetime Valid until this target is destroyed or replaced by commitDomainState. @thread Owner-thread only.
在文件 UiTheme.cpp 第 104 行定义.
引用了 eve::editing::IEditableTarget::capability(), eve::editing::IEditingSnapshotProvider::editingCapabilityId() , 以及 propertyCapabilityId().
◆ read()
|
overridevirtual |
Reads .
实现了 eve::editing::IPropertyProvider.
在文件 UiThemeProperty.cpp 第 31 行定义.
引用了 eve::editing::SelectionSnapshot::items, path, eve::ui_editing::readThemeToken(), schema(), eve::ui_editing::UiThemeAsset::tokens , 以及 value.
被这些函数引用 eve::ui_editor::UiThemeEditor::getColorChannel() , 以及 eve::ui_editor::UiThemeEditor::getFloat().
◆ runtimeName()
| std::string eve::ui_editing::UiThemeCatalogTarget::runtimeName | ( | const ObjectId & | id | ) | const |
Runtime name written to ui::globalThemeName(): dark, light, or custom.
在文件 UiTheme.cpp 第 151 行定义.
引用了 value.
被这些函数引用 eve::ui_editing::UiThemePreviewService::build() , 以及 eve::ui_editing::UiThemeRuntimePublisher::publish().
◆ schema()
|
overridevirtual |
Schema.
实现了 eve::editing::IPropertyProvider.
在文件 UiThemeProperty.cpp 第 29 行定义.
引用了 eve::ui_editing::themeTokenSchema().
被这些函数引用 makeReset(), makeSet() , 以及 read().
◆ snapshotValue()
|
overridevirtual |
◆ targetId()
|
inlineoverridevirtual |
◆ theme()
| Result< UiThemeAsset > eve::ui_editing::UiThemeCatalogTarget::theme | ( | const ObjectId & | id | ) | const |
Copy one named theme, or NotFound.
在文件 UiTheme.cpp 第 143 行定义.
引用了 value.
被这些函数引用 eve::ui_editing::UiThemePreviewService::build(), eve::ui_editing::UiThemeRuntimePublisher::publish(), eve::ui_editor::UiThemeEditor::selectTheme() , 以及 eve::ui_editor::UiThemeEditor::undo().
◆ themes()
|
inlinenoexcept |
Borrow authored themes in catalog order.
被这些函数引用 eve::ui_editor::UiThemeEditor::deleteSelected(), eve::ui_editor::UiThemeEditor::themeCount() , 以及 eve::ui_editor::UiThemeEditor::undo().
◆ validate()
| std::vector< EditorDiagnostic > eve::ui_editing::UiThemeCatalogTarget::validate | ( | ) | const |
该类的文档由以下文件生成:
- src/modules/ui/editing/UiTheme.h
- src/modules/ui/editing/UiTheme.cpp
- src/modules/ui/editing/UiThemeProperty.cpp
Public 成员函数 继承自