Struct nannou_timeline::Context[][src]

pub struct Context {
    pub bars: Vec<TimeSig>,
    pub ppqn: Ppqn,
    pub ruler: Ruler,
    pub track_style: TrackStyle,
    pub timeline_id: Id,
    pub canvas_id: Id,
    pub scrollable_rectangle_id: Id,
    pub playhead_id: Id,
    pub scrollbar_id: Id,
    // some fields omitted
}
Expand description

A Context returned by the Timeline widget for setting tracks, Playhead and Scrollbar.

Fields

bars: Vec<TimeSig>

The list of musical Bars that describes the temporal structure.

To avoid unnecessary allocations, this Vec is “taken” from the Timeline’s State before the Context is returned. The Vec is then swapped back to the Timeline’s State when the Context is dropped.

ppqn: Ppqn

The resolution of a single quarter note.

ruler: Ruler

The Ruler constructed by the Timeline.

track_style: TrackStyle

Track-specific styling attributes.

timeline_id: Id

The unique identifier used to instantiate the parent Timeline for this Context.

canvas_id: Id

The transparent upon which pinned tracks and the scrollable area are placed.

scrollable_rectangle_id: Id

The unique identifier for the scrollable canvas upon which tracks are placed.

playhead_id: Id

The unique identifier for the Timeline’s Playhead widget.

scrollbar_id: Id

The unique identifier for the Timeline’s Scrollbar widget.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.