FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add some wx specific tools for ToolManager by DietmarSchwertberger · Pull Request #10208 · matplotlib/matplotlib · GitHub

Repository navigation

Add some wx specific tools for ToolManager - #10208

Merged
tacaswell merged 4 commits into
matplotlib:masterfrom
DietmarSchwertberger:BACKENDWX_TOOLMANAGER_TOOLS
Feb 12, 2018
Merged

tacaswell merged 4 commits into
matplotlib:masterfrom
DietmarSchwertberger:BACKENDWX_TOOLMANAGER_TOOLS

Conversation

Copy link
Copy Markdown
Contributor

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

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

tacaswell added this to the v2.2 milestone Jan 9, 2018
DietmarSchwertberger changed the title Baadd some wx specific tools for ToolManager Add some wx specific tools for ToolManager Feb 11, 2018
DietmarSchwertberger mentioned this pull request Feb 11, 2018
6 tasks

Copy link
Copy Markdown
Member

@DietmarSchwertberger I took the liberty of pushing a fix for the style check failure.

Copy link
Copy Markdown
Contributor Author

Sure, thanks, I did not see this one. The original from 'NavigationToolbar2Wx' was multi-line...

Copy link
Copy Markdown
Member

ok, lets try that again....

tacaswell merged commit 001368f into matplotlib:master Feb 12, 2018

Copy link
Copy Markdown
Member

Thanks!

The failure looks like a transient.

DietmarSchwertberger deleted the BACKENDWX_TOOLMANAGER_TOOLS branch February 12, 2018 01:26
QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL