comparison pyink/domview_ui.py @ 1253:07e0cb1e051d

Add class consistency_checker for domview_ui. - consistency_checker is to check consistency of the DOM-tree associated with a domview_ui. - It is so closed to domview_ui, so it may access private variables. - But, it uses public interface of domview_ui if possible. - consistency_checker is not integrated to domview_ui for separating functions of consistency checking from the domview_ui. It collects relative logic into a place and setups a boundary from others.
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 11 Jan 2011 11:43:32 +0800
parents 71222a6b4c06
children 2609b219703d
comparison
equal deleted inserted replaced
1252:71222a6b4c06 1253:07e0cb1e051d
1 import gtk 1 import gtk
2 from tween import TweenObject 2 from tween import TweenObject
3 from frameline import frameline, frameruler 3 from frameline import frameline, frameruler
4 from domview import domview 4 from domview import domview
5 5 import consistency
6 6
7 ## \brief Maintain a stack of frameline UI component. 7 ## \brief Maintain a stack of frameline UI component.
8 # 8 #
9 # Every layer is assocated with a frameline. Framelines are showed/stacked in 9 # Every layer is assocated with a frameline. Framelines are showed/stacked in
10 # virtical. Framelines of lower layers are placed at lower position on the 10 # virtical. Framelines of lower layers are placed at lower position on the
359 super(domview_ui, self).__init__() 359 super(domview_ui, self).__init__()
360 self._fl_stack = frameline_stack() 360 self._fl_stack = frameline_stack()
361 self._dom = domview() 361 self._dom = domview()
362 self._doc = None 362 self._doc = None
363 self._root = None 363 self._root = None
364 self._consistency_checker = consistency.consistency_checker(self)
364 self._lock = False 365 self._lock = False
365 pass 366 pass
366 367
367 ## \brief Update content of a frameline from scenes of respective layer. 368 ## \brief Update content of a frameline from scenes of respective layer.
368 # 369 #
407 self._add_frameline_for_every_layer() 408 self._add_frameline_for_every_layer()
408 self._fl_stack._show_framelines() 409 self._fl_stack._show_framelines()
409 410
410 self._doc = doc 411 self._doc = doc
411 self._root = root 412 self._root = root
413 self._consistency_checker.handle_doc_root(doc, root)
412 pass 414 pass
413 415
414 ## \brief Mark given frame as a key frame. 416 ## \brief Mark given frame as a key frame.
415 # 417 #
416 def mark_key(self, layer_idx, key_idx): 418 def mark_key(self, layer_idx, key_idx):