Package wx :: Package lib :: Package agw :: Module rulerctrl

[frames | no frames]

## Module wx.lib.agw.rulerctrl

    Description
    ===========

    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.
    RulerCtrl has the following characteristics:

      - Can be horizontal or vertical;
      - 4 built-in formats: integer, real, time and linearDB formats;
      - Units (as cm, dB, inches) can be displayed together with the label values;
      - Possibility to add a number of "paragraph indicators", small arrows that point at
        the current indicator position;
      - Customizable background colour, tick colour, label colour;
      - Possibility to flip the ruler (i.e. changing the tick alignment);
      - Changing individually the indicator colour (requires PIL at the moment);
      - Different window borders are supported (wx.STATIC_BORDER, wx.SUNKEN_BORDER,
        wx.DOUBLE_BORDER, wx.NO_BORDER, wx.RAISED_BORDER, wx.SIMPLE_BORDER);
      - Logarithmic scale available;
      - Possibility to draw a thin line over a selected window when moving an indicator,
        which emulates the text editors software.

    And a lot more. See the demo for a review of the functionalities (even if also the
    demo does not include all the options supported by RulerCtrl).

    Events
    ======

    RulerCtrl implements the following events related to indicators:

      - EVT_INDICATOR_CHANGING: the user is about to change the position of one indicator;
      - EVT_INDICATOR_CHANGED: the user has changed the position of one indicator.

    Supported Platforms
    ===================

    RulerCtrl has been tested on the following platforms:
      * Windows (Windows XP);
      * Linux Ubuntu (Dapper 6.06)

    License And Version:
    ===================

    RulerCtrl is freeware and distributed under the wxPython license.

    Latest Revision: Andrea Gavana @ 15 Oct 2008, 22.30 GMT
    Version 0.1

Classes
`Indicator` | This class holds all the information about a single indicator inside RulerCtrl.
`Label` | Auxilary class.
`RulerCtrl` | RulerCtrl implements a ruler window that can be placed on top, bottom, left or right to any wxPython widget.
`RulerCtrlEvent` | Represent details of the events that the RulerCtrl object sends.

Function Summary
| ``ConvertPILToWX`(pil, alpha)` Convert PIL Image Into wx.Image.
| ``ConvertWXToPIL`(bmp)` Convert wx.Image Into PIL Image.
| `GetIndicatorBitmap()`
| `GetIndicatorData()`
| `GetIndicatorImage()`
| ``MakePalette`(tr, tg, tb)` Creates A Palette To Be Applied On An Image Based On Input Colour.

Function Details

### ConvertPILToWX(pil, alpha=True)

Convert PIL Image Into wx.Image.

### ConvertWXToPIL(bmp)

Convert wx.Image Into PIL Image.

### MakePalette(tr, tg, tb)

Creates A Palette To Be Applied On An Image Based On Input Colour.

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