| 149 | _toolbar2_class = NavigationToolbar2Mac |
| 150 | |
| 151 | def __init__(self, canvas, num): |
| 152 | self._shown = False |
| 153 | _macosx.FigureManager.__init__(self, canvas) |
| 154 | icon_path = str(cbook._get_data_path('images/matplotlib.pdf')) |
| 155 | _macosx.FigureManager.set_icon(icon_path) |
| 156 | FigureManagerBase.__init__(self, canvas, num) |
| 157 | self._set_window_mode(mpl.rcParams["macosx.window_mode"]) |
| 158 | if self.toolbar is not None: |
| 159 | self.toolbar.update() |
| 160 | if mpl.is_interactive(): |
| 161 | self.show() |
| 162 | self.canvas.draw_idle() |
| 163 | |
| 164 | def _close_button_pressed(self): |
| 165 | Gcf.destroy(self) |