1   
  2   
  3   
  4   
  5   
  6   
  7   
  8   
  9   
 10   
 11   
 12   
 13   
 14   
 15   
 16   
 17   
 18   
 19   
 20   
 21   
 22   
 23  """The relax related references window.""" 
 24   
 25   
 26  import webbrowser 
 27  import wx 
 28  import wx.html 
 29   
 30   
 31  from info import Info_box 
 32  from graphics import IMAGE_PATH 
 33  from gui.icons import relax_icons 
 34   
 35   
 36   
 37  HTML_HEADER = """\ 
 38  <?xml version="1.0" encoding="utf-8"?> 
 39  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
 40  <html xmlns="http://www.w3.org/1999/xhtml"> 
 41   
 42  <head> 
 43    <title>relax</title> 
 44    <meta name="AUTHOR" content="Edward d'Auvergne"/> 
 45    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> 
 46  </head> 
 47   
 48  <body bgcolor="#e5feff"> 
 49  """ 
 50   
 51   
 52  HTML_FOOTER = """\ 
 53  </body> 
 54  </html> 
 55  """ 
 56   
 57   
 59      """The references window.""" 
 60   
 62          """Build the window. 
 63   
 64          @param parent:  The parent wx object. 
 65          @type parent:   wx object 
 66          """ 
 67   
 68           
 69          super(References, self).__init__(parent, -1, "relax references", style=wx.DEFAULT_FRAME_STYLE) 
 70   
 71           
 72          self.SetIcons(relax_icons) 
 73   
 74           
 75          self.SetSize((800, 800)) 
 76   
 77           
 78          box = wx.BoxSizer(wx.VERTICAL) 
 79          self.SetSizer(box) 
 80   
 81           
 82          self.html = RefWindow(self, -1, size=(500, -1)) 
 83          box.Add(self.html, 1, wx.GROW) 
 84   
 85           
 86          self.Centre() 
 87   
 88           
 89          self.front_page() 
  90   
 91   
 92 -    def front_page(self): 
  93          """The main reference page.""" 
 94   
 95           
 96          info = Info_box() 
 97   
 98           
 99          text = HTML_HEADER 
100   
101           
102          text = text + "<center>" 
103          text = text + "<img src=%s%s></img>" % (IMAGE_PATH, 'ulysses_shadowless_400x168.png') 
104          text = text + "<h1>relax references</h1>" 
105          text = text + "</center>" 
106   
107           
108          text = text + "<h2>The program relax</h2>" 
109          text = text + "<p>%s</p>" % info.bib['dAuvergneGooley08a'].cite_html() 
110          text = text + "<p>%s</p>" % info.bib['dAuvergneGooley08b'].cite_html() 
111   
112           
113          text = text + "<h3><i>The relax GUI</i></h3>" 
114          text = text + "<p>%s</p>" % info.bib['Bieri11'].cite_html() 
115   
116           
117          text = text + "<h2>Model-free analysis</h2>" 
118          text = text + "<p>For a model-free analysis, all of the following should be cited!</p>" 
119          text = text + "<h3><i>Original Lipari-Szabo theory</i></h3>" 
120          text = text + "<p>%s</p>" % info.bib['LipariSzabo82a'].cite_html() 
121          text = text + "<p>%s</p>" % info.bib['LipariSzabo82b'].cite_html() 
122          text = text + "<h3><i>Extended model-free theory</i></h3>" 
123          text = text + "<p>%s</p>" % info.bib['Clore90'].cite_html() 
124          text = text + "<h3><i>Model-free model selection</i></h3>" 
125          text = text + "<p>%s</p>" % info.bib['dAuvergneGooley03'].cite_html() 
126          text = text + "<h3><i>Model-free model elimination</i></h3>" 
127          text = text + "<p>%s</p>" % info.bib['dAuvergneGooley06'].cite_html() 
128          text = text + "<h3><i>Model-free minimisation</i></h3>" 
129          text = text + "<p>%s</p>" % info.bib['dAuvergneGooley08a'].cite_html() 
130          text = text + "<h3><i>The new model-free analysis protocol</i></h3>" 
131          text = text + "<p>%s</p>" % info.bib['dAuvergneGooley07'].cite_html() 
132          text = text + "<p>%s</p>" % info.bib['dAuvergneGooley08b'].cite_html() 
133          text = text + "<h3><i>Comprehensive reference</i></h3>" 
134          text = text + "<p>This PhD thesis expands on all of the d'Auvergne and Gooley references and describes model-free analysis and the program relax in more detail:</p>" 
135          text = text + "<p>%s</p>" % info.bib['dAuvergne06'].cite_html() 
136   
137           
138          text = text + HTML_FOOTER 
139          self.html.SetPage(text) 
  140   
141   
142   
144      """New HTML window class to catch clicks on links and open in a browser.""" 
145   
147          """Redefine the link clicking behaviour.""" 
148   
149           
150          webbrowser.open(url.GetHref()) 
  151