2007-02-27 13:41:51 +01:00
|
|
|
import hippo
|
|
|
|
import gtk
|
|
|
|
|
2007-02-27 20:08:33 +01:00
|
|
|
from sugar.graphics import color
|
|
|
|
|
|
|
|
class _Style(gtk.Style):
|
|
|
|
__gtype_name__ = 'SugarCanvasStyle'
|
|
|
|
def __init__(self):
|
|
|
|
gtk.Style.__init__(self)
|
|
|
|
|
|
|
|
def do_set_background(self, window, state):
|
|
|
|
window.set_back_pixmap(None, False)
|
|
|
|
|
2007-02-27 13:41:51 +01:00
|
|
|
class Window(gtk.Window):
|
|
|
|
def __init__(self, window_type=gtk.WINDOW_TOPLEVEL):
|
|
|
|
gtk.Window.__init__(self, window_type)
|
|
|
|
|
|
|
|
self._canvas = hippo.Canvas()
|
2007-02-27 20:08:33 +01:00
|
|
|
self._canvas.set_style(_Style())
|
2007-02-27 13:41:51 +01:00
|
|
|
self.add(self._canvas)
|
|
|
|
self._canvas.show()
|
|
|
|
|
|
|
|
def set_root(self, root):
|
|
|
|
self._canvas.set_root(root)
|