TachyonUI 1.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
gui_timeline_types.h File Reference
#include <gui_core/gui_base_types.h>
#include <gui_core/gui_id.h>
#include <gui_core/gui_id_manager.h>
#include <gui_core/input/gui_gesture.h>
#include <gui_controls/gui_view_ref.h>
#include <cstdint>
#include <functional>
#include <optional>
#include <span>
#include <string>
#include <unordered_set>
#include <vector>

Go to the source code of this file.

Classes

struct  tachyon::TimelineState
 Where playback is: what a Timeline shows and edits. More...
struct  tachyon::TimelineRange
 A stretch of time, in seconds: from start up to end. More...
struct  tachyon::TimelineOptions
 What a Timeline covers. The markers are only read during the call. More...
struct  tachyon::TimelineKey
 A key on a property track: a time where the value is set. More...
struct  tachyon::TimelineEvent
 A named moment on an events track: "Spawn", "Explode". More...
struct  tachyon::TimelineClip
 An audio track's sound on its lane. More...
struct  tachyon::TimelineTrack
 A row of the timeline: its name and controls in the track list, its lane beside them. More...
struct  tachyon::TimelineEdit
 A change to a TimelineView, for undo: what each changed track was before and after, the tracks added or removed, and the loop range. More...
struct  tachyon::TimelineEdit::Change
 A track changed: its keys, clip, events or flags. More...
struct  tachyon::TimelineEdit::Track
 A track added (at index) or removed (from it). More...
struct  tachyon::TimelineData
 A timeline's tracks and playback, kept by the app from frame to frame. More...
struct  tachyon::TimelineViewState
 How one TimelineEditor shows a TimelineData: the part in view, the selection, the track filter, and what the user is doing in it. More...
struct  tachyon::TimelineViewState::LaneHover
 What's under the pointer on the lanes, for its hover look. More...
struct  tachyon::TimelineViewState::DragScrollFrom
 Where a drag scroll started from: the view's start and the rows' scroll. More...
struct  tachyon::TimelineView
 A timeline shown in one place: the tracks and the one view of them together. More...

Namespaces

namespace  tachyon

Typedefs

using tachyon::TimelineViewRef = BasicViewRef<TimelineData, TimelineViewState>
 A timeline and one view of it, as TimelineEditor and the helpers take them.
using tachyon::ConstTimelineViewRef = BasicViewRef<const TimelineData, const TimelineViewState>

Enumerations

enum class  tachyon::TimelineTrackKind : uint8_t { tachyon::TimelineTrackKind::Group , tachyon::TimelineTrackKind::Property , tachyon::TimelineTrackKind::Audio , tachyon::TimelineTrackKind::Events }
 What a track holds, and how its row looks. More...

Functions

bool tachyon::AdvanceTimeline (TimelineState &state, const TimelineOptions &options, float deltaSecs)
 Moves state on by deltaSecs while it plays: call it once a frame with the frame's time.
float tachyon::SourceLengthOf (const TimelineClip &clip)
 The whole sound's length: TimelineClip::sourceLength, or its offset and length.
void tachyon::ApplyTimelineEdit (TimelineData &data, const TimelineEdit &edit, bool undo=false)
 Does (or with undo, undoes) edit on the tracks, and raises their revision.
void tachyon::CommitTimelineEdit (TimelineData &data, const TimelineEdit &edit)
 Applies edit and hands it to data.onEdit; does nothing for an empty one.
void tachyon::ReleaseTimelineEditIDs (IDManager &ids, const TimelineEdit &edit, bool undone)
 Releases the static IDs of the tracks, keys and events only the side of edit not in effect holds: done, what its undo would bring back; undone, what its redo would add.
ID tachyon::TimelineRowID (const TimelineViewState &view, ID track)
 The element of track track's row in a view: rows are scoped to their editor, so each view of the tracks has its own.
bool tachyon::PruneTimelineSelection (TimelineViewRef view)
 After an edit (through this view or another): lets go of the selected tracks, keys and events that are gone, and of what the view kept by track index.
TimelineEdit tachyon::AddKeyEdit (const TimelineData &data, int track, float time, ID keyID)
 The edit that sets a key on track at time (on a frame when the timeline snaps), or none when there's one there already or the track isn't a property.
TimelineEdit tachyon::DeleteSelectedKeysEdit (ConstTimelineViewRef view)
 The edit that deletes the view's selected keys and events from the tracks that aren't locked; none when none is selected.
TimelineEdit tachyon::AddTrackEdit (const TimelineData &data, TimelineTrack track, int index=-1)
 The edit that adds track at index (the end when out of range).
TimelineEdit tachyon::RemoveTrackEdit (const TimelineData &data, int track)
 The edit that removes track and, for a group, the tracks it holds.
std::span< const TimelineTrack > tachyon::TracksInGroup (const TimelineData &data, int track)
 The tracks a group at track holds: the ones after it indented further, up to the next one that isn't.
bool tachyon::IsTrackLocked (const TimelineData &data, int track)
 Whether track is locked: it, or a group holding it, is.