Package pajammin :: Package display :: Package ui :: Module textbox :: Class InputLine
[show private | hide private]
[frames | no frames]

Type InputLine

  object --+        
           |        
ScreenWidget --+    
               |    
         TextBox --+
                   |
                  InputLine


This is meant to make things easy. :)
Method Summary
  __init__(self, label, ok, initial_text, width, cancel)
  draw(self, screen, duration)
Draw this widget to the screen.
    Inherited from TextBox
  hide(self)
  insert(self, text)
Insert text at the cursor.
  move(self, dx, dy)
  move_to(self, x, y, anchor)
  set_background(self, color, alpha)
  set_cursor(self, i, j)
  set_editable(self, enable)
  set_text(self, text)
  show(self)
  text(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
Return repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Instance Variable Summary
    Inherited from TextBox
  layer: An integer indicating the order in which the widget should be drawn to the screen, relative to other widgets.
    Inherited from ScreenWidget
bool hidden: If true, then the screen widget will not be drawn.

Class Variable Summary
    Inherited from TextBox
dict color = {'cursor': (0, 0, 128), 'text': (0, 0, 0), 'bord...
int DEFAULT_WIDTH = 300                                                                   
int SCROLLBAR_WIDTH = 14                                                                    
str SHIFTED = '                                 !"#$%&"()*+<...
str UNSHIFTED = '                                 !"#$%&\'()...

Method Details

__init__(self, label, ok, initial_text='', width=500, cancel=None)
(Constructor)

Overrides:
pajammin.display.ui.textbox.TextBox.__init__

draw(self, screen, duration)

Draw this widget to the screen.
Parameters:
screen - The screen surface.
duration - The amount of time that has elapsed since the last call to draw, in msec.
Returns:
A pygame Rect indicating what area of the screen has been modified by this draw operation.
Overrides:
pajammin.display.ui.textbox.TextBox.draw (inherited documentation)