3 summary:: A rotary controller view
5 related:: Classes/Slider, Classes/Slider2D
9 Knob displays a value from 0.0 to 1.0 in rotary fashon, and allows to control it with either circular or linear mouse motion.
11 It also displays the deviation of the value from either 0.0 or 0.5, which you can choose using link::#-centered::.
13 To switch between the mouse interaction modes, use link::#-mode::.
15 The amount by which the value changes at interaction can be fine-tuned using link::#-step::, link::#-keystep::, link::#-shift_scale::, link::#-ctrl_scale::, and link::#-alt_scale::
23 The default link::#-mode:: for newly created Knobs.
36 A Number in the range of 0.0 to 1.0.
40 Sets the value and triggeres link::#-action::.
43 Increments the value by link::#-keystep:: multiplied by the argument.
49 Decrements the value by link::#-keystep:: multiplied by the argument.
55 SUBSECTION:: Interaction
59 The way value is controlled with respect to mouse movement after clicking on the view:
61 ## code::\round:: - value follows circular movement
62 ## code::\horiz:: - value follows linear movement in horizontal direction
63 ## code::\vert:: - value follows linear movement in vertical direction
66 Defaults to code::\round::.
69 One of the symbols listed above.
73 The amount by which the value is incremented/decremented when pressing a relevant key.
82 The amount by which the value is incremented/decremented using the mouse in 'horizontal' and 'vertical' link::#-mode#modes::.
88 The factor by which link::#-step:: or link::#-keystep:: is multiplied when used at mouse or keyboard interaction while the Shift key is pressed.
94 The factor by which link::#-step:: or link::#-keystep:: is multiplied when used at mouse or keyboard interaction while the Ctrl key is pressed.
100 The factor by which link::#-step:: or link::#-keystep:: is multiplied when used at mouse or keyboard interaction while the Alt key is pressed.
107 SUBSECTION:: Appearance
111 Whether the deviation of value will be displayed in relation to 0.0 or 0.5 (e.g. as in a panning controller);
118 The colors used by the Knob to draw the following elements:
121 ## the main Knob color
122 ## the value indicator
123 ## the deviation indicator
124 ## the background of the deviation indicator
128 An Array of four Colors in the order listed above.
134 The action object evaluated whenever the user interacts with the Knob using the mouse or the keyboard.
136 METHOD:: defaultKeyDownAction
138 Implements the default effects of key presses as follows:
141 ## strong::Key:: || strong::Effect::
142 ## r || valueAction_(1.0.rand)
143 ## n || valueAction_(0)
144 ## x || valueAction_(1)
145 ## c || valueAction_(0.5)
148 ## up arrow || increment
149 ## down arrow || decrement
150 ## right arrow || increment
151 ## left arrow || decrement
154 See also: link::#-keystep::, link::#-shift_scale::, link::#-ctrl_scale::, link::#-alt_scale::.
156 SUBSECTION:: Drag and drop
158 METHOD:: defaultGetDrag
162 METHOD:: defaultCanReceiveDrag
164 True if the current drag data is a Number.
166 METHOD:: defaultReceiveDrag
167 Sets link::#-valueAction:: to the current drag data.