--- a/tuikit/window.py Thu Sep 08 10:13:55 2011 +0200
+++ b/tuikit/window.py Thu Sep 08 11:37:27 2011 +0200
@@ -5,7 +5,14 @@
class Window(Container):
+
+ '''Window widget.
+
+ It represents part of screen with border, close button and contents.
+ Window can be moved, resized or closed by user.'''
+
def __init__(self, width=40, height=10):
+ '''Create window of requested size.'''
Container.__init__(self, width, height)
self.connect('draw', self.on_draw)
@@ -14,9 +21,15 @@
self.connect('mousemove', self.on_mousemove)
self.connect('resize', self.on_resize)
+ #: Window title.
self.title = ''
+
self._closebutton = True
+
+ #: Allow user to resize window.
self.resizable = True
+
+ #: Allow user to move window.
self.movable = True
self.resizing = False
@@ -37,6 +50,7 @@
@property
def closebutton(self):
+ '''Show/hide close button.'''
return self._closebutton
@closebutton.setter