comparison pyink/domview.py @ 1244:b241f9768833

Remove MBScene_ from the prefix of class names.
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 10 Jan 2011 16:48:11 +0800
parents d5f70928e9f1
children 42c4874c8d1e
comparison
equal deleted inserted replaced
1243:d5f70928e9f1 1244:b241f9768833
39 39
40 ## \brief Monitor changes of DOM-tree. 40 ## \brief Monitor changes of DOM-tree.
41 # 41 #
42 # This class monitors DOM-tree to maintain _maxframe and maps for node ID to 42 # This class monitors DOM-tree to maintain _maxframe and maps for node ID to
43 # node and scene group ID to scene node. 43 # node and scene group ID to scene node.
44 class MBScene_domview_monitor(object): 44 class domview_monitor(object):
45 def __init__(self, *args, **kws): 45 def __init__(self, *args, **kws):
46 super(MBScene_domview_monitor, self).__init__() 46 super(domview_monitor, self).__init__()
47 47
48 self._maxframe = 0 48 self._maxframe = 0
49 self._id2node = {} # map ID to the node in the DOM tree. 49 self._id2node = {} # map ID to the node in the DOM tree.
50 self._group2scene = {} # map ID of a group to associated scene node. 50 self._group2scene = {} # map ID of a group to associated scene node.
51 pass 51 pass
297 # 297 #
298 # This class maintains layers information, and provides functions to create, 298 # This class maintains layers information, and provides functions to create,
299 # change and destroy scene node and scene group. A scene node is a 'ns0:scene' 299 # change and destroy scene node and scene group. A scene node is a 'ns0:scene'
300 # in 'ns0:scenes' tag. A scene group is respective 'svg:g' for a scene. 300 # in 'ns0:scenes' tag. A scene group is respective 'svg:g' for a scene.
301 # 301 #
302 class MBScene_domview(MBScene_domview_monitor): 302 class domview(domview_monitor):
303 # Declare variables, here, for keeping tracking 303 # Declare variables, here, for keeping tracking
304 _doc = None 304 _doc = None
305 _root = None 305 _root = None
306 306
307 def __init__(self, *args, **kws): 307 def __init__(self, *args, **kws):
308 super(MBScene_domview, self).__init__() 308 super(domview, self).__init__()
309 pass 309 pass
310 310
311 ## \brief Create a scenes node if not existed. 311 ## \brief Create a scenes node if not existed.
312 # 312 #
313 def _init_metadata(self): 313 def _init_metadata(self):
352 def handle_doc_root(self, doc, root): 352 def handle_doc_root(self, doc, root):
353 self._doc = doc 353 self._doc = doc
354 self._root = root 354 self._root = root
355 self._layers = [] 355 self._layers = []
356 356
357 self._start_monitor() # start MBScene_domview_monitor 357 self._start_monitor() # start domview_monitor
358 self._init_metadata() 358 self._init_metadata()
359 self._parse_all_layers() 359 self._parse_all_layers()
360 pass 360 pass
361 361
362 def dumpattr(self, n): 362 def dumpattr(self, n):