wx.lib.agw.rulerctrl.Indicator¶
This class holds all the information about a single indicator inside RulerCtrl
.
You should not call this class directly. Use:
ruler.AddIndicator(id, value)
to add an indicator to your RulerCtrl
.
Class Hierarchy¶
Methods Summary¶
Default class constructor. |
|
Actually draws the indicator. |
|
Returns the indicator id. |
|
Returns the indicator bitmap size. |
|
Returns the position at which we should draw the indicator bitmap. |
|
Returns the indicator client rectangle. |
|
Returns the indicator value. |
|
Rotates the default indicator bitmap. |
|
Sets the indicator colour. |
|
Sets the indicator value. |
Class API¶
- class Indicator(object)¶
This class holds all the information about a single indicator inside
RulerCtrl
.You should not call this class directly. Use:
ruler.AddIndicator(id, value)
to add an indicator to your
RulerCtrl
.
Methods¶
- __init__(self, parent, id=wx.ID_ANY, value=0)¶
Default class constructor.
- Parameters:
parent – the parent window, an instance of
RulerCtrl
;id – the indicator identifier;
value – the initial value of the indicator.
- GetId(self)¶
Returns the indicator id.
- GetImageSize(self)¶
Returns the indicator bitmap size.
- GetPosition(self)¶
Returns the position at which we should draw the indicator bitmap.
- GetRect(self)¶
Returns the indicator client rectangle.
- GetValue(self)¶
Returns the indicator value.
- RotateImage(self, img=None)¶
Rotates the default indicator bitmap.
- Parameters:
img – if not
None
, the indicator image.
- SetColour(self, colour)¶
Sets the indicator colour.
- Parameters:
colour – the new indicator colour, an instance of
wx.Colour
.
Note
Requires PIL (Python Imaging Library), which can be downloaded from http://www.pythonware.com/products/pil/
- SetValue(self, value)¶
Sets the indicator value.
- Parameters:
value – the new indicator value.