summaryrefslogtreecommitdiff
path: root/urwid/widget.py
diff options
context:
space:
mode:
authorIan Ward <ian@excess.org>2012-01-05 13:42:38 -0500
committerIan Ward <ian@excess.org>2012-01-05 13:42:38 -0500
commit05e1e6d52d6f70c85bbcf67d9625f3e1a694cb3e (patch)
tree70c0100fc13a3f0fac595ef8e1e9afd0f7012835 /urwid/widget.py
parentcd28424ca4ad80bb76177db24cf35b8e0d75a5f2 (diff)
downloadurwid-05e1e6d52d6f70c85bbcf67d9625f3e1a694cb3e.tar.gz
imported patch containers-overlay-in-progress
--HG-- branch : feature-containers
Diffstat (limited to 'urwid/widget.py')
-rw-r--r--urwid/widget.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/urwid/widget.py b/urwid/widget.py
index 6f6e4bb..0e4d01b 100644
--- a/urwid/widget.py
+++ b/urwid/widget.py
@@ -33,18 +33,20 @@ from urwid.command_map import command_map
from urwid.split_repr import split_repr, remove_defaults, python3_repr
+# define some names for these constants to avoid misspellings in the source
+# and to document the constant strings we are using
+
# Widget sizing methods
-# (use the same string objects to make some comparisons faster)
FLOW = 'flow'
BOX = 'box'
FIXED = 'fixed'
-# Text alignment modes
+# Text alignment modes
LEFT = 'left'
RIGHT = 'right'
CENTER = 'center'
-# Filler alignment modes
+# Filler alignment modes
TOP = 'top'
MIDDLE = 'middle'
BOTTOM = 'bottom'
@@ -60,6 +62,9 @@ GIVEN = 'given'
RELATIVE = 'relative'
RELATIVE_100 = (RELATIVE, 100)
+# extra constants for Pile/Columns
+WEIGHT = 'weight'
+
class WidgetMeta(MetaSuper, signals.MetaSignals):
"""