d2f76cc41d
Remove obsolete import.
23 lines
511 B
Python
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
|