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
.
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. |
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
.
__init__
(self, parent, id=wx.ID_ANY, value=0)¶Default class constructor.
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.
img – if not None
, the indicator image.
SetColour
(self, colour)¶Sets the indicator colour.
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.
value – the new indicator value.