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

Owns pending UI tweens and advances them against an injected clock. @ownership UI owns one driver; handles are generation-checked via UIHost::resolve. 更多...

#include <UiTween.h>

Public 成员函数

void animateHostPos (UIHostHandle host, float x, float y, float durationMs, const std::string &ease, float delayMs, double nowMs)
 Animate selected-host window position.
 
void animateHostSize (UIHostHandle host, float w, float h, float durationMs, const std::string &ease, float delayMs, double nowMs)
 Animate selected-host explicit window size.
 
void animateHostOverlayAlpha (UIHostHandle host, float alpha, float durationMs, const std::string &ease, float delayMs, double nowMs)
 Animate selected-host overlay background alpha.
 
eve::Result< void > animateItemOpacity (UIHostHandle host, const std::string &id, float opacity, float durationMs, const std::string &ease, float delayMs, double nowMs)
 Animate one node's transient opacity.
 
eve::Result< void > animateItemPos (UIHostHandle host, const std::string &id, float x, float y, float durationMs, const std::string &ease, float delayMs, double nowMs)
 Animate one absolute node's placement offset.
 
void cancelHost (UIHostHandle host)
 Cancel every pending host tween for host.
 
void cancelItem (UIHostHandle host, const std::string &id={})
 Cancel every pending item tween for host + id (empty id = all items).
 
void cancelAll (UIHostHandle host)
 Cancel every pending tween for host.
 
void tick (double nowMs)
 Advance all pending tweens to nowMs.
 
std::size_t hostTweenCount () const noexcept
 Number of pending host tweens (tests / diagnostics).
 
std::size_t itemTweenCount () const noexcept
 Number of pending item tweens (tests / diagnostics).
 

详细描述

Owns pending UI tweens and advances them against an injected clock. @ownership UI owns one driver; handles are generation-checked via UIHost::resolve.

在文件 UiTween.h 第 78 行定义.

成员函数说明

◆ animateHostOverlayAlpha()

void eve::ui::UiTweenDriver::animateHostOverlayAlpha ( UIHostHandle  host,
float  alpha,
float  durationMs,
const std::string &  ease,
float  delayMs,
double  nowMs 
)

Animate selected-host overlay background alpha.

参数
hostTarget host handle.
alphaTarget overlay alpha clamped to [0,1].
durationMsDuration; <=0 jumps immediately.
easeEase kind (default smoothstep).
delayMsDelay before the first sample moves.
nowMsClock sample used as the tween start.

在文件 UiTween.cpp 第 243 行定义.

引用了 host, eve::ui::UiHostTween::host, m, eve::ui::OverlayAlpha, eve::ui::UIHost::resolve() , 以及 t.

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

◆ animateHostPos()

void eve::ui::UiTweenDriver::animateHostPos ( UIHostHandle  host,
float  x,
float  y,
float  durationMs,
const std::string &  ease,
float  delayMs,
double  nowMs 
)

Animate selected-host window position.

参数
hostTarget host handle.
xTarget posX (px).
yTarget posY (px).
durationMsDuration; <=0 jumps immediately.
easeEase kind (default smoothstep).
delayMsDelay before the first sample moves.
nowMsClock sample used as the tween start.

在文件 UiTween.cpp 第 189 行定义.

引用了 host, eve::ui::UiHostTween::host, m, eve::ui::Pos, eve::ui::UIHost::resolve(), t, x , 以及 y.

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

◆ animateHostSize()

void eve::ui::UiTweenDriver::animateHostSize ( UIHostHandle  host,
float  w,
float  h,
float  durationMs,
const std::string &  ease,
float  delayMs,
double  nowMs 
)

Animate selected-host explicit window size.

参数
hostTarget host handle.
wTarget width (px).
hTarget height (px).
durationMsDuration; <=0 jumps immediately.
easeEase kind (default smoothstep).
delayMsDelay before the first sample moves.
nowMsClock sample used as the tween start.

在文件 UiTween.cpp 第 216 行定义.

引用了 h, host, eve::ui::UiHostTween::host, m, eve::ui::UIHost::resolve(), eve::ui::Size, t , 以及 w.

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

◆ animateItemOpacity()

eve::Result< void > eve::ui::UiTweenDriver::animateItemOpacity ( UIHostHandle  host,
const std::string &  id,
float  opacity,
float  durationMs,
const std::string &  ease,
float  delayMs,
double  nowMs 
)

Animate one node's transient opacity.

参数
hostHost owning the node.
idNode id.
opacityTarget opacity clamped to [0,1].
durationMsDuration; <=0 jumps immediately.
easeEase kind (default smoothstep).
delayMsDelay before the first sample moves.
nowMsClock sample used as the tween start.
返回
Applied on success; StaleHandle when host is invalid; NotFound when id is missing.

在文件 UiTween.cpp 第 265 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), host, eve::ui::UiItemTween::host, id, node, eve::NotFound, opacity, eve::ui::Opacity, eve::ui::UIHost::resolve(), eve::StaleHandle, eve::Status::success(), eve::Result< T >::success() , 以及 t.

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

◆ animateItemPos()

eve::Result< void > eve::ui::UiTweenDriver::animateItemPos ( UIHostHandle  host,
const std::string &  id,
float  x,
float  y,
float  durationMs,
const std::string &  ease,
float  delayMs,
double  nowMs 
)

Animate one absolute node's placement offset.

参数
hostHost owning the node.
idNode id.
xTarget posX.
yTarget posY.
durationMsDuration; <=0 jumps immediately.
easeEase kind (default smoothstep).
delayMsDelay before the first sample moves.
nowMsClock sample used as the tween start.
返回
Applied on success; StaleHandle when host is invalid; NotFound when id is missing.
注解
Marks the node absolute so the offset is honored by layout.

在文件 UiTween.cpp 第 297 行定义.

引用了 eve::Applied, eve::Diagnostic::error(), eve::Result< T >::failure(), host, eve::ui::UiItemTween::host, id, n, node, eve::NotFound, eve::ui::Pos, eve::ui::UIHost::resolve(), eve::StaleHandle, eve::Status::success(), eve::Result< T >::success(), t, x , 以及 y.

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

◆ cancelAll()

void eve::ui::UiTweenDriver::cancelAll ( UIHostHandle  host)

Cancel every pending tween for host.

在文件 UiTween.cpp 第 349 行定义.

引用了 cancelHost(), cancelItem() , 以及 host.

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

◆ cancelHost()

void eve::ui::UiTweenDriver::cancelHost ( UIHostHandle  host)

Cancel every pending host tween for host.

在文件 UiTween.cpp 第 334 行定义.

引用了 t.

被这些函数引用 cancelAll() , 以及 eve::ui::UI::cancelHostTweens().

◆ cancelItem()

void eve::ui::UiTweenDriver::cancelItem ( UIHostHandle  host,
const std::string &  id = {} 
)

Cancel every pending item tween for host + id (empty id = all items).

在文件 UiTween.cpp 第 340 行定义.

引用了 t.

被这些函数引用 cancelAll() , 以及 eve::ui::UI::cancelItemTweens().

◆ hostTweenCount()

std::size_t eve::ui::UiTweenDriver::hostTweenCount ( ) const
inlinenoexcept

Number of pending host tweens (tests / diagnostics).

在文件 UiTween.h 第 166 行定义.

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

◆ itemTweenCount()

std::size_t eve::ui::UiTweenDriver::itemTweenCount ( ) const
inlinenoexcept

Number of pending item tweens (tests / diagnostics).

在文件 UiTween.h 第 169 行定义.

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

◆ tick()

void eve::ui::UiTweenDriver::tick ( double  nowMs)

Advance all pending tweens to nowMs.

参数
nowMsMonotonic clock in milliseconds.

在文件 UiTween.cpp 第 354 行定义.

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

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


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