Back to index

python3.2  3.2.2
Classes | Functions | Variables
curses.textpad Namespace Reference

Classes

class  Textbox

Functions

def rectangle
def test_editbox

Variables

tuple str = curses.wrapper(test_editbox)

Detailed Description

Simple textbox editing widget with Emacs-like keybindings.

Function Documentation

def curses.textpad.rectangle (   win,
  uly,
  ulx,
  lry,
  lrx 
)
Draw a rectangle with corners at the provided upper-left
and lower-right coordinates.

Definition at line 6 of file textpad.py.

00006 
00007 def rectangle(win, uly, ulx, lry, lrx):
00008     """Draw a rectangle with corners at the provided upper-left
00009     and lower-right coordinates.
00010     """
00011     win.vline(uly+1, ulx, curses.ACS_VLINE, lry - uly - 1)
00012     win.hline(uly, ulx+1, curses.ACS_HLINE, lrx - ulx - 1)
00013     win.hline(lry, ulx+1, curses.ACS_HLINE, lrx - ulx - 1)
00014     win.vline(uly+1, lrx, curses.ACS_VLINE, lry - uly - 1)
00015     win.addch(uly, ulx, curses.ACS_ULCORNER)
00016     win.addch(uly, lrx, curses.ACS_URCORNER)
00017     win.addch(lry, lrx, curses.ACS_LRCORNER)
00018     win.addch(lry, ulx, curses.ACS_LLCORNER)

Here is the caller graph for this function:

def curses.textpad.test_editbox (   stdscr)

Definition at line 178 of file textpad.py.

00178 
00179     def test_editbox(stdscr):
00180         ncols, nlines = 9, 4
00181         uly, ulx = 15, 20
00182         stdscr.addstr(uly-2, ulx, "Use Ctrl-G to end editing.")
00183         win = curses.newwin(nlines, ncols, uly, ulx)
00184         rectangle(stdscr, uly-1, ulx-1, uly + nlines, ulx + ncols)
00185         stdscr.refresh()
00186         return Textbox(win).edit()

Here is the call graph for this function:


Variable Documentation

tuple curses.textpad.str = curses.wrapper(test_editbox)

Definition at line 187 of file textpad.py.