Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Add some wx specific tools for ToolManager#10208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
tacaswell merged 4 commits intomatplotlib:masterfromDietmarSchwertberger:BACKENDWX_TOOLMANAGER_TOOLSFeb 12, 2018
Merged
Add some wx specific tools for ToolManager#10208
tacaswell merged 4 commits intomatplotlib:masterfromDietmarSchwertberger:BACKENDWX_TOOLMANAGER_TOOLSFeb 12, 2018
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
@DietmarSchwertberger I took the liberty of pushing a fix for the style check failure. |
Sure, thanks, I did not see this one. The original from 'NavigationToolbar2Wx' was multi-line... |
ok, lets try that again.... |
Thanks! The failure looks like a transient. |
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary
This is a first implementation of the main ToolManager Tools for the wx backends:
SaveFigure, SetCursor and Rubberband
There's no ToolbarWx implementation. The tools are for embedding a FigureCanvasWxAgg and to be triggered by the program.
This is a replacement for PR#10145.
It was tested under Windows/Python 3.6/Phoenix and Mac OS/Python 2.7/wxPython 3.0.2.
The implementation of Rubberband under Mac OS is not optimal, but overlays and DC.SetLogicalFunction do not work on Mac OS on any wxPython version.
Re-using the Mac OS rubberband code from the NavigationToolbar2Wx would have created quite unreadable code as RubberbandBase is using screen coordinates. The code could probably be optimized with a changed implementation of FigureCanvasWxAgg.
The other tools are mainly copy & paste from NavigationToolbar2Wx and the Qt/GTK3/Tk implementations of the tools.
My motivation for the current pull requests is to ship a fully working example with wxGlade that demonstrates how to build a GUI with a matplotlib canvas and use most of the control features that people would need. I could strip down this example if required. The full example is probably too large for distribution with matplotlib and also it's not finished yet.
PR Checklist