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

Platform / renderer backend for declarative UI. Concrete implementations live under ui/<backend>/ (e.g. ui/imgui). 更多...

#include <UIBackend.h>

类 eve::ui::UIBackend 继承关系图:
eve::ui::ImGuiBackend

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

virtual eve::ui::UIBackend::~UIBackend ( )
virtualdefault

Releases UIBackend resources.

成员函数说明

◆ getScale()

virtual float eve::ui::UIBackend::getScale ( ) const
inlinevirtual

Returns the scale.

被 eve::ui::ImGuiBackend 重载.

在文件 UIBackend.h 第 45 行定义.

◆ init()

virtual bool eve::ui::UIBackend::init ( SDL_Window *  window,
eve::graphics::Graphics *  gfx 
)
pure virtual

Initializes .

在 eve::ui::ImGuiBackend 内被实现.

◆ isInitialized()

virtual bool eve::ui::UIBackend::isInitialized ( ) const
pure virtual

True when initialized.

在 eve::ui::ImGuiBackend 内被实现.

◆ newFrame()

virtual void eve::ui::UIBackend::newFrame ( )
pure virtual

Creates a frame. @ownership Caller deletes unless documented otherwise.

在 eve::ui::ImGuiBackend 内被实现.

◆ processEvent()

virtual void eve::ui::UIBackend::processEvent ( const SDL_Event *  event)
pure virtual

Process event.

在 eve::ui::ImGuiBackend 内被实现.

◆ queueTextureDraw()

virtual void eve::ui::UIBackend::queueTextureDraw ( uint64_t  ,
float  ,
float  ,
float  ,
float  ,
float  ,
float  ,
float  ,
float  ,
float  ,
float  ,
float  ,
float  ,
bool   
)
inlinevirtual

Queue one textured rectangle in the current UI coordinate space.

参数
idOpaque id returned by registerTexture().
xLeft edge in UI coordinates.
yTop edge in UI coordinates.
wRectangle width.
hRectangle height.
u0Left texture coordinate.
v0Top texture coordinate.
u1Right texture coordinate.
v1Bottom texture coordinate.
rRed tint multiplier.
gGreen tint multiplier.
bBlue tint multiplier.
aAlpha tint multiplier.
opaqueWhether composition must replace destination alpha.

在文件 UIBackend.h 第 100 行定义.

◆ registerTexture()

virtual uint64_t eve::ui::UIBackend::registerTexture ( graphics::Texture *  )
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()

virtual void eve::ui::UIBackend::setScale ( float  )
inlinevirtual

Scale fonts + ImGui style metrics (1 = default desktop).

被 eve::ui::ImGuiBackend 重载.

在文件 UIBackend.h 第 43 行定义.

◆ shutdown()

virtual void eve::ui::UIBackend::shutdown ( )
pure virtual

Shutdown.

在 eve::ui::ImGuiBackend 内被实现.

◆ textureHandle()

virtual void * eve::ui::UIBackend::textureHandle ( uint64_t  ) const
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()

virtual bool eve::ui::UIBackend::textureSize ( uint64_t  ,
int *  ,
int *   
) const
inlinevirtual

Texture size.

Texture pixel size for a registered id (used by nine-patch UV math).

在文件 UIBackend.h 第 61 行定义.

◆ unregisterTexture()

virtual void eve::ui::UIBackend::unregisterTexture ( uint64_t  )
inlinevirtual

Unregisters texture.

在文件 UIBackend.h 第 58 行定义.

◆ usesQueuedTextureDraws()

virtual bool eve::ui::UIBackend::usesQueuedTextureDraws ( ) const
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()

virtual bool eve::ui::UIBackend::wantCaptureKeyboard ( ) const
inlinevirtual

Want capture keyboard.

被 eve::ui::ImGuiBackend 重载.

在文件 UIBackend.h 第 40 行定义.

◆ wantCaptureMouse()

virtual bool eve::ui::UIBackend::wantCaptureMouse ( ) const
inlinevirtual

Want capture mouse.

被 eve::ui::ImGuiBackend 重载.

在文件 UIBackend.h 第 38 行定义.


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