Package wx :: Package lib :: Package agw :: Module knobctrl :: Class KnobCtrl

[frames | no frames]

## Type KnobCtrl

    object --+
             |
        Object --+
                 |
        EvtHandler --+
                     |
                Window --+
                         |
            BufferedWindow --+
                             |
                            KnobCtrl

This class can be used to simulate a knob volume control often found in PC music players.

Method Summary
| ``__init__`(self, parent, id, pos, size, bufferedstyle)` Default class constructor.
| ``CircleCoords`(self, radius, angle, centerX, centerY)` Used internally.
| ``Draw`(self, dc)` Draws everything on the empty bitmap.
| ``DrawBoundingCircle`(self, dc, size)` Draws the KnobCtrl bounding circle.
| ``DrawDiagonalGradient`(self, dc, size)` Draw a shding of diagonal gradient to KnobCtrl.
| ``DrawInsetCircle`(self, dc, pencolour)` Draws the small knob.
| ``DrawTags`(self, dc, size)` Draws the tags.
| ``GetAngleFromCoord`(self, cx, cy)` Used internally.
| ``GetAngularRange`(self)` Returns the angular range for KnobCtrl.
| ``GetBoundingColour`(self)` Returns the bounding circle colour.
| ``GetFirstGradientColour`(self)` Returns the first gradient colour for shading.
| ``GetKnobRadius`(self)` Returns the knob radius.
| ``GetMaxValue`(self)` Returns the maximum value for KnobCtrl.
| ``GetMinValue`(self)` Returns the minimum value for KnobCtrl.
| ``GetSecondGradientColour`(self)` Returns the second gradient colour for shading.
| ``GetTags`(self)` Returns the KnobCtrl tags.
| ``GetTagsColour`(self)` Returns the tags colour.
| ``GetTrackPosition`(self)` Used internally.
| ``GetValue`(self)` Returns the value of KnobCtrl.
| ``OffsetColor`(self, color, offset)` Used internally.
| ``OnMouseEvents`(self, event)` Handles all the wx.EVT_MOUSE_EVENTS for KnobCtrl.
| ``SetAngularRange`(self, start, end)` Sets the angular range for KnobCtrl.
| ``SetBoundingColour`(self, colour)` Sets the bounding circle colour.
| ``SetFirstGradientColour`(self, colour)` Sets the first gradient colour for shading.
| ``SetKnobRadius`(self, radius)` Sets the knob radius.
| ``SetSecondGradientColour`(self, colour)` Sets the second gradient colour for shading.
| ``SetTags`(self, tags)` Sets the tags for KnobCtrl.
| ``SetTagsColour`(self, colour)` Sets the tags colour.
| ``SetTrackPosition`(self)` Used internally.
| ``SetValue`(self, val)` Sets programmatically the value of KnobCtrl, without sending events.

Property Summary

Instance Method Details

### __init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), bufferedstyle=1)
(Constructor)

Default class constructor.

Non-wxPython parameter:

- bufferedstyle: if equal to 1 (KC_BUFFERED_DC) then a double buffering is performed while drawing, otherwise the standard OnPaint is used.

  Overrides:
    `wx.lib.agw.knobctrl.BufferedWindow.__init__`

### CircleCoords(self, radius, angle, centerX, centerY)

Used internally.

### Draw(self, dc)

Draws everything on the empty bitmap. Here all the chosen styles are applied.

  Overrides:
    `wx.lib.agw.knobctrl.BufferedWindow.Draw`

### DrawBoundingCircle(self, dc, size)

Draws the KnobCtrl bounding circle.

### DrawDiagonalGradient(self, dc, size)

Draw a shding of diagonal gradient to KnobCtrl.

### DrawInsetCircle(self, dc, pencolour)

Draws the small knob.

### DrawTags(self, dc, size)

Draws the tags.

### GetAngleFromCoord(self, cx, cy)

Used internally.

### GetAngularRange(self)

Returns the angular range for KnobCtrl. The start and end angle are given in degrees, clockwise.

### GetBoundingColour(self)

Returns the bounding circle colour.

### GetFirstGradientColour(self)

Returns the first gradient colour for shading.

### GetKnobRadius(self)

Returns the knob radius.

### GetMaxValue(self)

Returns the maximum value for KnobCtrl.

### GetMinValue(self)

Returns the minimum value for KnobCtrl.

### GetSecondGradientColour(self)

Returns the second gradient colour for shading.

### GetTags(self)

Returns the KnobCtrl tags.

### GetTagsColour(self)

Returns the tags colour.

### GetTrackPosition(self)

Used internally.

### GetValue(self)

Returns the value of KnobCtrl.

### OffsetColor(self, color, offset)

Used internally.

### OnMouseEvents(self, event)

Handles all the wx.EVT_MOUSE_EVENTS for KnobCtrl.

### SetAngularRange(self, start, end)

Sets the angular range for KnobCtrl. The start and end angle are given in degrees, clockwise.

### SetBoundingColour(self, colour)

Sets the bounding circle colour.

### SetFirstGradientColour(self, colour)

Sets the first gradient colour for shading.

### SetKnobRadius(self, radius)

Sets the knob radius.

### SetSecondGradientColour(self, colour)

Sets the second gradient colour for shading.

### SetTags(self, tags)

Sets the tags for KnobCtrl. The tags are a list of integers ranging from minvalue to maxvalue.

### SetTagsColour(self, colour)

Sets the tags colour.

### SetTrackPosition(self)

Used internally.

### SetValue(self, val)

Sets programmatically the value of KnobCtrl, without sending events.

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:55:17 2009 | http://epydoc.sf.net