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 第 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()
|
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()
|
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 第 370 行定义.
引用了 animationSection, binding, bottom, bucket, eve::editor::IEditorOverlay::circle(), color, current, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::action::ActionParameterCurveBinding::fromPayload(), eve::action::ActionAudioBinding::fromPayload(), height, index, key, layout, eve::editor::IEditorOverlay::line(), maximum, minimum, eve::NotFound, pixels, point, previous, eve::editor::IEditorOverlay::rectangle(), request, eve::action::State, step, eve::editor::IEditorOverlay::text(), time, top, value, view, 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 第 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 | ) |
Present and apply selected item timing, type and JSON payload fields.
在文件 ActionTimelineWidget.cpp 第 606 行定义.
引用了 eve::action::actionBlendCurveFromName(), eve::action::actionBlendCurveName(), eve::action::actionParameterInterpolationName(), eve::action::actionParameterOperationName(), eve::action::ActionAnimationSection::animationUri, eve::editor::IEditorInspector::beginGroup(), binding, blend, eve::action::ActionAnimationSection::blendCurve, eve::action::ActionAnimationSection::blendIn, eve::action::ActionNotifyRegistry::descriptor(), descriptor, eve::action::ActionAnimationSection::end, 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(), 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::action::ActionNotifyRegistry::validate(), eve::Result< T >::value() , 以及 value.
◆ invoke()
| Result< void > eve::editor::ActionTimelineWidget::invoke | ( | TimelineWidgetCommand | command | ) |
Execute a standard menu command.
在文件 ActionTimelineWidget.cpp 第 798 行定义.
◆ layout()
| TimelineWidgetLayout eve::editor::ActionTimelineWidget::layout | ( | ) | const |
Project the current authoritative timeline plus any active drag preview.
在文件 ActionTimelineWidget.cpp 第 299 行定义.
引用了 eve::action::ActionTimeline::animationSections, eve::editor::TimelineWidgetLayout::audioWaveformsAvailable, eve::action::ActionTimeline::duration, duration, end, eve::Duration::fromNanoseconds(), eve::LogicalId::fromParts(), eve::editor::TimelineWidgetLayout::height, id, index, eve::editor::TimelineWidgetLayout::items, eve::Duration::nanoseconds(), eve::editor::TimelineWidgetLayout::playheadX, eve::editor::ActionTimelineEditor::previewTime(), eve::editor::TimelineWidgetLayout::rulerTicks, 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 第 215 行定义.
引用了 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 第 499 行定义.
引用了 hit, eve::editing::noOp(), 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 第 578 行定义.
◆ seek()
| Result< void > eve::editor::ActionTimelineWidget::seek | ( | float | x | ) |
Seek the editor preview cursor from a host-space coordinate.
在文件 ActionTimelineWidget.cpp 第 604 行定义.
引用了 x.
◆ setSnapInterval()
Set deterministic drag/seek snapping; zero disables snapping.
在文件 ActionTimelineWidget.cpp 第 179 行定义.
◆ 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()
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()
|
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 第 196 行定义.
引用了 anchor, 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