@@ -3233,17 +3233,10 @@ class NavigationBase(object):
3233
3233
canvas : `FigureCanvas` instance
3234
3234
toolbar : `Toolbar` instance that is controlled by this `Navigation`
3235
3235
keypresslock : `LockDraw` to direct the `canvas` key_press_event
3236
- movelock: `LockDraw` to direct the `canvas` motion_notify_event
3237
- presslock: `LockDraw` to direct the `canvas` button_press_event
3238
- releaselock: `LockDraw` to direct the `canvas` button_release_event
3239
- canvaslock: shortcut to `canvas.widgetlock`
3240
-
3241
- Notes
3242
- --------_
3243
- The following methos are for implementation pourposes and not for user use
3244
- For these reason they are defined as **_methodname** (private)
3245
-
3246
- .. automethod:: _toolbar_callback
3236
+ movelock : `LockDraw` to direct the `canvas` motion_notify_event
3237
+ presslock : `LockDraw` to direct the `canvas` button_press_event
3238
+ releaselock : `LockDraw` to direct the `canvas` button_release_event
3239
+ canvaslock : shortcut to `canvas.widgetlock`
3247
3240
"""
3248
3241
_default_cursor = cursors .POINTER
3249
3242
_default_tools = [tools .ToolToggleGrid ,
@@ -3263,6 +3256,7 @@ class NavigationBase(object):
3263
3256
'SaveFigure' ]
3264
3257
3265
3258
def __init__ (self , canvas , toolbar = None ):
3259
+ """.. automethod:: _toolbar_callback"""
3266
3260
self .canvas = canvas
3267
3261
self .toolbar = self ._get_toolbar (toolbar , canvas )
3268
3262
@@ -3312,18 +3306,20 @@ def _get_toolbar(self, toolbar, canvas):
3312
3306
toolbar = None
3313
3307
return toolbar
3314
3308
3315
- def get_active (self ):
3316
- """Get the active tools
3309
+ @property
3310
+ def active_toggle (self ):
3311
+ """Get the tooggled Tool"""
3312
+ return self ._toggled
3313
+
3314
+ def get_instances (self ):
3315
+ """Get the active tools instgances
3317
3316
3318
3317
Returns
3319
3318
----------
3320
- A dictionary with the following elements
3321
- * `toggled`: The currently toggled Tool or None
3322
- * `instances`: List of the currently active tool instances
3323
- that are registered with Navigation
3324
-
3319
+ A dictionary with the active instances that are registered with
3320
+ Navigation
3325
3321
"""
3326
- return { 'toggled' : self ._toggled , 'instances' : self . _instances . keys ()}
3322
+ return self ._instances
3327
3323
3328
3324
def get_tool_keymap (self , name ):
3329
3325
"""Get the keymap associated with a tool
@@ -3375,7 +3371,8 @@ def unregister(self, name):
3375
3371
It is usually called by the `deactivate` method or during
3376
3372
destroy if it is a graphical Tool.
3377
3373
3378
- If called, next time the `Tool` is used it will be reinstantiated instead
3374
+ If called, next time the `Tool` is used it will be reinstantiated
3375
+ instead
3379
3376
of using the existing instance.
3380
3377
"""
3381
3378
if self ._toggled == name :
@@ -3686,17 +3683,13 @@ class ToolbarBase(object):
3686
3683
Attributes
3687
3684
----------
3688
3685
manager : `FigureManager` instance that integrates this `Toolbar`
3689
-
3690
- Notes
3691
- -----
3692
- The following methos are for implementation pourposes and not for user use.
3693
- For these reason they are defined as **_methodname** (private)
3694
-
3695
- .. automethod:: _toggle
3696
- .. automethod:: _add_toolitem
3697
- .. automethod:: _remove_toolitem
3698
3686
"""
3699
3687
def __init__ (self , manager ):
3688
+ """
3689
+ .. automethod:: _add_toolitem
3690
+ .. automethod:: _remove_toolitem
3691
+ .. automethod:: _toggle
3692
+ """
3700
3693
self .manager = manager
3701
3694
3702
3695
def _add_toolitem (self , name , description , image_file , position ,
0 commit comments