comparison pyink/domview_ui.py @ 1246:42c4874c8d1e

Move _duplicate_group to domview_ui. - domview_ui.copy_key_group() replaces MBScene._duplicate_group().
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 10 Jan 2011 19:44:15 +0800
parents ccbf0c5d01d1
children 45e9566ea5c0
comparison
equal deleted inserted replaced
1245:ccbf0c5d01d1 1246:42c4874c8d1e
346 def register_active_frame_callback(self, cb): 346 def register_active_frame_callback(self, cb):
347 self._active_frame_callback = cb 347 self._active_frame_callback = cb
348 pass 348 pass
349 pass 349 pass
350 350
351
351 ## \brief Bridge of DOM-tree to syncrhonize data-model and UI. 352 ## \brief Bridge of DOM-tree to syncrhonize data-model and UI.
352 # 353 #
353 # This class is a wrapper 354 # This class is a wrapper
354 class domview_ui(object): 355 class domview_ui(object):
355 _tween_type_names = ('normal', 'scale') 356 _tween_type_names = ('normal', 'scale')
561 ## \brief Return information of key frames in the given layer. 562 ## \brief Return information of key frames in the given layer.
562 # 563 #
563 def get_layer_keys(self, layer_idx): 564 def get_layer_keys(self, layer_idx):
564 key_tweens = self._fl_stack.get_all_key_tween_of_layer(layer_idx) 565 key_tweens = self._fl_stack.get_all_key_tween_of_layer(layer_idx)
565 return key_tweens 566 return key_tweens
567
568 ## \brief Copy content of a source key frame to a destinate.
569 #
570 # Copy content of the scene group of a source key frame to the
571 # scene group of a destinate key frame.
572 #
573 def copy_key_group(self, layer_idx, src_frame_idx, dst_frame_idx):
574 src_group = self.get_key_group(layer_idx, src_frame_idx)
575 dst_group = self.get_key_group(layer_idx, dst_frame_idx)
576 self._dom.copy_group_children(src_group, dst_group)
577 pass
566 578
567 ## \brief Return widget showing frames and layers. 579 ## \brief Return widget showing frames and layers.
568 # 580 #
569 def get_frame_ui_widget(self): 581 def get_frame_ui_widget(self):
570 return self._fl_stack._frameline_box 582 return self._fl_stack._frameline_box