AGW Logo

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

hierarchy Inheritance Diagram

Inheritance diagram for: Indicator

Inheritance diagram of Indicator


method_summary Methods Summary

__init__Default class constructor.
DrawActually draws the indicator.
GetIdReturns the indicator id.
GetImageSizeReturns the indicator bitmap size.
GetPositionReturns the position at which we should draw the indicator bitmap.
GetRectReturns the indicator client rectangle.
GetValueReturns the indicator value.
RotateImageRotates the default indicator bitmap.
SetColourSets the indicator colour.
SetValueSets the indicator value.

API Class API

class Indicator(object)[source]

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__(parent, id=wx.ID_ANY, value=0)[source]

Default class constructor.

Parameters:
  • parent – the parent window, an instance of RulerCtrl;
  • id – the indicator identifier;
  • value – the initial value of the indicator.


Draw(dc)[source]

Actually draws the indicator.

Parameters:dc – an instance of wx.DC.


GetId()[source]

Returns the indicator id.



GetImageSize()[source]

Returns the indicator bitmap size.



GetPosition()[source]

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



GetRect()[source]

Returns the indicator client rectangle.



GetValue()[source]

Returns the indicator value.



RotateImage(img=None)[source]

Rotates the default indicator bitmap.

Parameters:img – if not None, the indicator image.


SetColour(colour)[source]

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(value)[source]

Sets the indicator value.

Parameters:value – the new indicator value.
Tree

Table Of Contents

Previous topic

rulerctrl

Next topic

Label