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