TextBox Class Reference

Inheritance diagram for TextBox:

Inheritance graph

Public Member Functions

def __init__(self, width=100, height=50, centerPt=None)
def addHandler(self, handler)[Inherited from _EventTrigger]
def adjustReference(self, dx, dy)[Inherited from Drawable]
def clone(self)[Inherited from Drawable]
def flip(self, angle=0)[Inherited from Drawable]
def getBorderColor(self)[Inherited from Shape]
def getBorderWidth(self)[Inherited from Shape]
def getDepth(self)[Inherited from Drawable]
def getDimensions(self)[Inherited from Text]
def getFillColor(self)[Inherited from FillableShape]
def getFontColor(self)[Inherited from Text]
def getFontSize(self)[Inherited from Text]
def getHeight(self)[Inherited from Rectangle]
def getMessage(self)[Inherited from Text]
def getReferencePoint(self)[Inherited from Drawable]
def getWidth(self)[Inherited from Rectangle]
def handle(self, event)
def move(self, dx, dy)[Inherited from Drawable]
def moveTo(self, x, y)[Inherited from Drawable]
def removeHandler(self, handler)[Inherited from _EventTrigger]
def rotate(self, angle)[Inherited from Text]
def scale(self, factor)[Inherited from Text]
def setBorderColor(self, color)[Inherited from Shape]
def setBorderWidth(self, width)[Inherited from Shape]
def setDepth(self, depth)[Inherited from Drawable]
def setFillColor(self, color)[Inherited from FillableShape]
def setFontColor(self, color)[Inherited from Text]
def setFontSize(self, fontsize)[Inherited from Text]
def setHeight(self, h)[Inherited from Rectangle]
def setMessage(self, message)[Inherited from Text]
def setWidth(self, w)[Inherited from Rectangle]
def shear(self, shear, angle=0)[Inherited from Drawable]
def stretch(self, xFactor, yFactor, angle=0)[Inherited from Drawable]
def wait(self)[Inherited from _EventTrigger]

Detailed Description

Widget for text entry.

Member Function Documentation

def __init__ (   self,
  width = 100,
  height = 50,
  centerPt = None 

Construct a box to enter text into.

width     the width of the box
height    the height of the box
centerPt  the location of the boxes center

Reimplemented from Rectangle.

def addHandler (   self,
) [inherited]

Register an EventHandler instance with this object.

def adjustReference (   self,
) [inherited]

Move the local reference point relative to its current position.

Note that the object is not moved at all.

def clone (   self  )  [inherited]

Return a duplicate of the drawable object.

Note that the duplicate is not automatically added to any
canvases or layers, even if original is currently so.

def flip (   self,
  angle = 0 
) [inherited]

Flip the object reflected about its current reference point.

By default the flip is a left-to-right flip with a vertical axis of symmetry.

angle     a clockwise rotation of the axis of symmetry away from vertical

def getBorderColor (   self  )  [inherited]

Return the color of the object's border.

def getBorderWidth (   self  )  [inherited]

Return the width of the border.

def getDepth (   self  )  [inherited]

Return the depth of the object.

def getDimensions (   self  )  [inherited]

Return a (width,height) tuple measuring visual dimensions of currently displayed message.

def getFillColor (   self  )  [inherited]

Return the color of the shape's interior.

def getFontColor (   self  )  [inherited]

Return the current font color.

def getFontSize (   self  )  [inherited]

Return the current font size.

def getHeight (   self  )  [inherited]

Return the height of the rectangle.

def getMessage (   self  )  [inherited]

Return the current string.

def getReferencePoint (   self  )  [inherited]

Return a copy of the current reference point.

Note that mutating that copy has no effect on the Drawable object.

def getWidth (   self  )  [inherited]

Return the width of the rectangle.

def handle (   self,

When the text box is in focus append any keypress to the display text.

Reimplemented from EventHandler.

def move (   self,
) [inherited]

Move the object dx units along X-axis and dy units along Y-axis.

For the default coordinate system, positive dx is rightward and
negative is leftward; positive dy is downard and negative is upward.

def moveTo (   self,
) [inherited]

Move the object to align its reference point with (x,y)

def removeHandler (   self,
) [inherited]

Unregister an EventHandler instance from this object.

def rotate (   self,
) [inherited]

Not yet implemented.

Reimplemented from Drawable.

def scale (   self,
) [inherited]

Not yet implemented.

Reimplemented from Drawable.

def setBorderColor (   self,
) [inherited]

Set the border color to a copy of the indicated color.

The parameter can be either:
   - a string with the name of the color
   - an (r,g,b) tuple
   - an existing Color instance

def setBorderWidth (   self,
) [inherited]

Set the width of the border to the indicated width.

Reimplemented in Button.

def setDepth (   self,
) [inherited]

Set the depth of the object.

Objects with a higher depth will be rendered behind those with lower depths.

def setFillColor (   self,
) [inherited]

Set the interior color of the shape to the color.

The parameter can be either:
   - a string with the name of the color
   - an (r,g,b) tuple
   - an existing Color instance

def setFontColor (   self,
) [inherited]

Set the color of the font.

The parameter can be either:
   - a string with the name of the color
   - an (r,g,b) tuple
   - an existing Color instance

def setFontSize (   self,
) [inherited]

Set the font size.

Reimplemented in Button.

def setHeight (   self,
) [inherited]

Set the height of the rectangle to h.

Reimplemented in Square.

def setMessage (   self,
) [inherited]

Set the string to be displayed.

message  a string

Reimplemented in Button.

def setWidth (   self,
) [inherited]

Set the width of the rectangle to w.

Reimplemented in Square.

def shear (   self,
  angle = 0 
) [inherited]

Shear the object relative to its current reference point.

By default, points with the same y-coordinate as the reference point are left
unchanged.  A point d units above the reference point is shifted d * shear
units to the right.  The optional angle parameter rotates the axis
that the shearing occurs along.

angle      clockwise angle for shear

def stretch (   self,
  angle = 0 
) [inherited]

Stretch the shape in mutltiple direction.

By default the x-axis is scaled by a factor of xFactor and the
y-axis is scaled by a factor of yFactor.  The optional
parameter rotates the directions that the streching is performed

def wait (   self  )  [inherited]

Wait for an event to occur.

When an event occurs, an Event instance is returned
with information about what has happened.

The documentation for this class was generated from the following file:
Generated on Fri Dec 21 18:19:36 2007 by  doxygen 1.5.3