phoenix_title 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 Class Hierarchy

Inheritance diagram for class Indicator:

method_summary Methods Summary

__init__

Default class constructor.

Draw

Actually draws the indicator.

GetId

Returns the indicator id.

GetImageSize

Returns the indicator bitmap size.

GetPosition

Returns the position at which we should draw the indicator bitmap.

GetRect

Returns the indicator client rectangle.

GetValue

Returns the indicator value.

RotateImage

Rotates the default indicator bitmap.

SetColour

Sets the indicator colour.

SetValue

Sets the indicator value.


api 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.



Draw(self, dc)

Actually draws the indicator.

Parameters:

dc – an instance of wx.DC.



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.