Rewrite this since I forgot to add it and lost it grrr
This commit is contained in:
parent
c094bbd8b5
commit
ef71679ed6
16
sugar/scene/SceneView.py
Normal file
16
sugar/scene/SceneView.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user