Package gui :: Package spin_viewer :: Module splitter
[hide private]
[frames] | no frames]

Source Code for Module gui.spin_viewer.splitter

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2010-2013 Edward d'Auvergne                                   # 
 4  #                                                                             # 
 5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
 6  #                                                                             # 
 7  # This program is free software: you can redistribute it and/or modify        # 
 8  # it under the terms of the GNU General Public License as published by        # 
 9  # the Free Software Foundation, either version 3 of the License, or           # 
10  # (at your option) any later version.                                         # 
11  #                                                                             # 
12  # This program is distributed in the hope that it will be useful,             # 
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
15  # GNU General Public License for more details.                                # 
16  #                                                                             # 
17  # You should have received a copy of the GNU General Public License           # 
18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
19  #                                                                             # 
20  ############################################################################### 
21   
22  # Module docstring. 
23  """The splitter window element to hold the tree view and containers.""" 
24   
25   
26  # Python module imports. 
27  import wx 
28   
29  # relax module imports. 
30  from gui.spin_viewer.containers import Container 
31  from gui.spin_viewer.tree import Mol_res_spin_tree 
32   
33   
34 -class Tree_splitter(wx.SplitterWindow):
35 """This splits the view of the tree view and spin container.""" 36
37 - def __init__(self, gui, parent, id):
38 """Initialise the tree splitter window. 39 40 @param gui: The gui object. 41 @type gui: wx object 42 @param parent: The parent wx object. 43 @type parent: wx object 44 @param id: The ID number. 45 @type id: int 46 """ 47 48 # Execute the base class __init__() method. 49 wx.SplitterWindow.__init__(self, parent, id, style=wx.SP_LIVE_UPDATE) 50 51 # Add the tree view panel. 52 parent.tree_panel = Mol_res_spin_tree(gui, parent=self, id=-1) 53 54 # The container window. 55 parent.container = Container(gui, parent=self, id=-1) 56 57 # Make sure the panes cannot be hidden. 58 self.SetMinimumPaneSize(100) 59 60 # Split. 61 self.SplitVertically(parent.tree_panel, parent.container, 400)
62