Skip to content

General Timeline Classes

Gary edited this page Aug 27, 2014 · 1 revision

Table of Contents

Like the interfaces discussed in Timeline Interfaces, these classes are UI-platform-agnostic and reside in the Sce.Atf.Controls.Timelines namespace and Atf.Gui assembly. These classes provide information needed for rendering and displaying timelines.

Timeline Constraint Classes

TimelineConstraints is an abstract class with methods that test whether certain constraints on timeline objects are met. Various manipulators and the timeline control use these methods to determine whether a given change to an event or interval is valid or not. For instance, the time line control tests that a pasted interval does not overlap the other intervals in a track.

  • bool IsStartValid(IEvent _event, ref float start): Test if a given start value would be valid for the given event. The start value is modified to make it valid. It is used by D2dMoveManipulator.
  • bool IsLengthValid(IInterval interval, ref float length): Test if a given length would be valid for the given interval. The length value is modified to make it valid. It is used by D2dMoveManipulator.
  • bool IsIntervalValid(IInterval interval, ref float start, ref float length,IInterval other): Test if the given interval would be valid if it shared a track with another given interval. The given start and length values are modified to make them valid, if necessary. However, modifications to the interval's start and length should not invalidate a previous such test against a different interval, during a paste operation, for example. It is used by D2dMoveManipulator, D2dScaleManipulator, and D2dTimelineControl.
A TimelineConstraints object is a parameter for the D2dTimelineControl constructor.

DefaultTimelineConstraints is ATF's default implementation of TimelineConstraints. It ensures that intervals don't overlap by either clipping the new interval or repositioning it to the right.

EventMovedEventArgs Class

EventMovedEventArgs provides event arguments describing an event — interval, key, or marker — that moved in the timeline. The parameters indicate the event, and its new starting position and track.

Ghosting Information

When timeline events move, they are "ghosted" to indicate they are being moved.

The GhostType enumeration indicates the type of motion:

  • Move: moving.
  • ResizeLeft: resizing left.
  • ResizeRight: resizing right.
GhostInfo provides information for drawing ghosted timeline objects. This object wraps object information: the ghosted object, its target to snap to, and its start, length, and bounds.

The manipulators use GhostType and GhostInfo during their operation to display the right appearance for objects.

Hit Information

Hit information tells what objects were hit during manipulation of a timeline.

The HitType enumeration indicates the timeline object hit: key, marker, left or right resize part of an interval, and so on.

Hit information is used by the manipulators as well as the D2dTimelineControl during pick operations.

HitRecord encapsulates results of a hit testing operation and is created by manipulators. It contains the hit object and the HitType. It also contains the TimelinePath of the object. For more information, see TimelinePath Class.

Timeline Information Classes

TimelinePath Class

TimelinePath derives from AdaptablePath, which represents a path in a tree or graph with the capability of adapting the last element of the path (the Last property) to a requested type. A TimelinePath is a sequence of ITimelineObject objects that define its position in the timeline: group, track, and event. The class defines several + operators to concatenate paths.

TimelineLayout Class

TimelineLayout associates a timeline object's TimelinePath with a bounding rectangle in screen space. A timeline object can appear multiple times within a D2dTimelineControl due to referenced sub-documents, including the possibility of the same timeline sub-document being referenced multiple times.

The class provides methods to add path-rectangle pairs, to obtain the rectangle for a given path, and to set a path's rectangle.

TimelineReferenceOptions Class

TimelineReferenceOptions contains options for ITimelineReference for user interfaces, and so on. Its Expanded property indicates whether or not the referenced timeline should have all its groups displayed on their own rows in the timeline control.

Topics in this section

Clone this wiki locally