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