Changeset 9e9e9a5 in sasview
- Timestamp:
- Jan 23, 2013 12:49:43 PM (12 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 1de85f4
- Parents:
- c080e542
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/local_perspectives/plotting/SimplePlot.py
rfad6056 r9e9e9a5 204 204 self.parent = parent 205 205 self._mgr = None 206 self.menu_bar = None 206 207 self._default_save_location = None 207 208 self.scale = scale 208 209 self.plotpanel = SimplePlotPanel(self, -1) 210 self._build_menubar() 211 212 def _build_menubar(self): 213 """ 214 Build menubar 215 """ 216 tsize = (13, 13) 217 save_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE_AS, wx.ART_TOOLBAR, 218 tsize) 219 quit_bmp = wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_TOOLBAR, 220 tsize) 221 print_bmp = wx.ArtProvider.GetBitmap(wx.ART_PRINT, wx.ART_TOOLBAR, 222 tsize) 223 preview_bmp = wx.ArtProvider.GetBitmap(wx.ART_REPORT_VIEW, wx.ART_TOOLBAR, 224 tsize) 225 copy_bmp = wx.ArtProvider.GetBitmap(wx.ART_COPY, wx.ART_TOOLBAR, 226 tsize) 227 menu_bar = wx.MenuBar() 228 229 menu = wx.Menu() 230 id = wx.NewId() 231 item = wx.MenuItem(menu, id, "&Save Image") 232 item.SetBitmap(save_bmp) 233 menu.AppendItem(item) 234 wx.EVT_MENU(self, id, self.on_save_file) 235 236 id = wx.NewId() 237 item = wx.MenuItem(menu, id, "&Print Image") 238 item.SetBitmap(print_bmp) 239 menu.AppendItem(item) 240 wx.EVT_MENU(self, id, self.on_print_image) 241 242 id = wx.NewId() 243 item = wx.MenuItem(menu, id, "&Print Preview") 244 item.SetBitmap(preview_bmp) 245 menu.AppendItem(item) 246 wx.EVT_MENU(self, id, self.on_print_preview) 247 248 menu.AppendSeparator() 249 id = wx.NewId() 250 item = wx.MenuItem(menu, id, "&Quit") 251 item.SetBitmap(quit_bmp) 252 menu.AppendItem(item) 253 254 menu_bar.Append(menu, "&File") 255 wx.EVT_MENU(self, id, self.on_close) 256 257 menu_edit = wx.Menu() 258 id = wx.NewId() 259 item = wx.MenuItem(menu_edit, id, "&Copy") 260 item.SetBitmap(copy_bmp) 261 menu_edit.AppendItem(item) 262 wx.EVT_MENU(self, id, self.on_copy_image) 263 264 menu_bar.Append(menu_edit, "&Edit") 265 self.menu_bar = menu_bar 266 self.SetMenuBar(self.menu_bar) 209 267 210 268 def set_plot_unfocus(self): … … 248 306 """ 249 307 #Not implemented 250 308 309 def on_save_file(self, event): 310 """ 311 Save image 312 """ 313 self.plotpanel.onSaveImage(event) 314 315 def on_print_image(self, event): 316 """ 317 Save image 318 """ 319 self.plotpanel.onPrint(event) 320 321 def on_print_preview(self, event): 322 """ 323 Save image 324 """ 325 self.plotpanel.onPrinterPreview(event) 326 327 def on_copy_image(self, event): 328 """ 329 Save image 330 """ 331 self.plotpanel.OnCopyFigureMenu(event) 332 251 333 def on_close(self, event): 252 334 """
Note: See TracChangeset
for help on using the changeset viewer.