sugar-toolkit-gtk3/sugar/scene/StageView.py
Marco Pesenti Gritti d2f76cc41d More work on the new home page.
Remove obsolete import.
2006-07-24 15:11:14 +02:00

23 lines
511 B
Python

import gtk
from sugar.scene.Stage import Stage
class StageView(gtk.Fixed):
def __init__(self, stage):
gtk.Fixed.__init__(self)
self.set_has_window(True)
self._stage = stage
self._stage.connect('changed', self.__stage_changed_cb)
self.connect('expose_event', self.__expose_cb)
def __stage_changed_cb(self, stage):
if self.window:
self.window.invalidate_rect(None, False)
def __expose_cb(self, widget, event):
self._stage.render(widget.window)
def get_stage(self):
return self._stage