comparison pyink/FSM_window.py @ 1513:5d4c7ec05bcd

Add comments
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 10 May 2011 23:43:12 +0800
parents 89426a38752f
children e963793c9793
comparison
equal deleted inserted replaced
1512:89426a38752f 1513:5d4c7ec05bcd
1020 'fill: #ffffff') 1020 'fill: #ffffff')
1021 pass 1021 pass
1022 pass 1022 pass
1023 1023
1024 1024
1025 ## \brief Management selections
1026 #
1027 # There is only one state, control points of a transition, or
1028 # transition being selected at any instance. This class manage
1029 # selection to keep the requirement consisted. When caller select a
1030 # new state, control points of a transition, or transition, the class
1031 # will de-select previous one automatically.
1032 #
1025 class _select_manager(object): 1033 class _select_manager(object):
1026 selected_state = None 1034 selected_state = None
1027 selected_transition = None 1035 selected_transition = None
1028 controlled_transition = None 1036 controlled_transition = None
1029 1037
1067 self.reset() 1075 self.reset()
1068 pass 1076 pass
1069 self.deselect = hide 1077 self.deselect = hide
1070 pass 1078 pass
1071 1079
1080 ## \brief Forget all state of the instance
1081 #
1072 def reset(self): 1082 def reset(self):
1073 try: 1083 try:
1074 del self.deselect 1084 del self.deselect
1075 except AttributeError: 1085 except AttributeError:
1076 pass 1086 pass
1079 self.controlled_transition = None 1089 self.controlled_transition = None
1080 pass 1090 pass
1081 pass 1091 pass
1082 1092
1083 1093
1094 ## \brief Handle popup menu for states and transitions.
1095 #
1096 # _FSM_popup.popup_install_handler() must be called to install event
1097 # handlers. It should be called when FSM_window entering a new mode
1098 # since it will ungrab all events to activate a new mode.
1099 #
1084 class _FSM_popup(object): 1100 class _FSM_popup(object):
1085 _window = None 1101 _window = None
1086 _compview = None 1102 _compview = None
1087 1103
1088 _menu_state = None 1104 _menu_state = None