def __init__(self, gui): """Set up the export window. @param gui: The GUI object. @type gui: wx.Frame instance """ # The window style. style = wx.DEFAULT_FRAME_STYLE if not status.debug and status.wx_info["os"] != 'darwin': style = style | wx.MAXIMIZE # Initialise the base class, setting the main GUI window as the parent. super(Export_bmrb_window, self).__init__(gui, -1, style=style) # Some default values. self.size = (1200, 900) self.size_min = (900, 700) self.border = 5 self.spacer = 10 self.button_size = (200, 40) self.button_spacing = 10 self.main_spacing = 20 # Set up the frame. sizer = self.setup_frame() # Add the header. self.add_header(sizer) # Top spacing. sizer.AddSpacer(10) # Add the data pipe selection element. self.add_pipe(sizer) # Spacing. sizer.AddSpacer(self.main_spacing) # Add the relaxation data metadata list GUI element. self.relax_data = Relax_data_meta_list(parent=self.main_panel, box=sizer, id='BMRB export', proportion=2) # Spacing. sizer.AddSpacer(self.main_spacing) # Add the molecule GUI element. self.molecule = Molecule(parent=self.main_panel, box=sizer, id='BMRB export', proportion=1) # Spacing. sizer.AddSpacer(self.main_spacing) # Create a horizontal layout for the software, script and citations GUI elements. sub_sizer = wx.BoxSizer(wx.HORIZONTAL) # Add the software GUI element. self.software = Software(parent=self.main_panel, box=sub_sizer, id='BMRB export', proportion=1) # Vertical spacing. sub_sizer.AddSpacer(self.main_spacing) # Add the scripts GUI element. self.scripts = Scripts(parent=self.main_panel, box=sub_sizer, id='BMRB export', proportion=1) # Vertical spacing. sub_sizer.AddSpacer(self.main_spacing) # Add the citation GUI element. self.citation = Citations(parent=self.main_panel, box=sub_sizer, id='BMRB export', proportion=1) # Add the sizer. sizer.Add(sub_sizer, 2, wx.ALL | wx.EXPAND, 0) # Bottom spacing. sizer.AddSpacer(10) # Add the buttons. self.add_buttons(sizer) # Open the window. if status.show_gui: self.Show()