Platform / renderer backend for declarative UI. Concrete implementations live under ui/<backend>/ (e.g. ui/imgui). 更多...
#include <UIBackend.h>
Public 成员函数 | |
| virtual | ~UIBackend ()=default |
| Releases UIBackend resources. | |
| virtual bool | init (SDL_Window *window, eve::graphics::Graphics *gfx)=0 |
| Initializes . | |
| virtual void | shutdown ()=0 |
| Shutdown. | |
| virtual bool | isInitialized () const =0 |
| True when initialized. | |
| virtual void | processEvent (const SDL_Event *event)=0 |
| Process event. | |
| virtual void | newFrame ()=0 |
| Creates a frame. @ownership Caller deletes unless documented otherwise. | |
| virtual bool | wantCaptureMouse () const |
| Want capture mouse. | |
| virtual bool | wantCaptureKeyboard () const |
| Want capture keyboard. | |
| virtual void | setScale (float) |
| Scale fonts + ImGui style metrics (1 = default desktop). | |
| virtual float | getScale () const |
| Returns the scale. | |
| virtual uint64_t | registerTexture (graphics::Texture *) |
| Registers texture. | |
| virtual void | unregisterTexture (uint64_t) |
| Unregisters texture. | |
| virtual bool | textureSize (uint64_t, int *, int *) const |
| Texture size. | |
| virtual void * | textureHandle (uint64_t) const |
| Returns an opaque backend draw handle for a registered texture. | |
| virtual bool | usesQueuedTextureDraws () const |
| Whether textures require the backend's ordered texture draw bridge. | |
| virtual void | queueTextureDraw (uint64_t, float, float, float, float, float, float, float, float, float, float, float, float, bool) |
| Queue one textured rectangle in the current UI coordinate space. | |
详细描述
Platform / renderer backend for declarative UI. Concrete implementations live under ui/<backend>/ (e.g. ui/imgui).
在文件 UIBackend.h 第 20 行定义.
构造及析构函数说明
◆ ~UIBackend()
|
virtualdefault |
Releases UIBackend resources.
成员函数说明
◆ getScale()
|
inlinevirtual |
◆ init()
|
pure virtual |
Initializes .
在 eve::ui::ImGuiBackend 内被实现.
◆ isInitialized()
|
pure virtual |
True when initialized.
在 eve::ui::ImGuiBackend 内被实现.
◆ newFrame()
|
pure virtual |
Creates a frame. @ownership Caller deletes unless documented otherwise.
在 eve::ui::ImGuiBackend 内被实现.
◆ processEvent()
|
pure virtual |
Process event.
在 eve::ui::ImGuiBackend 内被实现.
◆ queueTextureDraw()
|
inlinevirtual |
Queue one textured rectangle in the current UI coordinate space.
- 参数
-
id Opaque id returned by registerTexture(). x Left edge in UI coordinates. y Top edge in UI coordinates. w Rectangle width. h Rectangle height. u0 Left texture coordinate. v0 Top texture coordinate. u1 Right texture coordinate. v1 Bottom texture coordinate. r Red tint multiplier. g Green tint multiplier. b Blue tint multiplier. a Alpha tint multiplier. opaque Whether composition must replace destination alpha.
在文件 UIBackend.h 第 100 行定义.
◆ registerTexture()
|
inlinevirtual |
Registers texture.
Register an engine texture for UI drawing. Returns an opaque id usable as UINode::textureId (0 = unsupported / failure). The texture must stay alive while registered.
在文件 UIBackend.h 第 54 行定义.
◆ setScale()
|
inlinevirtual |
Scale fonts + ImGui style metrics (1 = default desktop).
被 eve::ui::ImGuiBackend 重载.
在文件 UIBackend.h 第 43 行定义.
◆ shutdown()
|
pure virtual |
Shutdown.
在 eve::ui::ImGuiBackend 内被实现.
◆ textureHandle()
|
inlinevirtual |
Returns an opaque backend draw handle for a registered texture.
- 返回
- Borrowed nullable handle owned by the backend; null means unknown or unsupported. @ownership The backend owns the handle and callers must not free or cast it beyond the backend contract. @lifetime Valid until unregisterTexture(), backend shutdown, or device reset. @thread Call on the UI/render thread. @reentrancy The lookup invokes no callbacks and is invalid across backend mutation.
在文件 UIBackend.h 第 70 行定义.
◆ textureSize()
|
inlinevirtual |
Texture size.
Texture pixel size for a registered id (used by nine-patch UV math).
在文件 UIBackend.h 第 61 行定义.
◆ unregisterTexture()
|
inlinevirtual |
Unregisters texture.
在文件 UIBackend.h 第 58 行定义.
◆ usesQueuedTextureDraws()
|
inlinevirtual |
Whether textures require the backend's ordered texture draw bridge.
Older renderer integrations may not support a texture handle per draw command. Declarative widgets keep their normal layout/input behavior and enqueue their textured rectangles through queueTextureDraw instead. Queued rectangles preserve their position among ordinary UI commands.
- 返回
- True when declarative widgets must use queueTextureDraw().
在文件 UIBackend.h 第 82 行定义.
◆ wantCaptureKeyboard()
|
inlinevirtual |
◆ wantCaptureMouse()
|
inlinevirtual |
该类的文档由以下文件生成:
- src/modules/ui/UIBackend.h