Interactive timeline adapter shared by developer and in-game editor hosts. 更多...
#include <ActionTimelineWidget.h>
Public 成员函数 | |
| ActionTimelineWidget (ActionTimelineEditor &editor, const action::ActionNotifyRegistry ®istry) | |
| 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 第 170 行定义.
成员函数说明
◆ 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 第 916 行定义.
引用了 eve::action::Notify, eve::LogicalId::parse(), payload, trackId, type , 以及 valid.
◆ 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 第 927 行定义.
引用了 duration, end, eve::LogicalId::parse(), payload, eve::action::StateEnter, trackId, type, valid , 以及 eve::Duration::zero().
◆ 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 第 830 行定义.
引用了 selected.
◆ dragStatus()
|
inlinenoexcept |
Current pointer-drag lifecycle state.
在文件 ActionTimelineWidget.h 第 150 行定义.
◆ draw()
| void eve::editor::ActionTimelineWidget::draw | ( | IEditorOverlay & | overlay | ) | const |
Emit rows, items, handles and playhead to an arbitrary overlay host.
在文件 ActionTimelineWidget.cpp 第 374 行定义.
引用了 animationSection, binding, bottom, bucket, eve::editor::IEditorOverlay::circle(), color, current, curve, eve::Diagnostic::error(), eve::action::evaluateActionBlendCurve(), eve::Result< T >::failure(), eve::Duration::fromNanoseconds(), eve::action::ActionParameterCurveBinding::fromPayload(), eve::action::ActionAudioBinding::fromPayload(), height, index, input, key, layout, eve::editor::IEditorOverlay::line(), maximum, minimum, eve::NotFound, pixels, point, previous, eve::editor::IEditorOverlay::rectangle(), request, segments, eve::action::State, step, eve::editor::IEditorOverlay::text(), time, top, value, view, waveform, weight, x , 以及 y.
◆ handleShortcut()
| Result< void > eve::editor::ActionTimelineWidget::handleShortcut | ( | std::string_view | shortcut | ) |
Execute a normalized shortcut such as Ctrl+C, Delete or Space.
在文件 ActionTimelineWidget.cpp 第 888 行定义.
◆ hitTest()
| std::optional< TimelineHit > eve::editor::ActionTimelineWidget::hitTest | ( | float | x, |
| float | y | ||
| ) | const |
Hit-test projected item bodies and state handles.
在文件 ActionTimelineWidget.cpp 第 510 行定义.
引用了 eve::editor::TimelineHit::itemId, layout, 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 第 901 行定义.
引用了 descriptor , 以及 shape.
◆ inspectSelection()
| Result< void > eve::editor::ActionTimelineWidget::inspectSelection | ( | IEditorInspector & | inspector | ) |
Present and apply selected item timing, type and JSON payload fields.
在文件 ActionTimelineWidget.cpp 第 642 行定义.
引用了 eve::action::actionBlendCurveFromName(), eve::action::actionBlendCurveName(), eve::action::actionParameterInterpolationName(), eve::action::actionParameterOperationName(), eve::action::ActionAnimationSection::animationUri, eve::editor::IEditorInspector::beginGroup(), binding, eve::action::ActionAnimationSection::blendIn, eve::action::ActionAnimationSection::blendInCurve, eve::action::ActionAnimationSection::blendOut, eve::action::ActionAnimationSection::blendOutCurve, changed, descriptor, end, eve::action::ActionAnimationSection::end, eve::editor::IEditorInspector::endGroup(), eve::Result< T >::failure(), eve::LogicalId::format(), eve::Value::fromJson(), eve::action::ActionParameterCurveBinding::fromPayload(), eve::Duration::fromSeconds(), index, eve::action::Instant, key, maximum, eve::editing::noOp(), eve::action::Notify, object, operation, eve::LogicalId::parse(), payload, range, eve::editor::IEditorInspector::scalar(), selected, eve::action::ActionAnimationSection::sourceEnd, eve::action::ActionAnimationSection::sourceStart, eve::action::ActionAnimationSection::start, start, eve::action::State, eve::action::StateEnter, eve::editor::IEditorInspector::string(), eve::Result< T >::success(), target, time, eve::Value::toJson(), eve::action::ActionTimelineEvent::trackId, type, eve::Result< T >::value() , 以及 value.
◆ invoke()
| Result< void > eve::editor::ActionTimelineWidget::invoke | ( | TimelineWidgetCommand | command | ) |
Execute a standard menu command.
在文件 ActionTimelineWidget.cpp 第 843 行定义.
引用了 eve::Result< T >::failure(), result , 以及 selected.
◆ layout()
| TimelineWidgetLayout eve::editor::ActionTimelineWidget::layout | ( | ) | const |
Project the current authoritative timeline plus any active drag preview.
在文件 ActionTimelineWidget.cpp 第 303 行定义.
引用了 eve::action::ActionTimeline::animationSections, eve::action::ActionTimeline::duration, duration, end, eve::Duration::fromNanoseconds(), eve::LogicalId::fromParts(), id, index, eve::Duration::nanoseconds(), eve::editor::ActionTimelineEditor::previewTime(), result, selected, eve::editor::ActionTimelineEditor::selectedItemIds(), start, eve::editor::ActionTimelineEditor::target(), tick, time, eve::editor::ActionTimelineTarget::timeline(), eve::action::ActionTimeline::tracks , 以及 eve::editor::TimelineWidgetLayout::width.
◆ pan()
Pan the visible interval by an exact timeline delta, clamped to the asset.
在文件 ActionTimelineWidget.cpp 第 219 行定义.
引用了 eve::action::ActionTimeline::duration, duration, end, eve::Duration::fromNanoseconds(), eve::Duration::nanoseconds(), start, eve::editor::ActionTimelineEditor::target(), eve::editor::ActionTimelineTarget::timeline() , 以及 eve::Duration::zero().
◆ pointerDown()
| Result< void > eve::editor::ActionTimelineWidget::pointerDown | ( | float | x, |
| float | y, | ||
| bool | additiveSelection = false |
||
| ) |
Select an item and begin a pointer drag.
在文件 ActionTimelineWidget.cpp 第 535 行定义.
引用了 hit, eve::editing::noOp(), selected, x , 以及 y.
◆ pointerMove()
| Result< void > eve::editor::ActionTimelineWidget::pointerMove | ( | float | x | ) |
◆ pointerUp()
| Result< void > eve::editor::ActionTimelineWidget::pointerUp | ( | float | x | ) |
Commit the active drag as one undoable edit.
在文件 ActionTimelineWidget.cpp 第 614 行定义.
◆ seek()
| Result< void > eve::editor::ActionTimelineWidget::seek | ( | float | x | ) |
Seek the editor preview cursor from a host-space coordinate.
在文件 ActionTimelineWidget.cpp 第 640 行定义.
引用了 x.
◆ setSnapInterval()
Set deterministic drag/seek snapping; zero disables snapping.
在文件 ActionTimelineWidget.cpp 第 183 行定义.
◆ 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 第 173 行定义.
引用了 width.
◆ setVisibleRange()
Set the visible timeline interval used for zoomed projection and interaction.
在文件 ActionTimelineWidget.cpp 第 190 行定义.
引用了 eve::action::ActionTimeline::duration, duration, end, start, eve::editor::ActionTimelineEditor::target(), eve::editor::ActionTimelineTarget::timeline() , 以及 eve::Duration::zero().
◆ timeAt()
|
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 |
||
| ) |
Zoom the visible interval around a normalized anchor in [0, 1].
在文件 ActionTimelineWidget.cpp 第 200 行定义.
引用了 eve::action::ActionTimeline::duration, duration, end, eve::Duration::fromNanoseconds(), start, eve::editor::ActionTimelineEditor::target(), eve::editor::ActionTimelineTarget::timeline() , 以及 eve::Duration::zero().
该类的文档由以下文件生成:
- src/modules/action/editor/ActionTimelineWidget.h
- src/modules/action/editor/ActionTimelineWidget.cpp