comparison pyink/domview_ui.py @ 1308:49775feefbcf

Show components and timelines in comp_dock
author Thinker K.F. Li <thinker@codemud.net>
date Thu, 20 Jan 2011 00:50:49 +0800
parents 8c0a4684c1f7
children e6bb9d00341f
comparison
equal deleted inserted replaced
1307:cfbc0f3e54e3 1308:49775feefbcf
377 377
378 378
379 ## \biref Components and timelines management for domview. 379 ## \biref Components and timelines management for domview.
380 # 380 #
381 # This is mix-in for domview_ui to provide components and timelines 381 # This is mix-in for domview_ui to provide components and timelines
382 # management functions. 382 # management functions. This class expose a lot of methods from class
383 # component_manager.
383 # 384 #
384 class domview_ui_comp(object): 385 class domview_ui_comp(object):
385 def __init__(self): 386 def __init__(self):
386 from comp_dock import comp_dock 387 from comp_dock import comp_dock
387 388
392 # 393 #
393 # This method must be called before handle_doc_root. 394 # This method must be called before handle_doc_root.
394 # 395 #
395 def set_desktop(self, desktop): 396 def set_desktop(self, desktop):
396 self._desktop = desktop 397 self._desktop = desktop
397 self._comp_dock.install_dock(desktop) # from component_manager 398 self._comp_dock.install_dock(desktop)
398 pass 399 pass
399 400
400 def add_component(self, name): 401 def add_component(self, name):
401 self._dom.add_component(name) 402 self._dom.add_component(name)
402 pass 403 pass
496 def handle_doc_root(self, doc, root): 497 def handle_doc_root(self, doc, root):
497 self._dom.handle_doc_root(doc, root) 498 self._dom.handle_doc_root(doc, root)
498 self._fl_stack.init_framelines() 499 self._fl_stack.init_framelines()
499 self._add_frameline_for_every_layer() 500 self._add_frameline_for_every_layer()
500 self._fl_stack.show_framelines() 501 self._fl_stack.show_framelines()
502 self._comp_dock.refresh() # from domview_ui_comp
501 503
502 self._doc = doc 504 self._doc = doc
503 self._root = root 505 self._root = root
504 pass 506 pass
505 507