diff options
| author | Ian Ward <ian@excess.org> | 2012-07-14 16:37:47 -0400 |
|---|---|---|
| committer | Ian Ward <ian@excess.org> | 2012-07-14 16:37:47 -0400 |
| commit | af09836a8813ea878ac9dbd5ce351f7bead5cbe1 (patch) | |
| tree | 7d1ee48046b508e8b5b8e8a3b4a9e8ed12e6a88a /docs/reference/constants.rst | |
| parent | f2985b2e70e1b654541495a1576878af56297a7a (diff) | |
| download | urwid-af09836a8813ea878ac9dbd5ce351f7bead5cbe1.tar.gz | |
clean up use of urwid. prefix in docs
--HG--
branch : feature-sphinx
Diffstat (limited to 'docs/reference/constants.rst')
| -rw-r--r-- | docs/reference/constants.rst | 96 |
1 files changed, 49 insertions, 47 deletions
diff --git a/docs/reference/constants.rst b/docs/reference/constants.rst index 3ef7c6b..8259731 100644 --- a/docs/reference/constants.rst +++ b/docs/reference/constants.rst @@ -1,6 +1,8 @@ Constants ========= +.. currentmodule:: urwid + .. note:: These constants may be used, but using the string values themselves in @@ -14,21 +16,21 @@ Widget Sizing Methods One or more of these values returned by :meth:`Widget.sizing` to indicate supported sizing methods. -.. data:: urwid.FLOW +.. data:: FLOW :annotation: = 'flow' Widget that is given a number of columns by its parent widget and calculates the number of rows it requires for rendering e.g. :class:`Text` -.. data:: urwid.BOX +.. data:: BOX :annotation: = 'box' Widget that is given a number of columns and rows by its parent widget and must render that size e.g. :class:`ListBox` -.. data:: urwid.FIXED +.. data:: FIXED :annotation: = 'fixed' Widget that knows the number of columns and rows it requires and will @@ -42,13 +44,13 @@ Horizontal Alignment Used to horizontally align text in :class:`Text` widgets and child widgets of :class:`Padding` and :class:`Overlay`. -.. data:: urwid.LEFT +.. data:: LEFT :annotation: = 'left' -.. data:: urwid.CENTER +.. data:: CENTER :annotation: = 'center' -.. data:: urwid.RIGHT +.. data:: RIGHT :annotation: = 'right' Veritcal Alignment @@ -57,13 +59,13 @@ Veritcal Alignment Used to vertically align child widgets of :class:`Filler` and :class:`Overlay`. -.. data:: urwid.TOP +.. data:: TOP :annotation: = 'top' -.. data:: urwid.MIDDLE +.. data:: MIDDLE :annotation: = 'middle' -.. data:: urwid.BOTTOM +.. data:: BOTTOM :annotation: = 'bottom' Width and Height Settings @@ -73,27 +75,27 @@ Used to distribute or set widths and heights of child widgets of :class:`Padding`, :class:`Filler`, :class:`Columns`, :class:`Pile` and :class:`Overlay`. -.. data:: urwid.PACK +.. data:: PACK :annotation: = 'pack' Ask the child widget to calculate the number of columns or rows it needs -.. data:: urwid.GIVEN +.. data:: GIVEN :annotation: = 'given' A set number of columns or rows, e.g. ('given', 10) will have exactly 10 columns or rows given to the child widget -.. data:: urwid.RELATIVE +.. data:: RELATIVE :annotation: = 'relative' A percentage of the total space, e.g. ('relative', 50) will give half of the total columns or rows to the child widget -.. data:: urwid.RELATIVE_100 +.. data:: RELATIVE_100 :annotation: = ('relative', 100) -.. data:: urwid.WEIGHT +.. data:: WEIGHT :annotation: = 'weight' A weight value for distributing columns or rows, e.g. ('weight', 3) @@ -104,18 +106,18 @@ Used to distribute or set widths and heights of child widgets of Text Wrapping Modes ------------------- -.. data:: urwid.SPACE +.. data:: SPACE :annotation: = 'space' wrap text on space characters or at the boundaries of wide characters -.. data:: urwid.ANY +.. data:: ANY :annotation: = 'any' wrap before any wide or narrow character that would exceed the available screen columns -.. data:: urwid.CLIP +.. data:: CLIP :annotation: = 'clip' clip before any wide or narrow character that would exceed the available @@ -128,55 +130,55 @@ Foreground and Background Colors Standard background and foreground colors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. data:: urwid.BLACK +.. data:: BLACK :annotation: = 'black' -.. data:: urwid.DARK_RED +.. data:: DARK_RED :annotation: = 'dark red' -.. data:: urwid.DARK_GREEN +.. data:: DARK_GREEN :annotation: = 'dark green' -.. data:: urwid.BROWN +.. data:: BROWN :annotation: = 'brown' -.. data:: urwid.DARK_BLUE +.. data:: DARK_BLUE :annotation: = 'dark blue' -.. data:: urwid.DARK_MAGENTA +.. data:: DARK_MAGENTA :annotation: = 'dark magenta' -.. data:: urwid.DARK_CYAN +.. data:: DARK_CYAN :annotation: = 'dark cyan' -.. data:: urwid.LIGHT_GRAY +.. data:: LIGHT_GRAY :annotation: = 'light gray' Standard foreground colors (not safe to use as background) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. data:: urwid.DARK_GRAY +.. data:: DARK_GRAY :annotation: = 'dark gray' -.. data:: urwid.LIGHT_RED +.. data:: LIGHT_RED :annotation: = 'light red' -.. data:: urwid.LIGHT_GREEN +.. data:: LIGHT_GREEN :annotation: = 'light green' -.. data:: urwid.YELLOW +.. data:: YELLOW :annotation: = 'yellow' -.. data:: urwid.LIGHT_BLUE +.. data:: LIGHT_BLUE :annotation: = 'light blue' -.. data:: urwid.LIGHT_MAGENTA +.. data:: LIGHT_MAGENTA :annotation: = 'light magenta' -.. data:: urwid.LIGHT_CYAN +.. data:: LIGHT_CYAN :annotation: = 'light cyan' -.. data:: urwid.WHITE +.. data:: WHITE :annotation: = 'white' User's terminal configuration default foreground or background @@ -189,7 +191,7 @@ User's terminal configuration default foreground or background it is highly recommended to use this setting for both foreground and background when you do use it. -.. data:: urwid.DEFAULT +.. data:: DEFAULT :annotation: = 'default' @@ -207,7 +209,7 @@ Constants are not defined for these colors. Signal Names ------------ -.. data:: urwid.UPDATE_PALETTE_ENTRY +.. data:: UPDATE_PALETTE_ENTRY :annotation: = 'update palette entry' sent by :class:`BaseScreen` (and subclasses like @@ -215,12 +217,12 @@ Signal Names :class:`MainLoop` handles this signal by redrawing the whole screen. -.. data:: urwid.INPUT_DESCRIPTORS_CHANGED +.. data:: INPUT_DESCRIPTORS_CHANGED :annotation: = 'input descriptors changed' sent by :class:`BaseScreen` (and subclasses like :class:`raw_display.Screen`) when the list of input file descriptors - has changed. :class:`urwid.MainLoop` handles this signal by updating + has changed. :class:`MainLoop` handles this signal by updating the file descriptors being watched by its event loop. @@ -235,7 +237,7 @@ You may define any new command names as you wish and look for them in your own widget code. These are the standard ones expected by code included in Urwid. -.. data:: urwid.REDRAW_SCREEN +.. data:: REDRAW_SCREEN :annotation: = 'redraw screen' Default associated keypress: 'ctrl l' @@ -244,7 +246,7 @@ included in Urwid. a screen refresh. This is useful in case the screen becomes corrupted. -.. data:: urwid.ACTIVATE +.. data:: ACTIVATE :annotation: = 'activate' Default associated keypresses: ' ' (space), 'enter' @@ -252,56 +254,56 @@ included in Urwid. Activate a widget such as a :class:`Button`, :class:`CheckBox` or :class:`RadioButton`. -.. data:: urwid.CURSOR_UP +.. data:: CURSOR_UP :annotation: = 'cursor up' Default associated keypress: 'up' Move the cursor or selection up one row. -.. data:: urwid.CURSOR_DOWN +.. data:: CURSOR_DOWN :annotation: = 'cursor down' Default associated keypress: 'down' Move the cursor or selection down one row. -.. data:: urwid.CURSOR_LEFT +.. data:: CURSOR_LEFT :annotation: = 'cursor left' Default associated keypress: 'left' Move the cursor or selection left one column. -.. data:: urwid.CURSOR_RIGHT +.. data:: CURSOR_RIGHT :annotation: = 'cursor right' Default associated keypress: 'right' Move the cursor or selection right one column. -.. data:: urwid.CURSOR_PAGE_UP +.. data:: CURSOR_PAGE_UP :annotation: = 'cursor page up' Default associated keypress: 'page up' Move the cursor or selection up one page. -.. data:: urwid.CURSOR_PAGE_DOWN +.. data:: CURSOR_PAGE_DOWN :annotation: = 'cursor page down' Default associated keypress: 'page down' Move the cursor or selection down one page. -.. data:: urwid.CURSOR_MAX_LEFT +.. data:: CURSOR_MAX_LEFT :annotation: = 'cursor max left' Default associated keypress: 'home' Move the cursor or selection to the leftmost column. -.. data:: urwid.CURSOR_MAX_RIGHT +.. data:: CURSOR_MAX_RIGHT :annotation: = 'cursor max right' Default associated keypress: 'end' |
