载入中...
搜索中...
未找到
eve::editor::ActionTimelineWidget类 参考

Interactive timeline adapter shared by developer and in-game editor hosts. 更多...

#include <ActionTimelineWidget.h>

Public 成员函数

 ActionTimelineWidget (ActionTimelineEditor &editor, const action::ActionNotifyRegistry &registry)
 Construct a widget over authoritative editor and notify services.
 
Result< void > setViewport (float width, float rowHeight, float labelWidth=120.0f)
 Configure host-space dimensions used for layout and hit testing.
 
Result< void > setSnapInterval (Duration interval)
 Set deterministic drag/seek snapping; zero disables snapping.
 
Result< void > setVisibleRange (Duration start, Duration end)
 Set the visible timeline interval used for zoomed projection and interaction.
 
Result< void > zoom (double factor, double normalizedAnchor=0.5)
 Zoom the visible interval around a normalized anchor in [0, 1].
 
Result< void > pan (Duration delta)
 Pan the visible interval by an exact timeline delta, clamped to the asset.
 
TimelineWidgetLayout layout () const
 Project the current authoritative timeline plus any active drag preview.
 
void draw (IEditorOverlay &overlay) const
 Emit rows, items, handles and playhead to an arbitrary overlay host.
 
std::optional< TimelineHit > hitTest (float x, float y) const
 Hit-test projected item bodies and state handles.
 
Result< void > pointerDown (float x, float y, bool additiveSelection=false)
 Select an item and begin a pointer drag.
 
Result< void > pointerMove (float x)
 Update the non-authoritative drag preview.
 
Result< void > pointerUp (float x)
 Commit the active drag as one undoable edit.
 
void cancelPointer () noexcept
 Cancel a drag without mutating the timeline.
 
TimelineDragStatus dragStatus () const noexcept
 Current pointer-drag lifecycle state.
 
Result< void > seek (float x)
 Seek the editor preview cursor from a host-space coordinate.
 
Duration timeAt (float x) const noexcept
 Convert a host-space coordinate to its snapped authoritative timeline time.
 
Result< void > inspectSelection (IEditorInspector &inspector)
 Present and apply selected item timing, type and JSON payload fields.
 
std::vector< TimelineWidgetCommandDescriptor > commands () const
 Return standard menu entries with current enabled state.
 
Result< void > invoke (TimelineWidgetCommand command)
 Execute a standard menu command.
 
Result< void > handleShortcut (std::string_view shortcut)
 Execute a normalized shortcut such as Ctrl+C, Delete or Space.
 
std::vector< action::ActionNotifyDescriptor > insertableTypes (action::ActionNotifyShape shape) const
 Notify types suitable for an instant or state insertion picker.
 
Result< void > addNotifyAtCursor (const LogicalId &trackId, std::string_view type, Value::Object payload)
 Insert a validated instant notify at the preview cursor.
 
Result< void > addStateAtCursor (const LogicalId &trackId, std::string_view type, Duration duration, Value::Object payload)
 Insert a validated notify state beginning at the preview cursor.
 

详细描述

Interactive timeline adapter shared by developer and in-game editor hosts.

The widget borrows an editor and notify registry that must outlive it. Pointer drags mutate only widget preview state until pointerUp commits exactly one undoable domain transaction. All methods are owner-thread-only.

在文件 ActionTimelineWidget.h 第 119 行定义.

构造及析构函数说明

◆ ActionTimelineWidget()

eve::editor::ActionTimelineWidget::ActionTimelineWidget ( ActionTimelineEditor &  editor,
const action::ActionNotifyRegistry &  registry 
)

Construct a widget over authoritative editor and notify services.

在文件 ActionTimelineWidget.cpp 第 166 行定义.

成员函数说明

◆ addNotifyAtCursor()

Result< void > eve::editor::ActionTimelineWidget::addNotifyAtCursor ( const LogicalId &  trackId,
std::string_view  type,
Value::Object  payload 
)

Insert a validated instant notify at the preview cursor.

在文件 ActionTimelineWidget.cpp 第 871 行定义.

引用了 eve::action::Notify, eve::LogicalId::parse(), payload, trackId, type, valid , 以及 eve::action::ActionNotifyRegistry::validate().

◆ addStateAtCursor()

Result< void > eve::editor::ActionTimelineWidget::addStateAtCursor ( const LogicalId &  trackId,
std::string_view  type,
Duration  duration,
Value::Object  payload 
)

Insert a validated notify state beginning at the preview cursor.

在文件 ActionTimelineWidget.cpp 第 882 行定义.

引用了 duration, end, eve::LogicalId::parse(), payload, eve::action::StateEnter, trackId, type, valid, eve::action::ActionNotifyRegistry::validate() , 以及 eve::Duration::zero().

◆ cancelPointer()

void eve::editor::ActionTimelineWidget::cancelPointer ( )
inlinenoexcept

Cancel a drag without mutating the timeline.

在文件 ActionTimelineWidget.h 第 148 行定义.

◆ commands()

std::vector< TimelineWidgetCommandDescriptor > eve::editor::ActionTimelineWidget::commands ( ) const

Return standard menu entries with current enabled state.

在文件 ActionTimelineWidget.cpp 第 785 行定义.

◆ dragStatus()

TimelineDragStatus eve::editor::ActionTimelineWidget::dragStatus ( ) const
inlinenoexcept

Current pointer-drag lifecycle state.

在文件 ActionTimelineWidget.h 第 150 行定义.

◆ draw()

◆ handleShortcut()

Result< void > eve::editor::ActionTimelineWidget::handleShortcut ( std::string_view  shortcut)

Execute a normalized shortcut such as Ctrl+C, Delete or Space.

在文件 ActionTimelineWidget.cpp 第 843 行定义.

◆ hitTest()

std::optional< TimelineHit > eve::editor::ActionTimelineWidget::hitTest ( float  x,
float  y 
) const

Hit-test projected item bodies and state handles.

在文件 ActionTimelineWidget.cpp 第 474 行定义.

引用了 eve::editor::TimelineHit::itemId, layout, projected, x , 以及 y.

◆ insertableTypes()

std::vector< action::ActionNotifyDescriptor > eve::editor::ActionTimelineWidget::insertableTypes ( action::ActionNotifyShape  shape) const

Notify types suitable for an instant or state insertion picker.

在文件 ActionTimelineWidget.cpp 第 856 行定义.

引用了 descriptor, eve::action::ActionNotifyRegistry::descriptors() , 以及 shape.

◆ inspectSelection()

Result< void > eve::editor::ActionTimelineWidget::inspectSelection ( IEditorInspector &  inspector)

◆ invoke()

Result< void > eve::editor::ActionTimelineWidget::invoke ( TimelineWidgetCommand  command)

Execute a standard menu command.

在文件 ActionTimelineWidget.cpp 第 798 行定义.

引用了 eve::Result< T >::failure().

◆ layout()

◆ pan()

Result< void > eve::editor::ActionTimelineWidget::pan ( Duration  delta)

◆ pointerDown()

Result< void > eve::editor::ActionTimelineWidget::pointerDown ( float  x,
float  y,
bool  additiveSelection = false 
)

Select an item and begin a pointer drag.

在文件 ActionTimelineWidget.cpp 第 499 行定义.

引用了 hit, eve::editing::noOp(), x , 以及 y.

◆ pointerMove()

Result< void > eve::editor::ActionTimelineWidget::pointerMove ( float  x)

Update the non-authoritative drag preview.

在文件 ActionTimelineWidget.cpp 第 576 行定义.

引用了 x.

◆ pointerUp()

Result< void > eve::editor::ActionTimelineWidget::pointerUp ( float  x)

Commit the active drag as one undoable edit.

在文件 ActionTimelineWidget.cpp 第 578 行定义.

引用了 updated, value , 以及 x.

◆ seek()

Result< void > eve::editor::ActionTimelineWidget::seek ( float  x)

Seek the editor preview cursor from a host-space coordinate.

在文件 ActionTimelineWidget.cpp 第 604 行定义.

引用了 x.

◆ setSnapInterval()

Result< void > eve::editor::ActionTimelineWidget::setSnapInterval ( Duration  interval)

Set deterministic drag/seek snapping; zero disables snapping.

在文件 ActionTimelineWidget.cpp 第 179 行定义.

引用了 eve::Duration::zero().

◆ setViewport()

Result< void > eve::editor::ActionTimelineWidget::setViewport ( float  width,
float  rowHeight,
float  labelWidth = 120.0f 
)

Configure host-space dimensions used for layout and hit testing.

在文件 ActionTimelineWidget.cpp 第 169 行定义.

引用了 width.

◆ setVisibleRange()

Result< void > eve::editor::ActionTimelineWidget::setVisibleRange ( Duration  start,
Duration  end 
)

Set the visible timeline interval used for zoomed projection and interaction.

在文件 ActionTimelineWidget.cpp 第 186 行定义.

引用了 eve::action::ActionTimeline::duration, duration, end, start, eve::editor::ActionTimelineEditor::target(), eve::editor::ActionTimelineTarget::timeline() , 以及 eve::Duration::zero().

◆ timeAt()

Duration eve::editor::ActionTimelineWidget::timeAt ( float  x) const
inlinenoexcept

Convert a host-space coordinate to its snapped authoritative timeline time.

在文件 ActionTimelineWidget.h 第 157 行定义.

引用了 x.

◆ zoom()

Result< void > eve::editor::ActionTimelineWidget::zoom ( double  factor,
double  normalizedAnchor = 0.5 
)

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