@@ -2933,7 +2933,7 @@ def mouse_move(self, event):
2933
2933
2934
2934
class NavigationBase (object ):
2935
2935
_default_cursor = cursors .POINTER
2936
- tools = [ToolToggleGrid ,
2936
+ _default_tools = [ToolToggleGrid ,
2937
2937
ToolToggleFullScreen ,
2938
2938
ToolQuit , ToolEnableAllNavigation , ToolEnableNavigation ,
2939
2939
ToolToggleXScale , ToolToggleYScale ,
@@ -2946,10 +2946,10 @@ def __init__(self, canvas, toolbar=None):
2946
2946
self .toolbar = self ._get_toolbar (toolbar , canvas )
2947
2947
2948
2948
self ._key_press_handler_id = self .canvas .mpl_connect ('key_press_event' ,
2949
- self .key_press )
2949
+ self ._key_press )
2950
2950
2951
2951
self ._idDrag = self .canvas .mpl_connect ('motion_notify_event' ,
2952
- self .mouse_move )
2952
+ self ._mouse_move )
2953
2953
2954
2954
self ._idPress = self .canvas .mpl_connect ('button_press_event' ,
2955
2955
self ._press )
@@ -2973,7 +2973,7 @@ def __init__(self, canvas, toolbar=None):
2973
2973
#just to group all the locks in one place
2974
2974
self .canvaslock = self .canvas .widgetlock
2975
2975
2976
- for tool in self .tools :
2976
+ for tool in self ._default_tools :
2977
2977
self .add_tool (tool )
2978
10000
2978
2979
2979
self ._last_cursor = self ._default_cursor
@@ -3025,7 +3025,7 @@ def add_tool(self, callback_class):
3025
3025
if tool .image is not None :
3026
3026
fname = os .path .join (basedir , tool .image + '.png' )
3027
3027
else :
3028
- fname = 'Unknown'
3028
+ fname = None
3029
3029
self .toolbar .add_toolitem (name , tool .description ,
3030
3030
fname ,
3031
3031
tool .position ,
@@ -3045,11 +3045,7 @@ def _get_cls_to_instantiate(self, callback_class):
3045
3045
3046
3046
return callback_class
3047
3047
3048
- def key_press (self , event ):
3049
- """
3050
- Implement the default mpl key bindings defined at
3051
- :ref:`key-event-handling`
3052
- """
3048
+ def _key_press (self , event ):
3053
3049
3054
3050
if event .key is None :
3055
3051
return
@@ -3137,7 +3133,7 @@ def update(self):
3137
3133
self .positions .clear ()
3138
3134
# self.set_history_buttons()
3139
3135
3140
- def mouse_move (self , event ):
3136
+ def _mouse_move (self , event ):
3141
3137
if self ._toggled :
3142
3138
instance = self ._instances [self ._toggled ]
3143
3139
if self .movelock .isowner (instance ):
0 commit comments