diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-02-27 12:41:51 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-02-27 12:41:51 (GMT) |
commit | b04c19efb41f39f578e558031fa89f81559d89e2 (patch) | |
tree | 458238f3c48f1eeef0a56ebb4b41c1a04e9f2114 /sugar/graphics | |
parent | abf84970b513a5e00eb6524244e19e398414f372 (diff) |
Add a window class to graphics, it contains a canvas.
Diffstat (limited to 'sugar/graphics')
-rw-r--r-- | sugar/graphics/Makefile.am | 1 | ||||
-rw-r--r-- | sugar/graphics/window.py | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/sugar/graphics/Makefile.am b/sugar/graphics/Makefile.am index ea115fa..6a45b3c 100644 --- a/sugar/graphics/Makefile.am +++ b/sugar/graphics/Makefile.am @@ -22,4 +22,5 @@ sugar_PYTHON = \ timeline.py \ toolbar.py \ units.py \ + window.py \ xocolor.py diff --git a/sugar/graphics/window.py b/sugar/graphics/window.py new file mode 100644 index 0000000..f3854e3 --- /dev/null +++ b/sugar/graphics/window.py @@ -0,0 +1,14 @@ +import hippo +import gtk + +class Window(gtk.Window): + def __init__(self, window_type=gtk.WINDOW_TOPLEVEL): + gtk.Window.__init__(self, window_type) + + self._canvas = hippo.Canvas() + self.add(self._canvas) + self._canvas.show() + + def set_root(self, root): + self._canvas.set_root(root) + |