ClipTimeline
A timeline of clips on tracks, like the scenes of a sequencer. The host sets value; the user edits it:
a click selects a clip, shift adds it to or removes it from the selection, a click on empty space clears it; dragging on empty space selects the clips in a rectangle, with shift adding them
dragging a clip moves the selected clips in time and across tracks, with alt it moves copies of them; dragging an edge of a clip trims it, keeping its fades within it
the handles at the top left and the top right of a clip set how long the selected clips fade in and out, see TimelineClip.fadeIn and TimelineClip.fadeOut
mod+c, mod+x and mod+v copy, cut and paste the selected clips, see clipboard; pasted clips start at the pointer
with the ClipTimelineTool.RAZOR a click cuts a clip in two, see splitClip
a double click on empty space adds the clip that newClip gives; delete and backspace remove the selected clips
the wheel zooms in time around the pointer, sideways scrolling, the middle button and alt on empty space pan, shift and the wheel scroll the tracks; dragging in the ruler scrubs, see scrubbed
Clips snap to multiples of snap, to the edges of other clips and to the playhead. valueChanged fires once per finished edit, which is recorded by recordEdit, so that it can be undone. Clips on one track may overlap; clips on tracks past the last are shown on the last.
Properties
the attributes of the element, which attribute selectors like [label="OK"] select, see setAttribute
the clipboard of copy, cut and paste, shared by all timelines unless it is replaced
builds the menu that opens when the element is clicked with the right button, null for none
The radius of the corners of this in pixels, of its org.openrndr.panel.style.borderRadius: in pixels, or a percentage of its shorter side; at most half of it
what the element does in drag and drop, see DragAndDrop
the history of the control manager of this element, null when it is not in one
an offset of the element from where it is laid out, while it moves there, see org.openrndr.panel.animateMoveFrom
false for elements that place their children themselves, like the spans of RichText
The largest scrollLeft: how far the content of the element extends beyond its right side, as found by the last layout.
The largest scrollTop: how far the content of the element extends beyond its bottom, as found by the last layout.
the shortest a clip can be trimmed or cut to, in seconds
the clip to add for a double click on empty space, at track and the time under the pointer, snapped; null, or a null result, adds nothing
The transform of the element itself, in the coordinates of the window, around its transform origin; null when it has none
The area the element draws in, on the screen: its box and what is drawn around it, like knobs, focus rings and outlines. Only the areas of the elements that changed are drawn again, a control that draws further than this gives a larger area.
Records an edit of this element, named name, in the history so that it can be undone and redone, by default in org.openrndr.panel.editHistory. A program can take this over, like to keep the edits in a history of its own.
the transform of the element by its own transform and those of its ancestors, null when there are none
how far the content of an element that scrolls is scrolled to the left, in pixels
where the content is scrolled to: the end of smooth scrolling, or the scroll position
the selection changed
the two clips that clip is cut into at the time at, like to have the second start where the first ends in what it shows; null for two clips with the same label, color and tag as clip
Where text is typed in this element while it has the focus: the line of the caret, in the coordinates of the window, with the caret from its left edge. The control manager gives it to the window, so that input methods place their candidates and on-screen keyboards next to the caret; null for elements that do not take text.
the tool that the pointer uses
the tool changed
the tracks and clips
the bindings of values of the element, checked every frame, see org.openrndr.panel.binding.bindValue
the value changed: at the end of an edit by the user, or set by the program
Functions
Moves the element from from, a point of the window where its top-left corner was, to where it is laid out in the next frame, like when it moved to another place in a list
Binds the value of this element to get and set: when changed happens, elementValue is set with set, and when get changes, setElementValue shows it in the element
true when the point position of the window is in the box of the element as it is drawn, transformed
sets the menu that opens when this element is clicked with the right button, see Element.contextMenu
copies the selected clips to the clipboard
copies the selected clips to the clipboard and removes them
removes the selected clips
the height of the content of the element when it is width wide, for content that wraps; null when it has none
the styles of this element and its descendants are computed again before the next redraw
position, a point of the window, in the coordinates of the element before its transforms
a NodeEditor, init adds its nodes and wires
adds a NumberField
Pastes the clips of the clipboard such that the earliest starts at time and the topmost is on track, the others where they were from those, all within the tracks; the pasted clips are selected. Without a time: at the pointer when it is over the tracks, snapped, else at the playhead, else right after the copied clips. Without a track: at the pointer, else where they were.
Called in every frame before the styles are computed, by the control manager, so that the element can change its children for what is in view, like a VirtualList
The layout is computed again before the next redraw, of the element and its descendants, and of the elements around it as far as its size can change theirs, see org.openrndr.panel.document.Document.layoutRequests
Draws the element again, what it shows changed. The layout is computed again when the size hints of the element changed; changes to the children, the classes, states and styles of elements and to scrolling lay out again by themselves, other changes that move or size elements call Element.requestLayout.
Scrolls the elements that scroll this element so that it is in view, with margin pixels around it, each by its StyleSheet.scrollBehavior
Applies the provided styling function to the element's stylesheet. If the element does not already have a stylesheet, a new one is created and the function is applied to it.
Creates a Div element with the provided classes, and runs builder to populate the Div any time watchObject changes.