Package wx :: Package lib :: Package floatcanvas :: Module FloatCanvas :: Class Text
[frames | no frames]

Class Text

       DrawObject --+
                    |
XYObjectMixin --+   |
                |   |
  TextObjectMixin --+
                    |
                   Text


This class creates a text object, placed at the coordinates,
x,y. the "Position" argument is a two charactor string, indicating
where in relation to the coordinates the string should be oriented.

The first letter is: t, c, or b, for top, center and bottom The
second letter is: l, c, or r, for left, center and right The
position refers to the position relative to the text itself. It
defaults to "tl" (top left).

Size is the size of the font in pixels, or in points for printing
(if it ever gets implimented). Those will be the same, If you assume
72 PPI.

Family:
    Font family, a generic way of referring to fonts without
    specifying actual facename. One of:
        wx.DEFAULT:  Chooses a default font. 
        wx.DECORATIVE: A decorative font. 
        wx.ROMAN: A formal, serif font. 
        wx.SCRIPT: A handwriting font. 
        wx.SWISS: A sans-serif font. 
        wx.MODERN: A fixed pitch font.
    NOTE: these are only as good as the wxWindows defaults, which aren't so good.
Style:
    One of wx.NORMAL, wx.SLANT and wx.ITALIC.
Weight:
    One of wx.NORMAL, wx.LIGHT and wx.BOLD.
Underline:
    The value can be True or False. At present this may have an an
    effect on Windows only.

Alternatively, you can set the kw arg: Font, to a wx.Font, and the
above will be ignored.

The size is fixed, and does not scale with the drawing.

The hit-test is done on the entire text extent

Method Summary
  __init__(self, String, xy, Size, Color, BackgroundColor, Family, Style, Weight, Underline, Position, InForeground, Font)
    Inherited from DrawObject
  Bind(self, Event, CallBackFun)
  Hide(self)
  PutInBackground(self)
  PutInForeground(self)
  SetBrush(self, FillColor, FillStyle)
  SetHitBrush(self, HitColor)
  SetHitPen(self, HitColor, LineWidth)
  SetPen(self, LineColor, LineStyle, LineWidth)
  Show(self)
  UnBindAll(self)
    Inherited from TextObjectMixin
  LayoutText(self)
A dummy method to re-do the layout of the text.
  SetBackgroundColor(self, BackgroundColor)
  SetColor(self, Color)
  SetFont(self, Size, Family, Style, Weight, Underline, FaceName)
  SetText(self, String)
Re-sets the text displayed by the object
    Inherited from XYObjectMixin
  CalcBoundingBox(self)
  Move(self, Delta)
Move(Delta): moves the object by delta, where delta is a (dx,dy) pair.
  SetPoint(self, xy)

Class Variable Summary
    Inherited from DrawObject
dict BrushList = {('MediumGrey', 'Solid'): wxPython wrapper f...
dict FillStyleList = {'CrossHatch': 114, 'FDiagonal_Hatch': 1...
dict LineStyleList = {'Solid': 100, 'ShortDash': 103, 'Dot': ...
dict PenList = {('LightGrey', 'Solid', 1): wxPython wrapper f...
    Inherited from TextObjectMixin
dict FontList = {}
int LayoutFontSize = 12                                                                    
dict ShiftFunDict = {'cl': <function <lambda> at 0xb78c210c>,...

Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 17:05:57 2007 http://epydoc.sf.net