Mercurial > MadButterfly
comparison pyink/FSM_window.py @ 1512:89426a38752f
Remove unused code and variables for FSM_window
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Tue, 10 May 2011 23:23:29 +0800 |
parents | 4c349b214877 |
children | 5d4c7ec05bcd |
comparison
equal
deleted
inserted
replaced
1511:4c349b214877 | 1512:89426a38752f |
---|---|
1384 pass | 1384 pass |
1385 pass | 1385 pass |
1386 | 1386 |
1387 | 1387 |
1388 class _FSM_move_state_mode(object): | 1388 class _FSM_move_state_mode(object): |
1389 __metaclass__ = data_monitor.data_monitor | |
1390 __data_monitor_prefix__ = 'on_' | |
1391 | |
1392 _popup = None | 1389 _popup = None |
1393 | 1390 |
1394 _window = None | 1391 _window = None |
1395 _compview = None | 1392 _compview = None |
1396 | 1393 |
1431 compview.set_state_xy(state.state_name, new_state_x, new_state_y) | 1428 compview.set_state_xy(state.state_name, new_state_x, new_state_y) |
1432 state.update() | 1429 state.update() |
1433 state.adjust_transitions() | 1430 state.adjust_transitions() |
1434 state.show_selected() | 1431 state.show_selected() |
1435 pass | 1432 pass |
1436 | |
1437 window = self._window | |
1438 | 1433 |
1439 if evtype == pybInkscape.PYSPItem.PYB_EVENT_BUTTON_PRESS and \ | 1434 if evtype == pybInkscape.PYSPItem.PYB_EVENT_BUTTON_PRESS and \ |
1440 button == 1: | 1435 button == 1: |
1441 start_x = x | 1436 start_x = x |
1442 start_y = y | 1437 start_y = y |
1642 pass | 1637 pass |
1643 pass | 1638 pass |
1644 | 1639 |
1645 | 1640 |
1646 class _FSM_add_state_mode(object): | 1641 class _FSM_add_state_mode(object): |
1647 __metaclass__ = data_monitor.data_monitor | |
1648 __data_monitor_prefix__ = 'on_' | |
1649 | |
1650 _window = None | 1642 _window = None |
1651 _compview = None | 1643 _compview = None |
1652 | 1644 |
1653 _saved_x = 0 | 1645 _saved_x = 0 |
1654 _saved_y = 0 | 1646 _saved_y = 0 |
1655 | |
1656 _select_state = None | |
1657 _candidate_state = None | |
1658 | 1647 |
1659 _popup = None | 1648 _popup = None |
1660 _select = None | 1649 _select = None |
1661 | 1650 |
1662 def __init__(self, window, compview, select_man): | 1651 def __init__(self, window, compview, select_man): |
1756 window.ungrab_state_apply() | 1745 window.ungrab_state_apply() |
1757 window.grab_state_apply(self._handle_state_apply) | 1746 window.grab_state_apply(self._handle_state_apply) |
1758 pass | 1747 pass |
1759 | 1748 |
1760 def deactivate(self): | 1749 def deactivate(self): |
1761 if self._select_state: | |
1762 self._select_state.hide_selected() | |
1763 pass | |
1764 if self._candidate_state: | |
1765 self._candidate_state.hide_selected() | |
1766 self._candidate_state = None | |
1767 pass | |
1768 pass | 1750 pass |
1769 pass | 1751 pass |
1770 | 1752 |
1771 class FSM_window(FSM_window_base): | 1753 class FSM_window(FSM_window_base): |
1772 __metaclass__ = data_monitor.data_monitor | 1754 __metaclass__ = data_monitor.data_monitor |