This class can be used to simulate a knob volume control often found in PC music players.
__init__ | Default class constructor. |
CircleCoords | Converts the input values into logical x and y coordinates. |
Draw | Draws everything on the empty bitmap. |
DrawBoundingCircle | Draws the KnobCtrl bounding circle. |
DrawDiagonalGradient | Draw a shading of diagonal gradient to KnobCtrl. |
DrawInsetCircle | Draws the small knob. |
DrawTags | Draws the tags. |
GetAngleFromCoord | Returns the angular position based on the input logical coordinates. |
GetAngularRange | Returns the angular range for KnobCtrl as a tuple. The start and end |
GetBoundingColour | Returns the bounding circle colour. |
GetFirstGradientColour | Returns the first gradient colour for shading. |
GetKnobRadius | Returns the knob radius, in pixels. |
GetMaxValue | Returns the maximum value for KnobCtrl. |
GetMinValue | Returns the minimum value for KnobCtrl. |
GetSecondGradientColour | Returns the second gradient colour for shading. |
GetTags | Returns the KnobCtrl tags. |
GetTagsColour | Returns the tags colour. |
GetTrackPosition | Used internally. |
GetValue | Returns the value of KnobCtrl. |
OffsetColour | Changes the input colour by the offset value. |
OnMouseEvents | Handles the wx.EVT_MOUSE_EVENTS event for KnobCtrl. |
SetAngularRange | Sets the angular range for KnobCtrl. |
SetBoundingColour | Sets the bounding circle colour. |
SetFirstGradientColour | Sets the first gradient colour for shading. |
SetKnobRadius | Sets the knob radius. |
SetSecondGradientColour | Sets the second gradient colour for shading. |
SetTags | Sets the tags for KnobCtrl. |
SetTagsColour | Sets the tags colour. |
SetTrackPosition | Used internally. |
SetValue | Sets programmatically the value of KnobCtrl. |
This class can be used to simulate a knob volume control often found in PC music players.
Default class constructor.
Parameters: |
|
---|
Converts the input values into logical x and y coordinates.
Parameters: |
---|
Draws everything on the empty bitmap. Here all the chosen styles are applied.
Parameters: | dc – an instance of wx.DC. |
---|
Draws the KnobCtrl bounding circle.
Parameters: |
|
---|
Draw a shading of diagonal gradient to KnobCtrl.
Parameters: |
|
---|
Draws the small knob.
Parameters: |
|
---|
Draws the tags.
Parameters: |
|
---|
Returns the angular position based on the input logical coordinates. Used internally.
Parameters: |
|
---|
Returns the angular range for KnobCtrl as a tuple. The start and end angles in the returned tuple are given in degrees, clockwise.
Changes the input colour by the offset value. Used internally.
Parameters: |
|
---|
Handles the wx.EVT_MOUSE_EVENTS event for KnobCtrl.
Parameters: | event – a wx.MouseEvent event to be processed. |
---|
Sets the angular range for KnobCtrl.
Parameters: |
|
---|
Sets the bounding circle colour.
Parameters: | colour – a valid wx.Colour object. |
---|
Sets the first gradient colour for shading.
Parameters: | colour – a valid wx.Colour object. |
---|
Sets the knob radius.
Parameters: | radius – the knob radius, in pixels. |
---|
Sets the second gradient colour for shading.
Parameters: | colour – a valid wx.Colour object. |
---|
Sets the tags for KnobCtrl.
Parameters: | tags – a list of integers ranging from minvalue to maxvalue. |
---|
Sets programmatically the value of KnobCtrl.
Parameters: | val – an integer specifying the new KnobCtrl value. |
---|
Note
This method does not send a KnobCtrlEvent.