@tacaswell I modified the wiki reflecting the changes and trying to answer the questions. Please let me know if I answered your questions/concerns. We can iterate as muchs as needed on this, I have no problem modifying the names or functionnality.
Sorry for the long email Here a list of things that I changed ToolBase description = '': Small description of the tool persistent = False: If True, the instance of the Tool is registered with Navigation for reuse. This is needed because some tools are keept alive in the background, for example SubplotTool. position = None: Where is it positionned in the toolbar?. -1 = at the end, None = Not in the toolbar. The default tools are all ordered by their position in the Navigation _default_tools array. This argument is mainly used by User created tools that are added after the Toolbar creation. My idea was that for the user created tools, the user could set the position without having to subclass the Navigation class. So this information has to be included in the Tool. activate(self, event): This is the main method of the Tool, it is called when the Tool is triggered by: * Toolbar button click * keypress associated with the Tool Keymap * Call to navigation.click_tool(name) ToolPersistentBase unregister(self, *args): ... Because ToolBase is intened for single use, there is no need of registration for the instances, persistent tools, need to be registered so __init__ is called only onece during the first trigger NavigationBase locks.... I tend to agree with you. The idea that I had in mind, and maybe was more complex than expected. Was to redirect the events to the tool without need to call the mpl_connect within the tool. So I provided the methods to handle those events directly. This is also from the idea that if we implement the MultiFigureManager, when there is a change on the 'active_figure' Navigation knows about the change and changes the event handlers, in this case the Tools don't need to do anything. It was just to simplify the Tool creation eliminating the need for basic event connection in case of figure changes. Even if we remove the locks we need two locks: canvaslock (for the input) keypress lock, to give the tool the option to absorb the keypress completely. (Tool for anotations comes to mind) I didn't remove the comment for the locks, because I am not sure what is the best option. ToolbarBase I tried to clarify the use of the methods. Most of the methods that you mentionned, are for internal use only but are mandatory for backend implementation. Also I updated the wiki with the "_" that was missing from the private methods. On Mon, Jan 27, 2014 at 9:12 PM, Thomas A Caswell <tcasw...@uchicago.edu> wrote: > I left some comments on the wiki (in []). Not sure what the best way > to leave comments is. > > On Mon, Jan 27, 2014 at 5:04 PM, Federico Ariza > <ariza.feder...@gmail.com> wrote: >> Hello everybody >> >> I just added "click_tool" to simulate a click programatically. >> https://github.com/matplotlib/matplotlib/pull/2759 >> >> Is there anything missing or that you want to change? >> I'm saturated so I don't see anything anymore. >> >> I would like to have some input specially in the `ToolbarBase` class. >> I am ready to start the implementation on the other backends, and this >> is the "new class" that have to be implemented for all the backends. >> `Navigation` is mostly copy paste from existing toolbar >> >> Thanks >> Federico >> >> On Mon, Jan 27, 2014 at 11:07 AM, Phil Elson <pelson....@gmail.com> wrote: >>> Hi Federico, >>> >>> I just wanted to say that I've been a little busy lately, but your MEP is >>> really shaping up - I really like the concepts that are being proposed and >>> think it will make a huge difference to people who want to implement custom >>> UIs. >>> >>> Keep up the great work, and continue trying to get feedback from all of us >>> on this! >>> >>> Thanks, >>> >>> Phil >>> >>> >>> On 24 January 2014 18:43, Federico Ariza <ariza.feder...@gmail.com> wrote: >>>> >>>> Hello everybody >>>> >>>> I just added some documentation for the MEP22 new classes and methods. >>>> Please take a look https://github.com/matplotlib/matplotlib/pull/2759 >>>> >>>> I ran into some problems, when trying to decide if some methods where >>>> public or not. >>>> >>>> If the method was used only for backend implementation pourposes I put >>>> it as private (name starts with underscore) but still documented them >>>> in the Notes section of the class. >>>> I don't know if this is the correct way to do it, but I couldn't decide. >>>> If you prefer any other way to do it, please let me know. >>>> >>>> Thank you >>>> Federico >>>> >>>> >>>> -- >>>> Y yo que culpa tengo de que ellas se crean todo lo que yo les digo? >>>> >>>> -- Antonio Alducin -- >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> CenturyLink Cloud: The Leader in Enterprise Cloud Services. >>>> Learn Why More Businesses Are Choosing CenturyLink Cloud For >>>> Critical Workloads, Development Environments & Everything In Between. >>>> Get a Quote or Start a Free Trial Today. >>>> >>>> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> Matplotlib-devel mailing list >>>> Matplotlib-devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel >>> >>> >> >> >> >> -- >> Y yo que culpa tengo de que ellas se crean todo lo que yo les digo? >> >> -- Antonio Alducin -- >> >> ------------------------------------------------------------------------------ >> CenturyLink Cloud: The Leader in Enterprise Cloud Services. >> Learn Why More Businesses Are Choosing CenturyLink Cloud For >> Critical Workloads, Development Environments & Everything In Between. >> Get a Quote or Start a Free Trial Today. >> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk >> _______________________________________________ >> Matplotlib-devel mailing list >> Matplotlib-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > > > -- > Thomas A Caswell > PhD Candidate University of Chicago > Nagel and Gardel labs > tcasw...@uchicago.edu > jfi.uchicago.edu/~tcaswell > o: 773.702.7204 -- Y yo que culpa tengo de que ellas se crean todo lo que yo les digo? -- Antonio Alducin -- ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel