Rewrite this since I forgot to add it and lost it grrr

This commit is contained in:
Marco Pesenti Gritti 2006-07-25 18:39:03 +02:00
parent c094bbd8b5
commit ef71679ed6

16
sugar/scene/SceneView.py Normal file
View File

@ -0,0 +1,16 @@
import gtk
class SceneView(gtk.Fixed):
def __init__(self, stage):
gtk.Fixed.__init__(self)
self.set_has_window(True)
self.connect('expose-event', self.__expose_cb)
self._stage = stage
stage.connect('changed', self.__stage_changed_cb)
def __expose_cb(self, widget, event):
self._stage.render(widget.window)
def __stage_changed_cb(self, stage):
self.window.invalidate_rect(None, False)