Changeset 4753fc2 in sasview
- Timestamp:
- Feb 2, 2011 2:43:57 PM (14 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:
- 52725d6
- Parents:
- 2096e78
- Location:
- guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/dummyapp.py
rd955bf19 r4753fc2 4 4 """ 5 5 import gui_manager 6 from sans.guiframe.gui_style import GUIFRAME 7 from sans.guiframe.plugin_base import PluginBase 6 8 7 class TestPlugin(gui_manager.Plugin): 9 class DummyView(gui_manager.ViewApp): 10 """ 11 """ 12 PROG_SPLASH_PATH = None 13 STYLE = GUIFRAME.SINGLE_APPLICATION 8 14 9 def populate_menu(self, id, parent): 15 class TestPlugin(PluginBase): 16 17 def populate_menu(self, parent): 10 18 """ 11 19 Create and return the list of application menu 12 20 items for the plug-in. 13 14 :param id: deprecated. Un-used.15 21 :param parent: parent window 16 22 … … 32 38 33 39 # Returns the menu and a name for it. 34 return [( id,plug_menu, "DummyApp")]40 return [(plug_menu, "DummyApp")] 35 41 36 42 def get_panels(self, parent): … … 103 109 Initialization 104 110 """ 105 self.gui = gui_manager.ViewApp(0)111 self.gui = DummyView(0) 106 112 107 113 fitting_plug = TestPlugin() -
guiframe/gui_manager.py
r3385795 r4753fc2 53 53 GUIFRAME_WIDTH = 1000 54 54 GUIFRAME_HEIGHT = 800 55 PROG_SPLASH_SCREEN = "images/danse_logo.png" 55 56 56 57 class ViewerFrame(wx.Frame): … … 60 61 61 62 def __init__(self, parent, title, 62 size=(GUIFRAME_WIDTH, GUIFRAME_HEIGHT),63 size=(GUIFRAME_WIDTH, GUIFRAME_HEIGHT), 63 64 gui_style=GUIFRAME.DEFAULT_STYLE, 64 65 pos=wx.DefaultPosition): … … 581 582 for (menu, name) in self._plotting_plugin.populate_menu(self): 582 583 self._window_menu.AppendSubMenu(menu, name) 583 self._window_menu.AppendSeparator()584 584 self._menubar.Append(self._window_menu, '&Window') 585 585 … … 590 590 wx.EVT_MENU(self, id, self.show_data_panel) 591 591 592 id = wx.NewId() 593 preferences_menu = wx.Menu() 594 hint = "Plot panels will floating" 595 preferences_menu.Append(id, '&Floating Plot Panel', hint) 596 wx.EVT_MENU(self, id, self.set_plotpanel_floating) 597 id = wx.NewId() 598 hint = "Plot panels will displayed within the frame" 599 preferences_menu.Append(id, '&Fixed Plot Panel', hint) 600 wx.EVT_MENU(self, id, self.set_plotpanel_fixed) 601 id = wx.NewId() 602 self._window_menu.AppendSubMenu(preferences_menu,'&Preferences') 592 style = self.__gui_style & GUIFRAME.PLOTTING_ON 593 if style == GUIFRAME.PLOTTING_ON: 594 self._window_menu.AppendSeparator() 595 id = wx.NewId() 596 preferences_menu = wx.Menu() 597 hint = "Plot panels will floating" 598 preferences_menu.Append(id, '&Floating Plot Panel', hint) 599 wx.EVT_MENU(self, id, self.set_plotpanel_floating) 600 id = wx.NewId() 601 hint = "Plot panels will displayed within the frame" 602 preferences_menu.Append(id, '&Fixed Plot Panel', hint) 603 wx.EVT_MENU(self, id, self.set_plotpanel_fixed) 604 id = wx.NewId() 605 self._window_menu.AppendSubMenu(preferences_menu,'&Preferences') 603 606 #wx.EVT_MENU(self, id, self.show_preferences_panel) 604 607 """ … … 670 673 wx.EVT_MENU(self, data_file_id, self._load_data) 671 674 style = self.__gui_style & GUIFRAME.MULTIPLE_APPLICATIONS 672 style1 = self.__gui_style & GUIFRAME. SINGLE_APPLICATION675 style1 = self.__gui_style & GUIFRAME.DATALOADER_ON 673 676 if style == GUIFRAME.MULTIPLE_APPLICATIONS: 674 677 #menu for data from folder … … 679 682 wx.EVT_MENU(self, data_folder_id, self._load_folder) 680 683 self._menubar.Append(self._data_menu, '&Data') 681 elif style1 == GUIFRAME. SINGLE_APPLICATION:684 elif style1 == GUIFRAME.DATALOADER_ON: 682 685 self._menubar.Append(self._data_menu, '&Data') 683 686 … … 1236 1239 CENTER_PANE = True 1237 1240 1238 PROG_SPLASH_SCREEN = "images/danse_logo.png" 1241 1239 1242 # Toy application to test this Frame 1240 1243 class ViewApp(wx.App):
Note: See TracChangeset
for help on using the changeset viewer.