Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_The unique identifier for this control.
This is true if the control can respond to UI events else false.
Use enable() and disable() to enable and disable it.
This is true if the control background is opaque else false.
Use opaque() and transparent() display / hide the background.
This is true if the control is visible else false.
Use hide() and show() to set visibility.
The type name for this control.
(type name = class name without the Cvs prefix)
Add a child to this control using its relative position [rx, ry]. If rx and ry are not provided then it uses the values set in the child.
is the actual control or its id
Optionalrx: numberOptionalry: numberthis control
Execute one or more configuration methods on this control.
The parameter is a user defined object where each field is the name of a configuration method and its value is the method's parameter(s). Multiple parameters should be in an array and use 'undefined' if the method expects no parameters.
This object will change the color scheme, text size and alignment, it will also make sure it is visible.
{ scheme : 'red', textSize : 12, textAlign: ['left', 'top'], show : undefined }
If the field name does not exist or not a valid function of this
control it will be silently ignored.
There is no error checking on the parameters, it is up to the user to ensure they are valid for the control method.
the configuration object
this control
Get or set the corner radii used for this control.
To set the radii the parameters must be one of the following
If no parameter is passed or does not match one of the above then an array of the currently used radii values.
valid radii combination
an array of the currently used radii values
Disables this control.
Optionalcascade: booleanif true disable child controls
this control
Enables this control.
Optionalcascade: booleanif true enable child controls
this control
If the turn angle is < 360° then there will be an 'unused' section of track. This is called the gap and this method sets the position of the gap center effectively rotating the whole knob.
The angle is 0° along positive x-axis and increases clockwise. The default value is 90° which means the gap center is facing south.
must be in the range ≥ 0 and ≤ 360
this control
Make this control invisible.
Optionalcascade: booleanif true hide any children
this control
Checks whether a value is between the lower and upper limits for this control. It allows the user to prevalidate a value before attempting to change the control's value.
value to test
true if the value lies within the control's limits else false
Set the lower and upper limits for the slider
lower limit
upper limit
this slider object
Sets the interaction mode for rotating the knob.
'x' : dragging left and right turns the knob
anticlockwise and clockwise respectively.'y' : dragging down and up turns the knob
anticlockwise and clockwise respectively.'a' : dragging in a circular motion round the
knob center turns the knob to face the drag point.Rotation is constrained within the maximum turn angle for this knob.
Any other parameter value is ignored and the mode is unchanged.
'x', 'y' or 'a'
this control
Move this control relative to current position.
horizontal distance
vertical distance
this control
Move this control to an absolute position.
horizontal position
vertical position
this control
Makes the controls background opaque. The actual color depends on the controls color scheme.
The second parameter, alpha, is optional and controls the level of opaqueness from 0 - transparent to 255 - fully opaque (default value).
alpha value for controls background color.
this control
Adds this control to another control which becomes its parent.
is the parental control or its id
Optionalrx: numberx position relative to parent
Optionalry: numbery position relative to parent
this control
Remove a child control from this one so that it stays in same screen position.
the control to remove or its id
this control
If the name of a valid color scheme is provided then it will use it to display the control, non-existant scheme names will be ignored. In both cases this control is returned.
If there is no parameter it returns the name of the current color scheme used by this control.
Optionalname: stringthe color scheme name e.g. 'blue'
Optionalcascade: booleanif true propogate scheme to all child controls.
this control or the control's color scheme
Only applies to modes 'x' and 'y'. It controls how far the knob rotates for a given drag distance.
The drag distance needed to rotate the knob by the maximum turn
angle is the reciprocal of the parameter value i.e. 1.0 / sens.
The default value is 0.005 which equates to a drag distance of 200 pixels and the minimum permitted value is 0.0025 (400 pixels).
≥0.0025
this control
This sets the event handler to be used when this control fires an event. The parameter can take one of three forms:
the function to handle this control's events.
this control
An alternative to the enable / disable methods.
true / false
Optionalcascade: booleantrue apply to all children
this control
An alternative to the show / hide methods.
true / false
Optionalcascade: booleanif true hide children
this control
Make this control visible.
Optionalcascade: booleanif true then show any children
this control
The track can be divided up into a number of domains separated with major ticks. The major domains and be further divided into subdomains separated with minor ticks. If the final parameter is true then values returned by the slider are consrained to the tick values.
the number of major domains on the track
the number of minor domains between major ticks
Optionalstick2ticks: booleanslider value is constrainged to tick values
this slider object
Sets the size of the text to use in the tooltip.
Optionaltsize: numbertext size for this tooltip
Create a tooltip for this control.
the text to appear in the tooltip
this control
Sets the width of the track surrounding the central knob-grip. The value will be constrained so the minimum width is 6 pixels upto the radius of the knob.
The track is used to display current value bar as well as any user specified ticks.
the width of the value track
this control
Sets the maximum angle the knob can be turned in degrees. Angles outside the range >0° and ≤360° will be ignored and the current turn angle is unchanged.
max.turn angle >0 and ≤360 degrees
this control
If the parameter value is withing the slider limits it will move the thumb to the appropriate position. If no parameter is passed or is outside the limits this methods returns the current slider value.
Optionalvalue: numberthe selected value to be set
the current value or this slider object
Gets or sets the thickness of the track.
The thickness is constrained to the range ≥ 4 and ≤ 0.1 * control width.
the required track thickness)
the curent track thickness or this control
A simple turnable knob control
This class represents a turnable knob with a surrounding status track (optional). There are 3 modes available to rotate the knob they are :-
'a': drag the mouse in a circular fashion round the knob center.can move in any direction (360°). This is the default value.'x': drag the mouse horizontally left or right.'y': drag the mouse vertically up and down./pr>This control's appearance is highly configurable including major and minor tick with optional stick-to-ticks functionality.