@@ -3191,17 +3191,10 @@ class NavigationBase(object):
3191
3191
canvas : `FigureCanvas` instance
3192
3192
toolbar : `Toolbar` instance that is controlled by this `Navigation`
3193
3193
keypresslock : `LockDraw` to direct the `canvas` key_press_event
3194
- movelock: `LockDraw` to direct the `canvas` motion_notify_event
3195
- presslock: `LockDraw` to direct the `canvas` button_press_event
3196
- releaselock: `LockDraw` to direct the `canvas` button_release_event
3197
- canvaslock: shortcut to `canvas.widgetlock`
3198
-
3199
- Notes
3200
- --------_
3201
- The following methos are for implementation pourposes and not for user use
3202
- For these reason they are defined as **_methodname** (private)
3203
-
3204
- .. automethod:: _toolbar_callback
3194
+ movelock : `LockDraw` to direct the `canvas` motion_notify_event
3195
+ presslock : `LockDraw` to direct the `canvas` button_press_event
3196
+ releaselock : `LockDraw` to direct the `canvas` button_release_event
3197
+ canvaslock : shortcut to `canvas.widgetlock`
3205
3198
"""
3206
3199
_default_cursor = cursors .POINTER
3207
3200
_default_tools = [tools .ToolToggleGrid ,
@@ -3221,6 +3214,7 @@ class NavigationBase(object):
3221
3214
'SaveFigure' ]
3222
3215
3223
3216
def __init__ (self , canvas , toolbar = None ):
3217
+ """.. automethod:: _toolbar_callback"""
3224
3218
self .canvas = canvas
3225
3219
self .toolbar = self ._get_toolbar (toolbar , canvas )
3226
3220
@@ -3270,18 +3264,20 @@ def _get_toolbar(self, toolbar, canvas):
3270
3264
toolbar = None
3271
3265
return toolbar
3272
3266
3273
- def get_active (self ):
3274
- """Get the active tools
3267
+ @property
3268
+ def active_toggle (self ):
3269
+ """Get the tooggled Tool"""
3270
+ return self ._toggled
3271
+
3272
+ def get_instances (self ):
3273
+ """Get the active tools instgances
3275
3274
3276
3275
Returns
3277
3276
----------
3278
- A dictionary with the following elements
3279
- * `toggled`: The currently toggled Tool or None
3280
- * `instances`: List of the currently active tool instances
3281
- that are registered with Navigation
3282
-
3277
+ A dictionary with the active instances that are registered with
3278
+ Navigation
3283
3279
"""
3284
- return { 'toggled' : self ._toggled , 'instances' : self . _instances . keys ()}
3280
+ return self ._instances
3285
3281
3286
3282
def get_tool_keymap (self , name ):
3287
3283
"""Get the keymap associated with a tool
@@ -3333,7 +3329,8 @@ def unregister(self, name):
3333
3329
It is usually called by the `deactivate` method or during
3334
3330
destroy if it is a graphical Tool.
3335
3331
3336
- If called, next time the `Tool` is used it will be reinstantiated instead
3332
+ If called, next time the `Tool` is used it will be reinstantiated
3333
+ instead
3337
3334
of using the existing instance.
3338
3335
"""
3339
3336
if self ._toggled == name :
@@ -3644,17 +3641,13 @@ class ToolbarBase(object):
3644
3641
Attributes
3645
3642
----------
3646
3643
manager : `FigureManager` instance that integrates this `Toolbar`
3647
-
3648
- Notes
3649
- -----
3650
- The following methos are for implementation pourposes and not for user use.
3651
- For these reason they are defined as **_methodname** (private)
3652
-
3653
- .. automethod:: _toggle
3654
- .. automethod:: _add_toolitem
3655
- .. automethod:: _remove_toolitem
3656
3644
"""
3657
3645
def __init__ (self , manager ):
3646
+ """
3647
+ .. automethod:: _add_toolitem
3648
+ .. automethod:: _remove_toolitem
3649
+ .. automethod:: _toggle
3650
+ """
3658
3651
self .manager = manager
3659
3652
3660
3653
def _add_toolitem (self , name , description , image_file , position ,
0 commit comments