Mercurial > MadButterfly
comparison pyink/domview_ui.py @ 1304:94e6594dea59
Make comp_dock being instantiated by domview_ui
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Wed, 19 Jan 2011 17:56:21 +0800 |
parents | 6949e2b6cae2 |
children | 573a51b1eb37 |
comparison
equal
deleted
inserted
replaced
1303:cf2691a18a7a | 1304:94e6594dea59 |
---|---|
381 # This class is a wrapper | 381 # This class is a wrapper |
382 class domview_ui(object): | 382 class domview_ui(object): |
383 _tween_type_names = ('normal', 'scale') | 383 _tween_type_names = ('normal', 'scale') |
384 | 384 |
385 def __init__(self): | 385 def __init__(self): |
386 from comp_dock import comp_dock | |
387 | |
386 super(domview_ui, self).__init__() | 388 super(domview_ui, self).__init__() |
389 | |
387 self._fl_stack = frameline_stack() | 390 self._fl_stack = frameline_stack() |
388 self._dom = domview() | 391 self._dom = domview() |
392 self._comp_dock = comp_dock(self) | |
393 self._desktop = None | |
389 self._doc = None | 394 self._doc = None |
390 self._root = None | 395 self._root = None |
391 self._lock = False | 396 self._lock = False |
392 pass | 397 pass |
393 | 398 |
423 self._fl_stack.set_layer_label(layer_idx, label) | 428 self._fl_stack.set_layer_label(layer_idx, label) |
424 | 429 |
425 self._update_frameline_content(layer_idx) | 430 self._update_frameline_content(layer_idx) |
426 pass | 431 pass |
427 pass | 432 pass |
433 | |
434 ## \brief Setup desktop that the document will be serviced. | |
435 # | |
436 # This method must be called before handle_doc_root. | |
437 # | |
438 def set_desktop(self, desktop): | |
439 self._desktop = desktop | |
440 self._comp_dock.install_dock(desktop) # from component_manager | |
441 pass | |
428 | 442 |
429 ## \brief This method is called to handle a new document. | 443 ## \brief This method is called to handle a new document. |
430 # | 444 # |
431 def handle_doc_root(self, doc, root): | 445 def handle_doc_root(self, doc, root): |
432 self._dom.handle_doc_root(doc, root) | 446 self._dom.handle_doc_root(doc, root) |