@@ -48,6 +48,7 @@ Two main places for generic code appear in the classes derived from
4848``FigureManagerBase `` and ``ShowBase ``.
4949
50501. ``FigureManagerBase `` has **three ** jobs at the moment:
51+
5152 1. The documentation describes it as a *``Helper class for pyplot
5253 mode, wraps everything up into a neat bundle'' *
5354 2. But it doesn't just wrap the canvas and toolbar, it also does
@@ -63,6 +64,7 @@ Two main places for generic code appear in the classes derived from
6364
6465
65662. ``ShowBase `` has two jobs:
67+
6668 1. It has the job of going through all figure managers registered
6769 in ``_pylab_helpers.Gcf `` and telling them to show themselves.
6870 2. And secondly it has the job of performing the backend specific
@@ -89,46 +91,42 @@ The description of this MEP gives us most of the solution:
89913. Now that ``FigureManagerBase `` has no backend specifics in it, to
9092 rename it to ``FigureManager ``, and move to a new file
9193 ``backend_managers.py `` noting that:
92- 1. This allows us to break up the conversion of backends into
93- separate PRs as we can keep the existing ``FigureManagerBase ``
94- class and its dependencies intact.
95- 2. and this also anticipates MEP22 where the new
96- ``NavigationBase `` has morphed into a backend independent
97- ``ToolManager ``.
94+
95+ 1. This allows us to break up the conversion of backends into
96+ separate PRs as we can keep the existing ``FigureManagerBase ``
97+ class and its dependencies intact.
98+ 2. and this also anticipates MEP22 where the new
99+ ``NavigationBase `` has morphed into a backend independent
100+ ``ToolManager ``.
98101
99102+--------------------------------------+------------------------------+---------------------+--------------------------------+
100103| FigureManagerBase(canvas, num) |FigureManager(figure, num) |``WindowBase(title)``|Notes |
101104| | | | |
102105+======================================+==============================+=====================+================================+
103- | show |:arrow_right: |show | |
106+ | show | |show | |
104107+--------------------------------------+------------------------------+---------------------+--------------------------------+
105108| destroy |calls destroy on all |destroy | |
106109| |components | | |
107110+--------------------------------------+------------------------------+---------------------+--------------------------------+
108111| full_screen_toggle |handles logic |set_fullscreen | |
109112+--------------------------------------+------------------------------+---------------------+--------------------------------+
110- | resize |:arrow_right: |resize | |
113+ | resize | |resize | |
111114+--------------------------------------+------------------------------+---------------------+--------------------------------+
112- | key_press |key_press |:no_entry: | |
115+ | key_press |key_press | | |
113116+--------------------------------------+------------------------------+---------------------+--------------------------------+
114- | show_popup |show_poup |:no_entry: |Not used anywhere in mpl, and |
117+ | show_popup |show_poup | |Not used anywhere in mpl, and |
115118| | | |does nothing. |
116- | | | | |
117- | | | | |
118- | | | | |
119119+--------------------------------------+------------------------------+---------------------+--------------------------------+
120- | get_window_title |:arrow_right: |get_window_title | |
120+ | get_window_title | |get_window_title | |
121121+--------------------------------------+------------------------------+---------------------+--------------------------------+
122- | set_window_title |:arrow_right: |set_window_title | |
122+ | set_window_title | |set_window_title | |
123123+--------------------------------------+------------------------------+---------------------+--------------------------------+
124- | :no_entry: |_get_toolbar | |A common method to all |
124+ | |_get_toolbar | |A common method to all |
125125| | | |subclasses of FigureManagerBase |
126- | | | | |
127- | | | | |
128126+--------------------------------------+------------------------------+---------------------+--------------------------------+
129- | :no_entry: | :no_entry: |set_default_size | |
127+ | | |set_default_size | |
130128+--------------------------------------+------------------------------+---------------------+--------------------------------+
131- | :no_entry: | :no_entry: |add_element_to_window | |
129+ | | |add_element_to_window | |
132130+--------------------------------------+------------------------------+---------------------+--------------------------------+
133131
134132
@@ -137,14 +135,14 @@ The description of this MEP gives us most of the solution:
137135+==========+============+=============+
138136| mainloop |begin | |
139137+----------+------------+-------------+
140- | :no_entry: |end |Gets called |
138+ | |end |Gets called |
141139| | |automagically|
142140| | |when no more |
143141| | |instances of |
144142| | |the subclass |
145143| | |exist |
146144+----------+------------+-------------+
147- | __call__ |:no_entry: |Method moved |
145+ | __call__ | |Method moved |
148146| | |to |
149147| | |Gcf.show_all |
150148+----------+------------+-------------+
0 commit comments