Package wx :: Package lib :: Package agw :: Module rulerctrl :: Class RulerCtrl
[frames | no frames]

Type RulerCtrl

object --+                    
         |                    
    Object --+                
             |                
    EvtHandler --+            
                 |            
            Window --+        
                     |        
                 Panel --+    
                         |    
                   PyPanel --+
                             |
                            RulerCtrl


RulerCtrl implements a ruler window that can be placed on top, bottom, left or right to any wxPython widget. It is somewhat similar to the rulers you can find in text editors software, though not so powerful.
Method Summary
  __init__(self, parent, id, pos, size, style, orient)
Default class constructor.
  AddIndicator(self, id, value)
Adds an indicator to RulerCtrl.
  CheckStyle(self)
Adjust the RulerCtrl style accordingly to borders, units...
  Draw(self, dc)
Actually draws the whole RulerCtrl.
  DrawOnParent(self, indicator)
Actually draws the thin line over the drawing parent window.
  FindLinearTickSizes(self, UPP)
Used internally.
  GetBounds(self)
Returns the RulerCtrl bounds (its rect).
  GetDrawingParent(self)
Returns the window to which RulerCtrl draws a thin line over.
  GetIndicator(self, mousePos)
Returns the indicator located at the mouse position mousePos (if any).
  GetTimeFormat(self)
Returns the time format.
  Invalidate(self)
Invalidates the ticks calculations.
  LabelMajor(self, label)
Sets whether the major ticks should be labeled or not.
  LabelMinor(self, label)
Sets whether the minor ticks should be labeled or not.
  LabelString(self, d, major)
Used internally.
  OfflimitsPixels(self, start, end)
Used internally.
  OnEraseBackground(self, event)
Handles the wx.EVT_ERASE_BACKGROUND event for RulerCtrl.
  OnMouseEvents(self, event)
Handles the wx.EVT_MOUSE_EVENTS event for RulerCtrl.
  OnPaint(self, event)
Handles the wx.EVT_PAINT event for RulerCtrl.
  OnSize(self, event)
Handles the wx.EVT_SIZE event for RulerCtrl.
  SetBackgroundColour(self, colour)
Sets the RulerCtrl background colour.
  SetBounds(self, left, top, right, bottom)
Sets the bounds for RulerCtrl (its rect).
  SetDrawingParent(self, dparent)
Sets the window to which RulerCtrl draws a thin line over.
  SetFlip(self, flip)
Sets whether the orientation of the tick marks should be reversed.
  SetFonts(self, minorFont, majorFont)
Sets the fonts for minor and major tick labels.
  SetFormat(self, format)
Sets the format for RulerCtrl.
  SetIndicatorColour(self, id, colour)
Requires PIL to change the image palette.
  SetIndicatorValue(self, sendEvent)
Sets the indicator value.
  SetLabelColour(self, colour)
Sets the labels colour.
  SetLabelEdges(self, labelEdges)
Sets whether the edge values should always be displayed or not.
  SetLog(self, log)
Sets whether RulerCtrl should have a logarithminc scale or not.
  SetOrientation(self, orient)
Sets the RulerCtrl orientation.
  SetRange(self, min, max)
Sets the RulerCtrl range.
  SetSpacing(self, spacing)
Sets the RulerCtrl spacing between labels.
  SetTickPenColour(self, colour)
Sets the pen colour to draw the ticks.
  SetTimeFormat(self, format)
Sets the time format.
  SetUnits(self, units)
Sets the units that should be displayed beside the labels.
  Tick(self, dc, pos, d, major)
Tick a particular position.
  TickMajor(self, tick)
Sets whether the major ticks should be tick or not.
  TickMinor(self, tick)
Sets whether the minor ticks should be tick or not.
  Update(self, dc)
Updates all the ticks calculations.

Property Summary

Instance Method Details

__init__(self, parent, id=-1, pos=wx.Point(-1, -1), size=wx.Size(-1, -1), style=16777216, orient=4)
(Constructor)

Default class constructor.

Non-wxPython related parameter:
  • orient: sets the orientation of the RulerCtrl.
Overrides:
wx.PyPanel.__init__

AddIndicator(self, id, value)

Adds an indicator to RulerCtrl. You should pass a unique id and a starting value for the indicator.

CheckStyle(self)

Adjust the RulerCtrl style accordingly to borders, units...

Draw(self, dc)

Actually draws the whole RulerCtrl.

DrawOnParent(self, indicator)

Actually draws the thin line over the drawing parent window.

FindLinearTickSizes(self, UPP)

Used internally.

GetBounds(self)

Returns the RulerCtrl bounds (its rect).

GetDrawingParent(self)

Returns the window to which RulerCtrl draws a thin line over.

GetIndicator(self, mousePos)

Returns the indicator located at the mouse position mousePos (if any).

GetTimeFormat(self)

Returns the time format.

Invalidate(self)

Invalidates the ticks calculations.

LabelMajor(self, label=True)

Sets whether the major ticks should be labeled or not.

LabelMinor(self, label=True)

Sets whether the minor ticks should be labeled or not.

LabelString(self, d, major=None)

Used internally.

OfflimitsPixels(self, start, end)

Used internally.

OnEraseBackground(self, event)

Handles the wx.EVT_ERASE_BACKGROUND event for RulerCtrl.

OnMouseEvents(self, event)

Handles the wx.EVT_MOUSE_EVENTS event for RulerCtrl.

OnPaint(self, event)

Handles the wx.EVT_PAINT event for RulerCtrl.

OnSize(self, event)

Handles the wx.EVT_SIZE event for RulerCtrl.

SetBackgroundColour(self, colour)

Sets the RulerCtrl background colour.
Overrides:
wx.Window.SetBackgroundColour

SetBounds(self, left, top, right, bottom)

Sets the bounds for RulerCtrl (its rect).

SetDrawingParent(self, dparent)

Sets the window to which RulerCtrl draws a thin line over.

SetFlip(self, flip=True)

Sets whether the orientation of the tick marks should be reversed.

SetFonts(self, minorFont, majorFont)

Sets the fonts for minor and major tick labels.

SetFormat(self, format)

Sets the format for RulerCtrl.

SetIndicatorColour(self, id, colour=None)

Requires PIL to change the image palette.

SetIndicatorValue(self, sendEvent=True)

Sets the indicator value.

SetLabelColour(self, colour=wx.Colour())

Sets the labels colour.

SetLabelEdges(self, labelEdges=True)

Sets whether the edge values should always be displayed or not.

SetLog(self, log=True)

Sets whether RulerCtrl should have a logarithminc scale or not.

SetOrientation(self, orient=None)

Sets the RulerCtrl orientation.

SetRange(self, min, max)

Sets the RulerCtrl range.

SetSpacing(self, spacing)

Sets the RulerCtrl spacing between labels.

SetTickPenColour(self, colour=wx.Colour())

Sets the pen colour to draw the ticks.

SetTimeFormat(self, format=3)

Sets the time format.

SetUnits(self, units)

Sets the units that should be displayed beside the labels.

Tick(self, dc, pos, d, major)

Tick a particular position.

TickMajor(self, tick=True)

Sets whether the major ticks should be tick or not.

TickMinor(self, tick=True)

Sets whether the minor ticks should be tick or not.

Update(self, dc)

Updates all the ticks calculations.
Overrides:
wx.Window.Update

Generated by Epydoc 2.1.20050511.rpd on Mon Feb 16 12:52:00 2009 http://epydoc.sf.net