载入中...
搜索中...
未找到
eve::ui::UISystem类 参考

EVENGINE_API_WORLD public API. 更多...

#include <UISystem.h>

静态 Public 成员函数

static void setBackend (UIBackend &backend)
 Sets the borrowed backend used for the current UI/render lifetime.
 
static void clearBackend () noexcept
 Clears the backend association before the backend is shut down.
 
static eve::OptionalRef< UIBackend > backend ()
 Returns the configured backend for the current synchronous operation.
 
static const UIStats & stats ()
 
static eve::OptionalRef< ViewportState > viewportState (const std::string &hostName, const std::string &nodeId)
 Returns viewport state for a host/node key when it exists.
 
static eve::ResultRef< ViewportState > ensureViewport (const std::string &key, int w, int h)
 Creates or refreshes offscreen state for a viewport key.
 
static void render ()
 Walk all UIHost (+ subclasses) via ECS View.
 
static std::vector< UIEvent > & pendingEvents ()
 Pending events.
 
static void dispatchEvents ()
 Dispatches events.
 
static UIHostHandle findHost (const std::string &name)
 Lookup by Meta.name across the UIHost View.
 
static UIHostHandle findHostByOwner (uint32_t ownerId)
 Find the first host with Meta.ownerId equal to ownerId, or null.
 
static std::vector< UIClick > & clickQueue ()
 
static std::vector< UIChange > & changeQueue ()
 Change queue.
 
static DragDropSupport dragDropSupport () noexcept
 Returns retained drag-and-drop availability for this build target.
 
static void enqueuePlatformFileDrop (const std::string &path)
 Copies an OS file-drop path into UI-owned pending state.
 
static std::vector< UIDrop > & dropQueue ()
 Returns the owning completed-drop queue.
 
static std::optional< UIDrop > consumeDrop ()
 Pops the oldest completed drop, or returns empty when none exists.
 
static std::string consumeClick ()
 Pop next click as "name/node"; empty if none.
 
static std::string consumeClickFor (const std::string &hostName)
 Pop next click for a specific host; returns node id only (or "").
 
static std::string consumeChange ()
 Pop next change as "name/node"; empty if none.
 

详细描述

EVENGINE_API_WORLD public API.

在文件 UISystem.h 第 97 行定义.

成员函数说明

◆ backend()

std::optional< std::reference_wrapper< UIBackend > > eve::ui::UISystem::backend ( )
static

Returns the configured backend for the current synchronous operation.

返回
A borrowed reference when configured, or empty when unavailable. @ownership UISystem does not own the backend. @lifetime The reference is valid until backend replacement or teardown; do not retain it. @thread Call on the UI/render thread.

在文件 UISystem.cpp 第 1645 行定义.

被这些函数引用 setBackend().

◆ changeQueue()

std::vector< UIChange > & eve::ui::UISystem::changeQueue ( )
static

Change queue.

在文件 UISystem.cpp 第 1619 行定义.

◆ clearBackend()

void eve::ui::UISystem::clearBackend ( )
staticnoexcept

Clears the backend association before the backend is shut down.

在文件 UISystem.cpp 第 1644 行定义.

被这些函数引用 eve::ui::UI::shutdownBackend().

◆ clickQueue()

std::vector< UIClick > & eve::ui::UISystem::clickQueue ( )
static

在文件 UISystem.cpp 第 1618 行定义.

◆ consumeChange()

std::string eve::ui::UISystem::consumeChange ( )
static

Pop next change as "name/node"; empty if none.

在文件 UISystem.cpp 第 1912 行定义.

引用了 c.

被这些函数引用 eve::ui::UI::consumeChange().

◆ consumeClick()

std::string eve::ui::UISystem::consumeClick ( )
static

Pop next click as "name/node"; empty if none.

在文件 UISystem.cpp 第 1894 行定义.

引用了 c.

被这些函数引用 eve::ui::UI::consumeClick().

◆ consumeClickFor()

std::string eve::ui::UISystem::consumeClickFor ( const std::string &  hostName)
static

Pop next click for a specific host; returns node id only (or "").

在文件 UISystem.cpp 第 1902 行定义.

引用了 id.

◆ consumeDrop()

std::optional< UIDrop > eve::ui::UISystem::consumeDrop ( )
static

Pops the oldest completed drop, or returns empty when none exists.

在文件 UISystem.cpp 第 1636 行定义.

被这些函数引用 eve::ui::UI::consumeDrop().

◆ dispatchEvents()

◆ dragDropSupport()

DragDropSupport eve::ui::UISystem::dragDropSupport ( )
staticnoexcept

Returns retained drag-and-drop availability for this build target.

在文件 UISystem.cpp 第 1622 行定义.

引用了 eve::ui::Supported , 以及 eve::ui::UnsupportedPlatform.

被这些函数引用 eve::ui::UI::dragDropSupport(), enqueuePlatformFileDrop() , 以及 eve::ui::UI::processEvent().

◆ dropQueue()

std::vector< UIDrop > & eve::ui::UISystem::dropQueue ( )
static

Returns the owning completed-drop queue.

在文件 UISystem.cpp 第 1620 行定义.

◆ enqueuePlatformFileDrop()

void eve::ui::UISystem::enqueuePlatformFileDrop ( const std::string &  path)
static

Copies an OS file-drop path into UI-owned pending state.

参数
pathUTF-8 path copied synchronously; the caller retains no lifetime obligation. @thread Call on the platform/UI thread.

在文件 UISystem.cpp 第 1631 行定义.

引用了 dragDropSupport(), path , 以及 eve::ui::Supported.

被这些函数引用 eve::ui::UI::processEvent().

◆ ensureViewport()

eve::Result< std::reference_wrapper< ViewportState > > eve::ui::UISystem::ensureViewport ( const std::string &  key,
int  w,
int  h 
)
static

Creates or refreshes offscreen state for a viewport key.

返回
A borrowed state reference, or a structured failure for invalid dimensions/key. @ownership UISystem owns the state and Graphics owns its Canvas. @lifetime Valid until viewport removal, refresh, or render-state reset; do not retain it. @thread Call on the UI/render thread.

在文件 UISystem.cpp 第 1651 行定义.

引用了 eve::ui::ViewportState::canvas, eve::Diagnostic::error(), eve::Failed, eve::Status::failure(), eve::graphics::Canvas::getTexture(), h, eve::ui::ViewportState::height, eve::InvalidArgument, key, eve::ui::ViewportState::key, eve::Rejected, eve::ui::ViewportState::textureId, eve::Unsupported, w , 以及 eve::ui::ViewportState::width.

被这些函数引用 eve::ui::UI::viewportCanvas().

◆ findHost()

UIHostHandle eve::ui::UISystem::findHost ( const std::string &  name)
static

Lookup by Meta.name across the UIHost View.

返回
Borrowed nullable host owned by the UI ECS world. @ownership UISystem does not own the host; callers must not delete it. @lifetime Valid until host destruction or ECS structural mutation. @thread Call on the UI thread. @reentrancy The lookup invokes no callbacks and is invalid across ECS mutation.

在文件 UISystem.cpp 第 1691 行定义.

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

被这些函数引用 eve::ui_editor::UiThemeEditor::applyPreviewHost(), eve::ui::UI::findHost() , 以及 eve::ui::Component::mountAs().

◆ findHostByOwner()

UIHostHandle eve::ui::UISystem::findHostByOwner ( uint32_t  ownerId)
static

Find the first host with Meta.ownerId equal to ownerId, or null.

返回
Borrowed nullable host owned by the UI ECS world. @ownership UISystem does not own the host; callers must not delete it. @lifetime Valid until host destruction or ECS structural mutation. @thread Call on the UI thread. @reentrancy The lookup invokes no callbacks and is invalid across ECS mutation.

在文件 UISystem.cpp 第 1703 行定义.

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

被这些函数引用 eve::ui::UI::findHostByOwner().

◆ pendingEvents()

std::vector< UIEvent > & eve::ui::UISystem::pendingEvents ( )
static

Pending events.

在文件 UISystem.cpp 第 1617 行定义.

被这些函数引用 eve::ui::UI::dispatchEvents().

◆ render()

void eve::ui::UISystem::render ( )
static

◆ setBackend()

void eve::ui::UISystem::setBackend ( UIBackend &  backend)
static

Sets the borrowed backend used for the current UI/render lifetime.

在文件 UISystem.cpp 第 1643 行定义.

引用了 backend().

被这些函数引用 eve::ui::UI::initBackend().

◆ stats()

const UIStats & eve::ui::UISystem::stats ( )
static

在文件 UISystem.cpp 第 1649 行定义.

被这些函数引用 eve::ui::UI::getStats().

◆ viewportState()

std::optional< std::reference_wrapper< ViewportState > > eve::ui::UISystem::viewportState ( const std::string &  hostName,
const std::string &  nodeId 
)
static

Returns viewport state for a host/node key when it exists.

返回
A borrowed reference for this synchronous operation, or empty when absent. @ownership UISystem owns the state. @lifetime Valid until viewport removal, refresh, or render-state reset; do not retain it. @thread Call on the UI/render thread.

在文件 UISystem.cpp 第 1684 行定义.

引用了 nodeId.

被这些函数引用 eve::ui::UI::viewportActive(), eve::ui::UI::viewportCanvas(), eve::ui::UI::viewportDragDX(), eve::ui::UI::viewportDragDY(), eve::ui::UI::viewportHovered(), eve::ui::UI::viewportMouseX(), eve::ui::UI::viewportMouseY() , 以及 eve::ui::UI::viewportWheel().


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