FCurveEditor
Edits an FCurve: a value over time, made of Bézier segments, with jumps where a segment does not start where the previous one ended. Made for long and complex curves: only the segments in view are drawn and hit, and many segments per pixel are drawn as the range of their values.
The view zooms horizontally with the wheel, vertically with shift and the wheel, both with ctrl and the wheel, around the pointer; it pans with the middle button or alt and a drag, and horizontally by scrolling sideways; F frames the whole curve. The tools, see FCurveTool, are chosen with tool or their keys:
select (V): a click selects a key, shift adds, a drag on the background selects with a box; dragging a key moves the selected keys, dragging a handle turns the segments around it, the other handle follows unless alt is held; delete removes the selected keys, also the first and the last, and all of them, see deleteSelected; mod+A selects all keys; a double click adds a key; R simplifies the curve between the selected keys, see simplifySelection
The context menu sets the interpolation of the selected keys, smooth, linear or constant, see setInterpolation, and clears the curve, see clear.
pen (P): a click adds a key, also to an empty curve: after its end or before its start the curve gets longer, on the curve a key is added at the time and value of the pointer; dragging pulls out the handles of the key
draw (D): a stroke by hand replaces the curve over its time, joining the curve where it starts or ends near it
cut (C): a click splits the curve, adding a key
break (B): a drag on the curve tears it, making a jump; alt and a click on a jump joins it again
grab (G), smooth (S), flatten (L), noise (N): sculpt the values under a brush of brushRadius pixels around the pointer with brushStrength, less to its edges; and change the radius. Sculpting only moves values, so the curve stays a function of time; it is fit again with the distortion of orx-shapes, see Segment2D.distort, to tolerance pixels, and smoothing does not smooth across jumps
A drag is one edit that can be undone, see org.openrndr.panel.History.
Types
the interpolation of the segments after the selected keys, see setInterpolation
Properties
the attributes of the element, which attribute selectors like [label="OK"] select, see setAttribute
the radius of the brushes of the sculpting tools, in pixels
how strongly the brushes smooth, flatten and add noise, from 0 to 1
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
the color of the curve, the color of the style when null
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
true when the view widens to show the keys and handles that a drag left outside it, once the drag ends
the margin around the points that followEdits keeps in view, in pixels
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 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 wrap undo and redo so that they leave alone what others changed since, or 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 largest distance in pixels between the curve and the curve that simplifySelection fits to it
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 changed
the bindings of values of the element, checked every frame, see org.openrndr.panel.binding.bindValue
the curve changed, by the user while they edit it, or 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
the time and value of the curve at p, a point of the window
Removes the selected keys: the segments around a key in the curve become one, the first and the last key take the segment to the next key with them, and removing all keys leaves an empty curve
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
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.
the point of the window where the point p of the curve, a time and a value, is drawn
Scrolls the elements that scroll this element so that it is in view, with margin pixels around it, each by its StyleSheet.scrollBehavior
gives the segments after the selected keys interpolation; smooth gives the keys automatic handles
Fits the curve between the selected keys again with as few Bézier segments as stay within tolerance pixels of it, at the zoom of the view: every stretch of selected keys that follow each other is fit on its own, jumps and kinks of more than cornerAngle degrees stay; the keys at the ends of a stretch keep their places
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.