3 var <editable, <step, <grid, <gridOn = false;
5 var <drawLines = true, <drawRects = true;
10 editable_ { arg aBool;
12 this.setProperty( \editable, aBool );
15 setEditable { arg index, flag;
16 this.invokeMethod( \setEditableAt, [index, flag] );
21 this.setProperty( \step, aFloat );
25 ^this.getProperty( \horizontalOrder ) != 0;
28 keepHorizontalOrder_ { arg bool;
29 this.setProperty( \horizontalOrder, if(bool){1}{0} );
33 ^this.getProperty( \selectionForm ) == 0;
36 elasticSelection_ { arg bool;
37 this.setProperty( \selectionForm, if(bool){0}{1} );
41 ^this.getProperty( \value );
45 this.setProperty( \value, anArray );
48 valueAction_ { arg anArray;
49 this.setProperty( \value, anArray );
54 ^this.getProperty( \index );
58 ^this.setProperty( \index, index );
61 lastIndex { ^this.getProperty( \lastIndex ); }
63 selectIndex { arg index;
65 this.invokeMethod( \deselectAll );
67 this.invokeMethod( \select, [index,false] );
72 deselectIndex { arg index;
73 this.invokeMethod( \deselect, index );
77 ^this.getProperty( \x );
81 this.setProperty( \x, aFloat );
85 ^this.getProperty( \y );
89 this.setProperty( \y, aFloat );
92 currentvalue { ^this.y }
94 currentvalue_ { arg aFloat;
98 setString { arg index, string;
99 this.invokeMethod( \setStringAt, [index, string] );
102 strings_ { arg anArray;
103 this.setProperty( \strings, anArray );
106 curves { this.nonimpl( "curves" ); }
108 curves_ { arg curves;
109 this.invokeMethod( \setCurves,
110 if(curves.size > 0) { [curves.collect{|c| QCurve(c)}] } { QCurve(curves) }
115 var times = [0] ++ env.times.integrate;
116 if( times.last > 0 ) {times = times / times.last};
117 this.value = [times, env.levels];
118 this.curves = env.curves;
123 this.setProperty( \grid, aPoint );
128 this.setProperty( \gridOn, aBool );
131 connect { arg source, targets;
132 this.invokeMethod( \connectElements, [source, targets] );
135 gridColor { ^this.getProperty(\gridColor) }
136 gridColor_ { arg color; this.setProperty( \gridColor, color ) }
138 selectionColor { ^this.getProperty(\selectionColor) }
139 selectionColor_ { arg color; this.setProperty(\selectionColor, color) }
141 strokeColor { ^this.getProperty(\strokeColor) }
142 strokeColor_ { arg color; this.setProperty( \strokeColor, color ) }
144 fillColor_ { arg aColor;
146 this.setProperty( \fillColor, aColor );
149 setFillColor { arg index, color;
150 this.invokeMethod( \setFillColorAt, [index, color] );
153 colors_ { arg strokeColor, fillColor;
154 this.strokeColor_( strokeColor );
155 this.fillColor_( fillColor );
158 drawLines_ { arg aBool;
160 this.setProperty( \drawLines, aBool );
163 drawRects_ { arg aBool;
165 this.setProperty( \drawRects, aBool );
168 style { ^this.getProperty(\style) }
171 if (style.isNumber.not) {
172 style = style.switch (
178 style = style.clip(0,1).asInteger;
179 this.setProperty(\style, style)
182 thumbWidth_ { arg width;
183 this.setProperty( \thumbWidth, width.asInteger; );
186 thumbHeight_ { arg height;
187 this.setProperty( \thumbHeight, height.asInteger; );
190 thumbSize_ { arg size;
191 this.setProperty( \thumbSize, size.asInteger; );
194 setThumbWidth { arg index, width;
195 this.invokeMethod(\setThumbWidthAt, [index, width.asInteger])
198 setThumbHeight { arg index, height;
199 this.invokeMethod(\setThumbHeightAt, [index, height.asInteger])
202 setThumbSize { arg index, size;
203 this.invokeMethod(\setThumbSizeAt, [index, size.asInteger])
206 metaAction_ { arg function;
207 this.manageMethodConnection( metaAction, function, 'metaAction()', \doMetaAction );
208 metaAction = function;
212 metaAction.value(this);
218 defaultCanReceiveDrag { ^true; }
220 this.value = QView.currentDrag;