EZKnob is wrapper class which creates an (optional) StaticText, and a Knob plus a NumberBox. If the parent is nil, then EZKnob will create its own window. See EZGui more options.
parent |
The parent view or window. If the parent is nil, then EZKnob will create its own Window, and place it conveniently on the screen if the bounds are a Point. If the bounds are a Rect, then the Rect determines the window bounds. |
bounds |
An instance of Rect or Point. Default value is |
label |
The label. Default value is nil. If nil, then no StaticText is created. |
controlSpec |
The ControlSpec for scaling the value. If the |
action |
A Function called when the value changes. The function is passed the EZKnob instance as its argument. |
initVal |
The value to initialize the knob and number box with. If nil, then it uses the ControlSpec's default value. |
initAction |
A Boolean indicating whether the action function should be called when setting the initial value. The default is false. |
labelWidth |
Number of pixels width for the label. default is 60. This is only valid for the |
knobSize |
An instance of Point. It will adjust itself to maximize the space use of |
unitWidth |
Number of pixels width for the unit label. Default is 0. If 0, then no unitLabel is created. |
labelHeight |
Default is 20. |
layout |
|
gap |
A Point. By default, the view tries to get its parent's gap, otherwise it defaults to |
margin |
A Point. This will inset the bounds occupied by the subviews of view. |
The contained views can be accessed via the EZKnob instance variables: labelView
, knobView
, numberView
.
the numberView
the knobView
Set/get the labelView
A function to be evaluated when the value changes. Te first argument will be the EZKnob.
arg1 |
An instance of Function or FunctionList. Default value is |
The value of the knob
Sets/gets whether the knob is in centered mode. See Knob.
Rounds the values in the number box.
An instance of ControlSpec for scaling the values.
Gets/sets the list/menu to the index at value. Does not perform the action.
val |
An Integer. |
Performs the action at the current index and the global action.
Set the args after creation. You can only set the label if it was not nil from the beginning.
Sets/gets if the component views are visible.
bool |
An instance of Boolean. Default is |
stringBackground |
An instance of Color. The |
stringColor |
An instance of Color. The |
numBackground |
An instance of Color. The |
numStringColor |
An instance of Color. The |
numNormalColor |
An instance of Color. The |
numTypingColor |
An instance of Color. The |
knobColors |
An instance of Color. The |
background |
An instance of Color. The |