Mercurial > MadButterfly
comparison pyink/domview_ui.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 | ccbf0c5d01d1 |
comparison
equal
deleted
inserted
replaced
1243:d5f70928e9f1 | 1244:b241f9768833 |
---|---|
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 MBScene_domview | 4 from domview import domview |
5 | 5 |
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 |
11 # screen. This class provide a set of API to access framelines with layer and | 11 # screen. This class provide a set of API to access framelines with layer and |
12 # frame index number. You access/set content of frameline by specifing layer | 12 # frame index number. You access/set content of frameline by specifing layer |
13 # index and frame index. | 13 # index and frame index. |
14 # | 14 # |
15 class MBScene_frameline_stack(object): | 15 class frameline_stack(object): |
16 _frameline_tween_types = (frameline.TWEEN_TYPE_NONE, | 16 _frameline_tween_types = (frameline.TWEEN_TYPE_NONE, |
17 frameline.TWEEN_TYPE_SHAPE) | 17 frameline.TWEEN_TYPE_SHAPE) |
18 _num_frames_of_line = 100 | 18 _num_frames_of_line = 100 |
19 | 19 |
20 _framelines = None | 20 _framelines = None |
21 | 21 |
22 def __init__(self, *args, **kws): | 22 def __init__(self, *args, **kws): |
23 super(MBScene_frameline_stack, self).__init__(*args, **kws) | 23 super(frameline_stack, self).__init__(*args, **kws) |
24 | 24 |
25 self._last_mouse_over_frameline = None | 25 self._last_mouse_over_frameline = None |
26 self._last_active_frameline = None | 26 self._last_active_frameline = None |
27 self._active_frame_callback = None | 27 self._active_frame_callback = None |
28 pass | 28 pass |
349 pass | 349 pass |
350 | 350 |
351 ## \brief Bridge of DOM-tree to syncrhonize data-model and UI. | 351 ## \brief Bridge of DOM-tree to syncrhonize data-model and UI. |
352 # | 352 # |
353 # This class is a wrapper | 353 # This class is a wrapper |
354 class MBScene_domview_ui(object): | 354 class domview_ui(object): |
355 _tween_type_names = ('normal', 'scale') | 355 _tween_type_names = ('normal', 'scale') |
356 | 356 |
357 def __init__(self): | 357 def __init__(self): |
358 super(MBScene_domview_ui, self).__init__() | 358 super(domview_ui, self).__init__() |
359 self._fl_stack = MBScene_frameline_stack() | 359 self._fl_stack = frameline_stack() |
360 self._dom = MBScene_domview() | 360 self._dom = domview() |
361 pass | 361 pass |
362 | 362 |
363 ## \brief Update content of a frameline from scenes of respective layer. | 363 ## \brief Update content of a frameline from scenes of respective layer. |
364 # | 364 # |
365 def _update_frameline_content(self, layer_idx): | 365 def _update_frameline_content(self, layer_idx): |