载入中...
搜索中...
未找到
eve::pixelworld_editor::PixelWorldCatalogPanel类 参考

Dedicated visual material/reaction Catalog editor with transactional draft admission. 更多...

#include <PixelWorldCatalogPanel.h>

Public 成员函数

 ~PixelWorldCatalogPanel ()
 Pixel world catalog panel.
 
 PixelWorldCatalogPanel (const PixelWorldCatalogPanel &)=delete
 
PixelWorldCatalogPanel & operator= (const PixelWorldCatalogPanel &)=delete
 
 PixelWorldCatalogPanel (PixelWorldCatalogPanel &&other)
 Pixel world catalog panel.
 
PixelWorldCatalogPanel & operator= (PixelWorldCatalogPanel &&other)
 Operator =.
 
const eve::pixelworld::MaterialCatalog & draft () const noexcept
 Current validated immutable draft.
 
std::uint64_t revision () const noexcept
 Monotonic local draft revision, advanced only by accepted mutations.
 
std::size_t selectedMaterialIndex () const noexcept
 Selected material index, always valid for the current nonempty draft.
 
std::optional< std::size_t > selectedReactionIndex () const noexcept
 Selected reaction index when at least one binary rule exists.
 
std::optional< std::size_t > selectedPhaseIndex () const noexcept
 Selected phase-rule index when at least one transition exists.
 
std::vector< MaterialCard > materialCards () const
 Project deterministic cards for the material browser.
 
eve::Result< void > selectMaterial (std::size_t index)
 Select a material by canonical index without mutating the Catalog.
 
eve::Result< void > selectReaction (std::size_t index)
 Select a binary reaction rule by canonical index.
 
eve::Result< void > selectPhase (std::size_t index)
 Select a phase-transition rule by canonical index.
 
eve::Result< CatalogDraftReceipt > replaceMaterial (eve::pixelworld::MaterialDefinition definition)
 Replace one material definition after validating the entire reconstructed Catalog.
 
eve::Result< CatalogDraftReceipt > replaceReaction (std::size_t index, eve::pixelworld::MaterialReactionRule rule)
 Replace one binary rule after validating the entire reconstructed Catalog.
 
eve::Result< CatalogDraftReceipt > addReaction (eve::pixelworld::MaterialReactionRule rule)
 Add a binary rule and select its canonical post-validation position.
 
eve::Result< CatalogDraftReceipt > removeReaction (std::size_t index)
 Remove one binary rule transactionally.
 
eve::Result< CatalogDraftReceipt > replacePhase (std::size_t index, eve::pixelworld::MaterialPhaseRule rule)
 Replace one phase rule after validating the entire reconstructed Catalog.
 
eve::Result< CatalogDraftReceipt > addPhase (eve::pixelworld::MaterialPhaseRule rule)
 Add a phase rule and select its canonical post-validation position.
 
eve::Result< CatalogDraftReceipt > removePhase (std::size_t index)
 Remove one phase rule transactionally.
 
eve::Result< std::string > document () const
 Encode the current validated draft using the canonical versioned JSON codec.
 
eve::Result< CatalogDraftReceipt > loadDocument (std::string_view catalogJson)
 Replace the draft from a validated document; failure leaves all panel state intact.
 
eve::Result< eve::pixelworld::PixelCatalogReloadReceipt > apply (eve::pixelworld::PixelWorldControlService &control, std::uint64_t worldId, std::uint64_t expectedFingerprint) const
 Apply the draft through the canonical paused-world authority path.
 
eve::Result< eve::ui::UIHostHandle > open ()
 Mount or reveal the panel in the UI ECS world and publish its current tree.
 
void close ()
 Hide the mounted panel without discarding its validated draft.
 
bool isOpen () const
 True while the panel has a live, visible UI host.
 
eve::Result< void > refresh ()
 Reconcile the mounted host with the latest draft and selection state.
 
eve::ui::UIHostHandle host () const noexcept
 Mounted UI host handle, or an empty handle before open().
 
eve::ui::WidgetDesc buildWidgetTree ()
 Build a dedicated material browser, property inspector and rule editor visual tree.
 
const std::string & statusText () const noexcept
 Last callback diagnostic rendered in the panel status bar.
 

静态 Public 成员函数

static eve::Result< PixelWorldCatalogPanel > create (std::string_view catalogJson)
 Decode and validate a versioned Catalog document into a fresh panel draft.
 
static PixelWorldCatalogPanel builtIn ()
 Create a panel over the canonical built-in Catalog.
 

详细描述

Dedicated visual material/reaction Catalog editor with transactional draft admission.

The panel owns an immutable validated draft and never owns or retains a PixelWorld pointer. Every edit reconstructs a complete candidate Catalog and publishes it only after validation. apply() borrows the control service synchronously and reaches the runtime authority through its generation-aware world registry. All methods are owner-thread-only and invoke no unknown callbacks except callbacks explicitly embedded in a returned WidgetDesc tree. The panel must outlive any mounted tree because those callbacks borrow this.

在文件 PixelWorldCatalogPanel.h 第 47 行定义.

构造及析构函数说明

◆ ~PixelWorldCatalogPanel()

eve::pixelworld_editor::PixelWorldCatalogPanel::~PixelWorldCatalogPanel ( )

Pixel world catalog panel.

在文件 PixelWorldCatalogPanel.cpp 第 104 行定义.

引用了 host(), eve::ui::UIHost::resolve() , 以及 eve::ui::window().

◆ PixelWorldCatalogPanel() [1/2]

eve::pixelworld_editor::PixelWorldCatalogPanel::PixelWorldCatalogPanel ( const PixelWorldCatalogPanel &  )
delete

◆ PixelWorldCatalogPanel() [2/2]

eve::pixelworld_editor::PixelWorldCatalogPanel::PixelWorldCatalogPanel ( PixelWorldCatalogPanel &&  other)

Pixel world catalog panel.

在文件 PixelWorldCatalogPanel.cpp 第 111 行定义.

引用了 refresh().

成员函数说明

◆ addPhase()

eve::Result< CatalogDraftReceipt > eve::pixelworld_editor::PixelWorldCatalogPanel::addPhase ( eve::pixelworld::MaterialPhaseRule  rule)

Add a phase rule and select its canonical post-validation position.

在文件 PixelWorldCatalogPanel.cpp 第 272 行定义.

引用了 definitions, eve::pixelworld::MaterialPhaseRule::id, index, eve::pixelworld::MaterialCatalog::phaseRules(), reactions , 以及 size.

◆ addReaction()

eve::Result< CatalogDraftReceipt > eve::pixelworld_editor::PixelWorldCatalogPanel::addReaction ( eve::pixelworld::MaterialReactionRule  rule)

Add a binary rule and select its canonical post-validation position.

在文件 PixelWorldCatalogPanel.cpp 第 238 行定义.

引用了 definitions, eve::pixelworld::MaterialReactionRule::id, index, eve::pixelworld::MaterialCatalog::reactions(), reactions , 以及 size.

◆ apply()

eve::Result< PixelCatalogReloadReceipt > eve::pixelworld_editor::PixelWorldCatalogPanel::apply ( eve::pixelworld::PixelWorldControlService &  control,
std::uint64_t  worldId,
std::uint64_t  expectedFingerprint 
) const

Apply the draft through the canonical paused-world authority path.

在文件 PixelWorldCatalogPanel.cpp 第 307 行定义.

引用了 document(), eve::Result< T >::failure() , 以及 eve::pixelworld::PixelWorldControlService::reloadMaterialCatalog().

◆ buildWidgetTree()

◆ builtIn()

PixelWorldCatalogPanel eve::pixelworld_editor::PixelWorldCatalogPanel::builtIn ( )
static

Create a panel over the canonical built-in Catalog.

在文件 PixelWorldCatalogPanel.cpp 第 149 行定义.

引用了 eve::pixelworld::MaterialCatalog::builtIn().

被这些函数引用 eve::pixelworld_editor::PixelWorldEditorModule::openCatalog().

◆ close()

void eve::pixelworld_editor::PixelWorldCatalogPanel::close ( )

Hide the mounted panel without discarding its validated draft.

在文件 PixelWorldCatalogPanel.cpp 第 343 行定义.

引用了 host() , 以及 eve::ui::UIHost::resolve().

◆ create()

eve::Result< PixelWorldCatalogPanel > eve::pixelworld_editor::PixelWorldCatalogPanel::create ( std::string_view  catalogJson)
static

Decode and validate a versioned Catalog document into a fresh panel draft.

在文件 PixelWorldCatalogPanel.cpp 第 141 行定义.

引用了 eve::pixelworld::decodeMaterialCatalogJson(), eve::Result< T >::failure() , 以及 eve::Result< T >::success().

◆ document()

eve::Result< std::string > eve::pixelworld_editor::PixelWorldCatalogPanel::document ( ) const

Encode the current validated draft using the canonical versioned JSON codec.

在文件 PixelWorldCatalogPanel.cpp 第 294 行定义.

引用了 eve::pixelworld::encodeMaterialCatalogJson().

被这些函数引用 apply().

◆ draft()

const eve::pixelworld::MaterialCatalog & eve::pixelworld_editor::PixelWorldCatalogPanel::draft ( ) const
inlinenoexcept

Current validated immutable draft.

在文件 PixelWorldCatalogPanel.h 第 64 行定义.

◆ host()

eve::ui::UIHostHandle eve::pixelworld_editor::PixelWorldCatalogPanel::host ( ) const
inlinenoexcept

Mounted UI host handle, or an empty handle before open().

在文件 PixelWorldCatalogPanel.h 第 121 行定义.

被这些函数引用 close(), isOpen(), open(), operator=(), refresh() , 以及 ~PixelWorldCatalogPanel().

◆ isOpen()

bool eve::pixelworld_editor::PixelWorldCatalogPanel::isOpen ( ) const

True while the panel has a live, visible UI host.

在文件 PixelWorldCatalogPanel.cpp 第 347 行定义.

引用了 host() , 以及 eve::ui::UIHost::resolve().

◆ loadDocument()

eve::Result< CatalogDraftReceipt > eve::pixelworld_editor::PixelWorldCatalogPanel::loadDocument ( std::string_view  catalogJson)

Replace the draft from a validated document; failure leaves all panel state intact.

在文件 PixelWorldCatalogPanel.cpp 第 298 行定义.

引用了 eve::pixelworld::decodeMaterialCatalogJson(), definitions, eve::Result< T >::failure() , 以及 reactions.

◆ materialCards()

std::vector< MaterialCard > eve::pixelworld_editor::PixelWorldCatalogPanel::materialCards ( ) const

◆ open()

eve::Result< eve::ui::UIHostHandle > eve::pixelworld_editor::PixelWorldCatalogPanel::open ( )

Mount or reveal the panel in the UI ECS world and publish its current tree.

在文件 PixelWorldCatalogPanel.cpp 第 316 行定义.

引用了 eve::ui::UIHost::createHost(), eve::Diagnostic::error(), eve::Result< T >::failure(), host(), eve::PreconditionViolation, refresh(), eve::ui::UIHost::resolve() , 以及 eve::Result< T >::success().

◆ operator=() [1/2]

PixelWorldCatalogPanel & eve::pixelworld_editor::PixelWorldCatalogPanel::operator= ( const PixelWorldCatalogPanel &  )
delete

◆ operator=() [2/2]

PixelWorldCatalogPanel & eve::pixelworld_editor::PixelWorldCatalogPanel::operator= ( PixelWorldCatalogPanel &&  other)

Operator =.

在文件 PixelWorldCatalogPanel.cpp 第 123 行定义.

引用了 host(), refresh(), eve::ui::UIHost::resolve() , 以及 eve::ui::window().

◆ refresh()

eve::Result< void > eve::pixelworld_editor::PixelWorldCatalogPanel::refresh ( )

Reconcile the mounted host with the latest draft and selection state.

在文件 PixelWorldCatalogPanel.cpp 第 352 行定义.

引用了 buildWidgetTree(), eve::Diagnostic::error(), eve::Result< T >::failure(), host(), eve::PreconditionViolation, eve::ui::UIHost::resolve() , 以及 eve::Result< T >::success().

被这些函数引用 open(), operator=() , 以及 PixelWorldCatalogPanel().

◆ removePhase()

eve::Result< CatalogDraftReceipt > eve::pixelworld_editor::PixelWorldCatalogPanel::removePhase ( std::size_t  index)

◆ removeReaction()

eve::Result< CatalogDraftReceipt > eve::pixelworld_editor::PixelWorldCatalogPanel::removeReaction ( std::size_t  index)

◆ replaceMaterial()

eve::Result< CatalogDraftReceipt > eve::pixelworld_editor::PixelWorldCatalogPanel::replaceMaterial ( eve::pixelworld::MaterialDefinition  definition)

Replace one material definition after validating the entire reconstructed Catalog.

在文件 PixelWorldCatalogPanel.cpp 第 215 行定义.

引用了 definitions, eve::pixelworld::MaterialCatalog::definitions(), eve::Diagnostic::error(), index, eve::InvalidArgument , 以及 reactions.

被这些函数引用 buildWidgetTree().

◆ replacePhase()

eve::Result< CatalogDraftReceipt > eve::pixelworld_editor::PixelWorldCatalogPanel::replacePhase ( std::size_t  index,
eve::pixelworld::MaterialPhaseRule  rule 
)

Replace one phase rule after validating the entire reconstructed Catalog.

在文件 PixelWorldCatalogPanel.cpp 第 261 行定义.

引用了 definitions, eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, eve::pixelworld::MaterialCatalog::phaseRules() , 以及 reactions.

◆ replaceReaction()

eve::Result< CatalogDraftReceipt > eve::pixelworld_editor::PixelWorldCatalogPanel::replaceReaction ( std::size_t  index,
eve::pixelworld::MaterialReactionRule  rule 
)

Replace one binary rule after validating the entire reconstructed Catalog.

在文件 PixelWorldCatalogPanel.cpp 第 227 行定义.

引用了 definitions, eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument, eve::pixelworld::MaterialCatalog::reactions() , 以及 reactions.

◆ revision()

std::uint64_t eve::pixelworld_editor::PixelWorldCatalogPanel::revision ( ) const
inlinenoexcept

Monotonic local draft revision, advanced only by accepted mutations.

在文件 PixelWorldCatalogPanel.h 第 66 行定义.

◆ selectedMaterialIndex()

std::size_t eve::pixelworld_editor::PixelWorldCatalogPanel::selectedMaterialIndex ( ) const
inlinenoexcept

Selected material index, always valid for the current nonempty draft.

在文件 PixelWorldCatalogPanel.h 第 68 行定义.

◆ selectedPhaseIndex()

std::optional< std::size_t > eve::pixelworld_editor::PixelWorldCatalogPanel::selectedPhaseIndex ( ) const
inlinenoexcept

Selected phase-rule index when at least one transition exists.

在文件 PixelWorldCatalogPanel.h 第 72 行定义.

◆ selectedReactionIndex()

std::optional< std::size_t > eve::pixelworld_editor::PixelWorldCatalogPanel::selectedReactionIndex ( ) const
inlinenoexcept

Selected reaction index when at least one binary rule exists.

在文件 PixelWorldCatalogPanel.h 第 70 行定义.

◆ selectMaterial()

eve::Result< void > eve::pixelworld_editor::PixelWorldCatalogPanel::selectMaterial ( std::size_t  index)

Select a material by canonical index without mutating the Catalog.

在文件 PixelWorldCatalogPanel.cpp 第 166 行定义.

引用了 eve::pixelworld::MaterialCatalog::definitions(), eve::Diagnostic::error(), eve::Result< T >::failure(), index, eve::InvalidArgument , 以及 eve::Result< T >::success().

◆ selectPhase()

eve::Result< void > eve::pixelworld_editor::PixelWorldCatalogPanel::selectPhase ( std::size_t  index)

◆ selectReaction()

eve::Result< void > eve::pixelworld_editor::PixelWorldCatalogPanel::selectReaction ( std::size_t  index)

◆ statusText()

const std::string & eve::pixelworld_editor::PixelWorldCatalogPanel::statusText ( ) const
inlinenoexcept

Last callback diagnostic rendered in the panel status bar.

在文件 PixelWorldCatalogPanel.h 第 126 行定义.


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