载入中...
搜索中...
未找到
eve::ui_editor::UiThemeEditor类 参考

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]

eve::ui_editor::UiThemeEditor::UiThemeEditor ( std::string  targetId)
explicit

Construct a catalog seeded with built-in Dark and Light assets.

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

◆ UiThemeEditor() [2/2]

eve::ui_editor::UiThemeEditor::UiThemeEditor ( const UiThemeEditor &  )
delete

成员函数说明

◆ activeId()

std::string eve::ui_editor::UiThemeEditor::activeId ( ) const
inline

Active id.

在文件 UiThemeEditor.h 第 73 行定义.

引用了 eve::ui_editing::UiThemeCatalogTarget::activeId().

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

参数
hostNameRetained 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()

bool eve::ui_editor::UiThemeEditor::canRedo ( ) const
inlinenoexcept

Can redo.

在文件 UiThemeEditor.h 第 65 行定义.

引用了 eve::editor::LocalTransactionBackend::canRedo().

◆ canUndo()

bool eve::ui_editor::UiThemeEditor::canUndo ( ) const
inlinenoexcept

◆ configureWorkspace()

ui_editing::Result< void > eve::ui_editor::UiThemeEditor::configureWorkspace ( editor::EditorWorkspace &  workspace) const

◆ createFromPreset()

ui_editing::Result< void > eve::ui_editor::UiThemeEditor::createFromPreset ( std::string  id,
std::string  name,
std::string  preset 
)

◆ deleteSelected()

◆ duplicateSelected()

ui_editing::Result< void > eve::ui_editor::UiThemeEditor::duplicateSelected ( std::string  id,
std::string  name 
)

◆ getColorChannel()

float eve::ui_editor::UiThemeEditor::getColorChannel ( const std::string &  path,
int  channel 
) const

◆ getFloat()

float eve::ui_editor::UiThemeEditor::getFloat ( const std::string &  path) const

◆ 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

True when theme selected.

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

引用了 index.

◆ operator=()

UiThemeEditor & eve::ui_editor::UiThemeEditor::operator= ( const UiThemeEditor &  )
delete

◆ previewRevision()

std::uint64_t eve::ui_editor::UiThemeEditor::previewRevision ( ) const
inlinenoexcept

Preview revision.

在文件 UiThemeEditor.h 第 69 行定义.

引用了 eve::ui_editing::UiThemePreviewSnapshot::documentRevision.

◆ previewRuntimeName()

std::string eve::ui_editor::UiThemeEditor::previewRuntimeName ( ) const
inline

Preview runtime name.

在文件 UiThemeEditor.h 第 75 行定义.

引用了 eve::ui_editing::UiThemePreviewSnapshot::runtimeName.

◆ redo()

ui_editing::Result< editor::TransactionReceipt > eve::ui_editor::UiThemeEditor::redo ( )

◆ resetSelectedToBase()

ui_editing::Result< void > eve::ui_editor::UiThemeEditor::resetSelectedToBase ( )

◆ revision()

std::uint64_t eve::ui_editor::UiThemeEditor::revision ( ) const
inlinenoexcept

Revision.

在文件 UiThemeEditor.h 第 67 行定义.

引用了 eve::editing::EditableTargetState::revision().

◆ selectedId()

std::string eve::ui_editor::UiThemeEditor::selectedId ( ) const
inline

Selected id.

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

◆ selectTheme()

ui_editing::Result< void > eve::ui_editor::UiThemeEditor::selectTheme ( std::string  id)

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

const ui_editing::UiThemeCatalogTarget & eve::ui_editor::UiThemeEditor::target ( ) const
inlinenoexcept

Borrow the authoritative theme catalog.

在文件 UiThemeEditor.h 第 39 行定义.

◆ themeCount()

int eve::ui_editor::UiThemeEditor::themeCount ( ) const
inline

Theme count.

在文件 UiThemeEditor.h 第 78 行定义.

引用了 eve::ui_editing::UiThemeCatalogTarget::themes().

◆ themeId()

std::string eve::ui_editor::UiThemeEditor::themeId ( int  index) const

Theme id.

在文件 UiThemeEditor.cpp 第 195 行定义.

引用了 index.

◆ themeName()

std::string eve::ui_editor::UiThemeEditor::themeName ( int  index) const

Theme name.

在文件 UiThemeEditor.cpp 第 199 行定义.

引用了 index.

◆ undo()


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