Add a window class to graphics, it contains a canvas.
This commit is contained in:
@@ -22,4 +22,5 @@ sugar_PYTHON = \
|
||||
timeline.py \
|
||||
toolbar.py \
|
||||
units.py \
|
||||
window.py \
|
||||
xocolor.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)
|
||||
|
||||
Reference in New Issue
Block a user