source: sasview/prview/sansview.py @ feb21d8

ESS_GUIESS_GUI_DocsESS_GUI_batch_fittingESS_GUI_bumps_abstractionESS_GUI_iss1116ESS_GUI_iss879ESS_GUI_iss959ESS_GUI_openclESS_GUI_orderingESS_GUI_sync_sascalccostrafo411magnetic_scattrelease-4.1.1release-4.1.2release-4.2.2release_4.0.1ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249ticket885unittest-saveload
Last change on this file since feb21d8 was 2a92852, checked in by Mathieu Doucet <doucetm@…>, 16 years ago

Updated GUI for slit smearing

  • Property mode set to 100644
File size: 1.5 KB
Line 
1import wx
2#import gui_manager
3from sans.guiframe import gui_manager
4
5# For py2exe, import config here
6import local_config
7from perspectives.pr.pr import NewPrFileEvent
8
9class PrFrame(gui_manager.ViewerFrame):
10    def _on_open(self, event):
11        wx.PostEvent(self, NewPrFileEvent())
12
13class PrApp(gui_manager.ViewApp):
14    def OnInit(self):
15        #from gui_manager import ViewerFrame
16        self.frame = PrFrame(None, -1, local_config.__appname__, 
17                             window_height=650, window_width=750)   
18        self.frame.Show(True)
19
20        if hasattr(self.frame, 'special'):
21            print "Special?", self.frame.special.__class__.__name__
22            self.frame.special.SetCurrent()
23        self.SetTopWindow(self.frame)
24        return True
25   
26class SansView():
27   
28    def __init__(self):
29        """
30       
31        """
32        #from gui_manager import ViewApp
33        #self.gui = gui_manager.ViewApp(0)
34        self.gui = PrApp(0)
35       
36        # Add perspectives to the basic application
37        # Additional perspectives can still be loaded
38        # dynamically
39        import perspectives.pr as module
40        self.pr_plug = module.Plugin()
41        self.gui.add_perspective(self.pr_plug)
42           
43        # Build the GUI
44        self.gui.build_gui()
45       
46        # Set the application manager for the GUI
47        self.gui.set_manager(self)
48       
49        # Start the main loop
50        self.gui.MainLoop() 
51       
52
53if __name__ == "__main__": 
54    sansview = SansView()
Note: See TracBrowser for help on using the repository browser.