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()
|
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()
|
static |
Change queue.
在文件 UISystem.cpp 第 1619 行定义.
◆ clearBackend()
|
staticnoexcept |
Clears the backend association before the backend is shut down.
在文件 UISystem.cpp 第 1644 行定义.
被这些函数引用 eve::ui::UI::shutdownBackend().
◆ clickQueue()
|
static |
在文件 UISystem.cpp 第 1618 行定义.
◆ consumeChange()
|
static |
Pop next change as "name/node"; empty if none.
在文件 UISystem.cpp 第 1912 行定义.
引用了 c.
被这些函数引用 eve::ui::UI::consumeChange().
◆ consumeClick()
|
static |
Pop next click as "name/node"; empty if none.
在文件 UISystem.cpp 第 1894 行定义.
引用了 c.
被这些函数引用 eve::ui::UI::consumeClick().
◆ consumeClickFor()
|
static |
Pop next click for a specific host; returns node id only (or "").
在文件 UISystem.cpp 第 1902 行定义.
引用了 id.
◆ consumeDrop()
|
static |
Pops the oldest completed drop, or returns empty when none exists.
在文件 UISystem.cpp 第 1636 行定义.
被这些函数引用 eve::ui::UI::consumeDrop().
◆ dispatchEvents()
|
static |
Dispatches events.
在文件 UISystem.cpp 第 1820 行定义.
引用了 c, events, first, handler, eve::ui::UINode::handlerClick, host, eve::ui::UIClick::hostName, eve::ui::UIChange::hostName, idx, eve::ui::Ignore, index, eve::ui::UIChange::kind, node, eve::ui::UIChange::nodeId, eve::ui::UIHost::resolve(), eve::ui::Stop, t , 以及 target.
被这些函数引用 eve::ui::UI::dispatchEvents().
◆ 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()
|
static |
Returns the owning completed-drop queue.
在文件 UISystem.cpp 第 1620 行定义.
◆ enqueuePlatformFileDrop()
|
static |
Copies an OS file-drop path into UI-owned pending state.
- 参数
-
path UTF-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()
|
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()
|
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()
|
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()
|
static |
◆ render()
|
static |
Walk all UIHost (+ subclasses) via ECS View.
在文件 UISystem.cpp 第 1715 行定义.
引用了 a, anchor, eve::ui::applyThemeToImGui(), eve::ui::Avoid, b, camera, eve::ui::Crowded, EV_PROFILE_MODULE, eve::ui::globalTheme(), height, host, eve::ui::measureTree(), eve::ui::UIHost::resolve(), eve::ui::resolveWorldAnchorOverlaps(), root, theme, view , 以及 width.
被这些函数引用 eve::ui::UI::beginFrameAndRender().
◆ setBackend()
|
static |
Sets the borrowed backend used for the current UI/render lifetime.
在文件 UISystem.cpp 第 1643 行定义.
引用了 backend().
被这些函数引用 eve::ui::UI::initBackend().
◆ stats()
|
static |
在文件 UISystem.cpp 第 1649 行定义.
被这些函数引用 eve::ui::UI::getStats().
◆ viewportState()
|
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().
该类的文档由以下文件生成:
- src/modules/ui/UISystem.h
- src/modules/ui/UISystem.cpp