@@ -48,6 +48,7 @@ Two main places for generic code appear in the classes derived from
48
48
``FigureManagerBase `` and ``ShowBase ``.
49
49
50
50
1. ``FigureManagerBase `` has **three ** jobs at the moment:
51
+
51
52
1. The documentation describes it as a *``Helper class for pyplot
52
53
mode, wraps everything up into a neat bundle'' *
53
54
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
63
64
64
65
65
66
2. ``ShowBase `` has two jobs:
67
+
66
68
1. It has the job of going through all figure managers registered
67
69
in ``_pylab_helpers.Gcf `` and telling them to show themselves.
68
70
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:
89
91
3. Now that ``FigureManagerBase `` has no backend specifics in it, to
90
92
rename it to ``FigureManager ``, and move to a new file
91
93
``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 ``.
98
101
99
102
+--------------------------------------+------------------------------+---------------------+--------------------------------+
100
103
| FigureManagerBase(canvas, num) |FigureManager(figure, num) |``WindowBase(title)``|Notes |
101
104
| | | | |
102
105
+======================================+==============================+=====================+================================+
103
- | show |:arrow_right: |show | |
106
+ | show | |show | |
104
107
+--------------------------------------+------------------------------+---------------------+--------------------------------+
105
108
| destroy |calls destroy on all |destroy | |
106
109
| |components | | |
107
110
+--------------------------------------+------------------------------+---------------------+--------------------------------+
108
111
| full_screen_toggle |handles logic |set_fullscreen | |
109
112
+--------------------------------------+------------------------------+---------------------+--------------------------------+
110
- | resize |:arrow_right: |resize | |
113
+ | resize | |resize | |
111
114
+--------------------------------------+------------------------------+---------------------+--------------------------------+
112
- | key_press |key_press |:no_entry: | |
115
+ | key_press |key_press | | |
113
116
+--------------------------------------+------------------------------+---------------------+--------------------------------+
114
- | show_popup |show_poup |:no_entry: |Not used anywhere in mpl, and |
117
+ | show_popup |show_poup | |Not used anywhere in mpl, and |
115
118
| | | |does nothing. |
116
- | | | | |
117
- | | | | |
118
- | | | | |
119
119
+--------------------------------------+------------------------------+---------------------+--------------------------------+
120
- | get_window_title |:arrow_right: |get_window_title | |
120
+ | get_window_title | |get_window_title | |
121
121
+--------------------------------------+------------------------------+---------------------+--------------------------------+
122
- | set_window_title |:arrow_right: |set_window_title | |
122
+ | set_window_title | |set_window_title | |
123
123
+--------------------------------------+------------------------------+---------------------+--------------------------------+
124
- | :no_entry: |_get_toolbar | |A common method to all |
124
+ | |_get_toolbar | |A common method to all |
125
125
| | | |subclasses of FigureManagerBase |
126
- | | | | |
127
- | | | | |
128
126
+--------------------------------------+------------------------------+---------------------+--------------------------------+
129
- | :no_entry: | :no_entry: |set_default_size | |
127
+ | | |set_default_size | |
130
128
+--------------------------------------+------------------------------+---------------------+--------------------------------+
131
- | :no_entry: | :no_entry: |add_element_to_window | |
129
+ | | |add_element_to_window | |
132
130
+--------------------------------------+------------------------------+---------------------+--------------------------------+
133
131
134
132
@@ -137,14 +135,14 @@ The description of this MEP gives us most of the solution:
137
135
+==========+============+=============+
138
136
| mainloop |begin | |
139
137
+----------+------------+-------------+
140
- | :no_entry: |end |Gets called |
138
+ | |end |Gets called |
141
139
| | |automagically|
142
140
| | |when no more |
143
141
| | |instances of |
144
142
| | |the subclass |
145
143
| | |exist |
146
144
+----------+------------+-------------+
147
- | __call__ |:no_entry: |Method moved |
145
+ | __call__ | |Method moved |
148
146
| | |to |
149
147
| | |Gcf.show_all |
150
148
+----------+------------+-------------+
0 commit comments