On 2014/11/23, 12:18 PM, Benjamin Root wrote: > Reading through the backend_wx.py code, I noticed a small deviation from > the other interactive backends. All other > new_figure_manager_given_figure() separately creates a canvas and > manager object (which, in turn, creates the window object) and hooks > them all up. The manager would handle all window responsibilities such > as creation/destruction and sizing. However, for the WX backend, this > function just creates a FigureFrameWx object, which is the window > widget. This object also becomes responsible for creating the canvas and > the manager. > > This setup seems a bit backwards to me, but I am not entirely sure. It > is definitely different. Does anybody know if it is merely a remnant of > older designs (I think WX was the first backend)? What are the > limitations of this approach, if any? Is there any interest in > normalizing this backend design with the others (or vice versa)?
Gtk came before Wx, and the mpl drawing model was influenced by that gtk heritage. (And on linux, Wx is a layer on top of Gtk.) I have no idea what the consequences are of the subtle difference you point out, or whether it was a deliberate choice for some compelling reason, or whether it followed gtk but then gtk was changed later, or what. In general, making the backends as similar as possible (and factoring out as much as possible) is good; but actually messing around with these things can be time consuming, painful, and hazardous. It's hard to test with all the different platforms and versions. Eric > > Thanks to everybody for putting up with my questions over the last few > months. Oftentimes, just writing out the questions have been very useful > to me, along with your responses. The good news is the book is almost > done, and I hope that it will be an extremely useful reference. > > Cheers! > Ben Root > > > ------------------------------------------------------------------------------ > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Matplotlib-devel mailing list > Matplotlib-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel