rdoc-f95 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/Manifest.txt +79 -0
- data/PostInstall.txt +7 -0
- data/README.rdoc +147 -0
- data/Rakefile +28 -0
- data/bin/rdoc-f95 +70 -0
- data/lib/rdoc-f95.rb +306 -0
- data/lib/rdoc-f95/code_objects.rb +776 -0
- data/lib/rdoc-f95/diagram.rb +342 -0
- data/lib/rdoc-f95/dot.rb +249 -0
- data/lib/rdoc-f95/generator.rb +1088 -0
- data/lib/rdoc-f95/generator/chm.rb +113 -0
- data/lib/rdoc-f95/generator/chm/chm.rb +98 -0
- data/lib/rdoc-f95/generator/html.rb +370 -0
- data/lib/rdoc-f95/generator/html/hefss.rb +414 -0
- data/lib/rdoc-f95/generator/html/html.rb +708 -0
- data/lib/rdoc-f95/generator/html/kilmer.rb +418 -0
- data/lib/rdoc-f95/generator/html/one_page_html.rb +121 -0
- data/lib/rdoc-f95/generator/ri.rb +229 -0
- data/lib/rdoc-f95/generator/xhtml.rb +106 -0
- data/lib/rdoc-f95/generator/xhtml/ctop.xsl +1318 -0
- data/lib/rdoc-f95/generator/xhtml/mathml.xsl +42 -0
- data/lib/rdoc-f95/generator/xhtml/pmathml.xsl +612 -0
- data/lib/rdoc-f95/generator/xhtml/pmathmlcss.xsl +872 -0
- data/lib/rdoc-f95/generator/xhtml/xhtml.rb +732 -0
- data/lib/rdoc-f95/generator/xml.rb +120 -0
- data/lib/rdoc-f95/generator/xml/rdf.rb +113 -0
- data/lib/rdoc-f95/generator/xml/xml.rb +111 -0
- data/lib/rdoc-f95/install.rb +166 -0
- data/lib/rdoc-f95/markup.rb +506 -0
- data/lib/rdoc-f95/markup/formatter.rb +14 -0
- data/lib/rdoc-f95/markup/fragments.rb +337 -0
- data/lib/rdoc-f95/markup/inline.rb +361 -0
- data/lib/rdoc-f95/markup/install.rb +57 -0
- data/lib/rdoc-f95/markup/lines.rb +152 -0
- data/lib/rdoc-f95/markup/mathml_wrapper.rb +91 -0
- data/lib/rdoc-f95/markup/preprocess.rb +71 -0
- data/lib/rdoc-f95/markup/sample/rdoc2latex.rb +16 -0
- data/lib/rdoc-f95/markup/sample/sample.rb +42 -0
- data/lib/rdoc-f95/markup/to_flow.rb +185 -0
- data/lib/rdoc-f95/markup/to_html.rb +357 -0
- data/lib/rdoc-f95/markup/to_html_crossref.rb +123 -0
- data/lib/rdoc-f95/markup/to_latex.rb +328 -0
- data/lib/rdoc-f95/markup/to_test.rb +50 -0
- data/lib/rdoc-f95/markup/to_xhtml_texparser.rb +234 -0
- data/lib/rdoc-f95/options.rb +745 -0
- data/lib/rdoc-f95/parsers/parse_c.rb +775 -0
- data/lib/rdoc-f95/parsers/parse_f95.rb +2499 -0
- data/lib/rdoc-f95/parsers/parse_rb.rb +2587 -0
- data/lib/rdoc-f95/parsers/parse_simple.rb +39 -0
- data/lib/rdoc-f95/parsers/parserfactory.rb +99 -0
- data/lib/rdoc-f95/ri.rb +2 -0
- data/lib/rdoc-f95/ri/cache.rb +188 -0
- data/lib/rdoc-f95/ri/descriptions.rb +147 -0
- data/lib/rdoc-f95/ri/display.rb +244 -0
- data/lib/rdoc-f95/ri/driver.rb +435 -0
- data/lib/rdoc-f95/ri/formatter.rb +603 -0
- data/lib/rdoc-f95/ri/paths.rb +105 -0
- data/lib/rdoc-f95/ri/reader.rb +106 -0
- data/lib/rdoc-f95/ri/util.rb +81 -0
- data/lib/rdoc-f95/ri/writer.rb +64 -0
- data/lib/rdoc-f95/stats.rb +23 -0
- data/lib/rdoc-f95/template.rb +64 -0
- data/lib/rdoc-f95/tokenstream.rb +33 -0
- data/lib/rdoc-f95/usage.rb +210 -0
- data/script/console +10 -0
- data/script/destroy +14 -0
- data/script/generate +14 -0
- data/test/test_helper.rb +3 -0
- data/test/test_rdoc-f95.rb +11 -0
- metadata +156 -0
@@ -0,0 +1,732 @@
|
|
1
|
+
require 'rdoc-f95/generator/xhtml'
|
2
|
+
require 'rdoc-f95/generator/html/one_page_html'
|
3
|
+
|
4
|
+
##
|
5
|
+
# = CSS2 RDoc XHTML template (for MathML)
|
6
|
+
#
|
7
|
+
# This is a template for RDoc that uses XHTML 1.0 Transitional and dictates a
|
8
|
+
# bit more of the appearance of the output to cascading stylesheets than the
|
9
|
+
# default. It was designed for clean inline code display, and uses DHTMl to
|
10
|
+
# toggle the visbility of each method's source with each click on the '[source]'
|
11
|
+
# link.
|
12
|
+
#
|
13
|
+
# This is a copy of html.rb. Then some headers that needed to
|
14
|
+
# represent MathML are added.
|
15
|
+
#
|
16
|
+
# == Authors
|
17
|
+
#
|
18
|
+
# * Yasuhiro MORIKAWA <morikawa@gfd-dennou.org>
|
19
|
+
#
|
20
|
+
# Copyright (c) 2008 GFD Dennou Club some rights reserved.
|
21
|
+
|
22
|
+
module RDocF95::Generator::XHTML::XHTML
|
23
|
+
|
24
|
+
FONTS = "Verdana,Arial,Helvetica,sans-serif"
|
25
|
+
|
26
|
+
STYLE = <<-EOF
|
27
|
+
body {
|
28
|
+
font-family: Verdana,Arial,Helvetica,sans-serif;
|
29
|
+
font-size: 90%;
|
30
|
+
margin: 0;
|
31
|
+
margin-left: 40px;
|
32
|
+
padding: 0;
|
33
|
+
background: white;
|
34
|
+
}
|
35
|
+
|
36
|
+
h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
|
37
|
+
/* h1 { font-size: 150%; } */
|
38
|
+
h2,h3,h4 { margin-top: 1em; }
|
39
|
+
|
40
|
+
a { background: #eef; color: #039; text-decoration: none; }
|
41
|
+
a:hover { background: #039; color: #eef; }
|
42
|
+
|
43
|
+
/* Override the base stylesheet's Anchor inside a table cell */
|
44
|
+
td > a {
|
45
|
+
background: transparent;
|
46
|
+
color: #039;
|
47
|
+
text-decoration: none;
|
48
|
+
}
|
49
|
+
|
50
|
+
/* and inside a section title */
|
51
|
+
.section-title > a {
|
52
|
+
background: transparent;
|
53
|
+
color: #eee;
|
54
|
+
text-decoration: none;
|
55
|
+
}
|
56
|
+
|
57
|
+
/* === Structural elements =================================== */
|
58
|
+
|
59
|
+
div#index {
|
60
|
+
margin: 0;
|
61
|
+
margin-left: -40px;
|
62
|
+
padding: 0;
|
63
|
+
font-size: 90%;
|
64
|
+
}
|
65
|
+
|
66
|
+
|
67
|
+
div#index a {
|
68
|
+
margin-left: 0.7em;
|
69
|
+
}
|
70
|
+
|
71
|
+
div#index .section-bar {
|
72
|
+
margin-left: 0px;
|
73
|
+
padding-left: 0.7em;
|
74
|
+
background: #ccc;
|
75
|
+
font-size: small;
|
76
|
+
}
|
77
|
+
|
78
|
+
|
79
|
+
div#classHeader, div#fileHeader {
|
80
|
+
width: auto;
|
81
|
+
color: white;
|
82
|
+
padding: 0.5em 1.5em 0.5em 1.5em;
|
83
|
+
margin: 0;
|
84
|
+
margin-left: -40px;
|
85
|
+
border-bottom: 3px solid #006;
|
86
|
+
}
|
87
|
+
|
88
|
+
div#classHeader a, div#fileHeader a {
|
89
|
+
background: inherit;
|
90
|
+
color: white;
|
91
|
+
}
|
92
|
+
|
93
|
+
div#classHeader td, div#fileHeader td {
|
94
|
+
background: inherit;
|
95
|
+
color: white;
|
96
|
+
}
|
97
|
+
|
98
|
+
|
99
|
+
div#fileHeader {
|
100
|
+
background: #057;
|
101
|
+
}
|
102
|
+
|
103
|
+
div#classHeader {
|
104
|
+
background: #048;
|
105
|
+
}
|
106
|
+
|
107
|
+
|
108
|
+
.class-name-in-header {
|
109
|
+
font-size: 180%;
|
110
|
+
font-weight: bold;
|
111
|
+
}
|
112
|
+
|
113
|
+
|
114
|
+
div#bodyContent {
|
115
|
+
padding: 0 1.5em 0 1.5em;
|
116
|
+
}
|
117
|
+
|
118
|
+
div#description {
|
119
|
+
padding: 0.5em 1.5em;
|
120
|
+
background: #efefef;
|
121
|
+
border: 1px dotted #999;
|
122
|
+
}
|
123
|
+
|
124
|
+
div#description h1,h2,h3,h4,h5,h6 {
|
125
|
+
color: #125;;
|
126
|
+
background: transparent;
|
127
|
+
}
|
128
|
+
|
129
|
+
div#validator-badges {
|
130
|
+
text-align: center;
|
131
|
+
}
|
132
|
+
div#validator-badges img { border: 0; }
|
133
|
+
|
134
|
+
div#copyright {
|
135
|
+
color: #333;
|
136
|
+
background: #efefef;
|
137
|
+
font: 0.75em sans-serif;
|
138
|
+
margin-top: 5em;
|
139
|
+
margin-bottom: 0;
|
140
|
+
padding: 0.5em 2em;
|
141
|
+
}
|
142
|
+
|
143
|
+
|
144
|
+
/* === Classes =================================== */
|
145
|
+
|
146
|
+
table.header-table {
|
147
|
+
color: white;
|
148
|
+
font-size: small;
|
149
|
+
}
|
150
|
+
|
151
|
+
.type-note {
|
152
|
+
font-size: small;
|
153
|
+
color: #DEDEDE;
|
154
|
+
}
|
155
|
+
|
156
|
+
.xxsection-bar {
|
157
|
+
background: #eee;
|
158
|
+
color: #333;
|
159
|
+
padding: 3px;
|
160
|
+
}
|
161
|
+
|
162
|
+
.section-bar {
|
163
|
+
color: #333;
|
164
|
+
border-bottom: 1px solid #999;
|
165
|
+
margin-left: -20px;
|
166
|
+
}
|
167
|
+
|
168
|
+
|
169
|
+
.section-title {
|
170
|
+
background: #79a;
|
171
|
+
color: #eee;
|
172
|
+
padding: 3px;
|
173
|
+
margin-top: 2em;
|
174
|
+
margin-left: -30px;
|
175
|
+
border: 1px solid #999;
|
176
|
+
}
|
177
|
+
|
178
|
+
.top-aligned-row { vertical-align: top }
|
179
|
+
.bottom-aligned-row { vertical-align: bottom }
|
180
|
+
|
181
|
+
/* --- Context section classes ----------------------- */
|
182
|
+
|
183
|
+
.context-row { }
|
184
|
+
.context-item-name { font-family: monospace; font-weight: bold; color: black; }
|
185
|
+
.context-item-value { font-size: small; color: #448; }
|
186
|
+
.context-item-desc { color: #333; padding-left: 2em; }
|
187
|
+
|
188
|
+
/* --- Method classes -------------------------- */
|
189
|
+
.method-detail {
|
190
|
+
background: #efefef;
|
191
|
+
padding: 0;
|
192
|
+
margin-top: 0.5em;
|
193
|
+
margin-bottom: 1em;
|
194
|
+
border: 1px dotted #ccc;
|
195
|
+
}
|
196
|
+
.method-heading {
|
197
|
+
color: black;
|
198
|
+
background: #ccc;
|
199
|
+
border-bottom: 1px solid #666;
|
200
|
+
padding: 0.2em 0.5em 0 0.5em;
|
201
|
+
}
|
202
|
+
.method-signature { color: black; background: inherit; }
|
203
|
+
.method-name { font-weight: bold; }
|
204
|
+
.method-args { font-style: italic; }
|
205
|
+
.method-description { padding: 0 0.5em 0 0.5em; }
|
206
|
+
|
207
|
+
/* --- Source code sections -------------------- */
|
208
|
+
|
209
|
+
a.source-toggle { font-size: 90%; }
|
210
|
+
div.method-source-code {
|
211
|
+
background: #262626;
|
212
|
+
color: #ffdead;
|
213
|
+
margin: 1em;
|
214
|
+
padding: 0.5em;
|
215
|
+
border: 1px dashed #999;
|
216
|
+
overflow: scroll;
|
217
|
+
}
|
218
|
+
|
219
|
+
div.method-source-code pre {
|
220
|
+
color: #ffdead;
|
221
|
+
overflow: visible;
|
222
|
+
}
|
223
|
+
|
224
|
+
|
225
|
+
/* --- Ruby keyword styles --------------------- */
|
226
|
+
|
227
|
+
.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
|
228
|
+
|
229
|
+
.ruby-constant { color: #7fffd4; background: transparent; }
|
230
|
+
.ruby-keyword { color: #00ffff; background: transparent; }
|
231
|
+
.ruby-ivar { color: #eedd82; background: transparent; }
|
232
|
+
.ruby-operator { color: #00ffee; background: transparent; }
|
233
|
+
.ruby-identifier { color: #ffdead; background: transparent; }
|
234
|
+
.ruby-node { color: #ffa07a; background: transparent; }
|
235
|
+
.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
|
236
|
+
.ruby-regexp { color: #ffa07a; background: transparent; }
|
237
|
+
.ruby-value { color: #7fffd4; background: transparent; }
|
238
|
+
|
239
|
+
/* --- MathML styles --------------------- */
|
240
|
+
|
241
|
+
math {
|
242
|
+
font-size: 150%;
|
243
|
+
}
|
244
|
+
EOF
|
245
|
+
|
246
|
+
|
247
|
+
#####################################################################
|
248
|
+
### H E A D E R T E M P L A T E
|
249
|
+
#####################################################################
|
250
|
+
|
251
|
+
#
|
252
|
+
#== Notation
|
253
|
+
#
|
254
|
+
# Following "<?xml-stylesheet ... ?>" line is a special setting for
|
255
|
+
# Internet Explorer.
|
256
|
+
# If you use Mozilla or Firefox, this line is needless.
|
257
|
+
# (Anyway, this line doesn't harm these browsers).
|
258
|
+
# Due to this line, if you use Safari (Mac OS X, standard browser),
|
259
|
+
# XHTML is not displayed correctly. (I think Safari can not handle
|
260
|
+
# xml-stylesheet correctly). If you use Safari, do not use --mathml
|
261
|
+
# option.
|
262
|
+
#
|
263
|
+
# Following URLs are references
|
264
|
+
#
|
265
|
+
# * http://www.kanzaki.com/docs/html/xhtml1.html#compatibility
|
266
|
+
# * http://past.openvista.jp/blog/documents/W3C/XHTML_FAQ/
|
267
|
+
#
|
268
|
+
|
269
|
+
XHTML_PREAMBLE = <<-EOF
|
270
|
+
<?xml version="1.0" encoding="<%= values["charset"] %>"?>
|
271
|
+
<?xml-stylesheet type="text/xsl" href="<%= values["mathml_xsl_url"] %>"?>
|
272
|
+
<!DOCTYPE html
|
273
|
+
PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
|
274
|
+
"http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
|
275
|
+
EOF
|
276
|
+
|
277
|
+
HEADER = XHTML_PREAMBLE + <<-EOF
|
278
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
279
|
+
<head>
|
280
|
+
<title><%= values["title"] %></title>
|
281
|
+
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
282
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
283
|
+
<link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
|
284
|
+
<style type="text/css">
|
285
|
+
<!-- Make codeblocks hidden by default -->
|
286
|
+
div.method-source-code { display: none }
|
287
|
+
</style>
|
288
|
+
<script type="text/javascript">
|
289
|
+
// <![CDATA[
|
290
|
+
|
291
|
+
function popupCode( url ) {
|
292
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
293
|
+
}
|
294
|
+
|
295
|
+
function toggleCode( id ) {
|
296
|
+
if ( document.getElementById )
|
297
|
+
elem = document.getElementById( id );
|
298
|
+
else if ( document.all )
|
299
|
+
elem = eval( "document.all." + id );
|
300
|
+
else
|
301
|
+
return false;
|
302
|
+
|
303
|
+
elemStyle = elem.style;
|
304
|
+
|
305
|
+
if ( elemStyle.display != "block" ) {
|
306
|
+
elemStyle.display = "block"
|
307
|
+
} else {
|
308
|
+
elemStyle.display = "none"
|
309
|
+
}
|
310
|
+
|
311
|
+
return true;
|
312
|
+
}
|
313
|
+
|
314
|
+
// ]]>
|
315
|
+
</script>
|
316
|
+
|
317
|
+
</head>
|
318
|
+
<body>
|
319
|
+
EOF
|
320
|
+
|
321
|
+
#####################################################################
|
322
|
+
### C O N T E X T C O N T E N T T E M P L A T E
|
323
|
+
#####################################################################
|
324
|
+
|
325
|
+
CONTEXT_CONTENT = %{
|
326
|
+
}
|
327
|
+
|
328
|
+
#####################################################################
|
329
|
+
### F O O T E R T E M P L A T E
|
330
|
+
#####################################################################
|
331
|
+
|
332
|
+
FOOTER = <<-EOF
|
333
|
+
<div id="validator-badges">
|
334
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
335
|
+
</div>
|
336
|
+
|
337
|
+
</body>
|
338
|
+
</html>
|
339
|
+
EOF
|
340
|
+
|
341
|
+
|
342
|
+
#####################################################################
|
343
|
+
### F I L E P A G E H E A D E R T E M P L A T E
|
344
|
+
#####################################################################
|
345
|
+
|
346
|
+
FILE_PAGE = <<-EOF
|
347
|
+
<div id="fileHeader">
|
348
|
+
<h1><%= values["short_name"] %></h1>
|
349
|
+
<table class="header-table">
|
350
|
+
<tr class="top-aligned-row">
|
351
|
+
<td><strong>Path:</strong></td>
|
352
|
+
<td><%= values["full_path"] %>
|
353
|
+
<% if values["cvsurl"] then %>
|
354
|
+
(<a href="<%= values["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
|
355
|
+
<% end %>
|
356
|
+
</td>
|
357
|
+
</tr>
|
358
|
+
<tr class="top-aligned-row">
|
359
|
+
<td><strong>Last Update:</strong></td>
|
360
|
+
<td><%= values["dtm_modified"] %></td>
|
361
|
+
</tr>
|
362
|
+
</table>
|
363
|
+
</div>
|
364
|
+
EOF
|
365
|
+
|
366
|
+
#####################################################################
|
367
|
+
### C L A S S P A G E H E A D E R T E M P L A T E
|
368
|
+
#####################################################################
|
369
|
+
|
370
|
+
CLASS_PAGE = <<-EOF
|
371
|
+
<div id="classHeader">
|
372
|
+
<table class="header-table">
|
373
|
+
<tr class="top-aligned-row">
|
374
|
+
<td><strong><%= values["classmod"] %></strong></td>
|
375
|
+
<td class="class-name-in-header"><%= values["full_name"] %></td>
|
376
|
+
</tr>
|
377
|
+
<tr class="top-aligned-row">
|
378
|
+
<td><strong>In:</strong></td>
|
379
|
+
<td>
|
380
|
+
<% values["infiles"].each do |infiles| %>
|
381
|
+
<% if infiles["full_path_url"] then %>
|
382
|
+
<a href="<%= infiles["full_path_url"] %>">
|
383
|
+
<% end %>
|
384
|
+
<%= infiles["full_path"] %>
|
385
|
+
<% if infiles["full_path_url"] then %>
|
386
|
+
</a>
|
387
|
+
<% end %>
|
388
|
+
<% if infiles["cvsurl"] then %>
|
389
|
+
(<a href="<%= infiles["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
|
390
|
+
<% end %>
|
391
|
+
<br />
|
392
|
+
<% end # values["infiles"] %>
|
393
|
+
</td>
|
394
|
+
</tr>
|
395
|
+
|
396
|
+
<% if values["parent"] then %>
|
397
|
+
<tr class="top-aligned-row">
|
398
|
+
<td><strong>Parent:</strong></td>
|
399
|
+
<td>
|
400
|
+
<% if values["par_url"] then %>
|
401
|
+
<a href="<%= values["par_url"] %>">
|
402
|
+
<% end %>
|
403
|
+
<%= values["parent"] %>
|
404
|
+
<% if values["par_url"] then %>
|
405
|
+
</a>
|
406
|
+
<% end %>
|
407
|
+
</td>
|
408
|
+
</tr>
|
409
|
+
<% end %>
|
410
|
+
</table>
|
411
|
+
</div>
|
412
|
+
EOF
|
413
|
+
|
414
|
+
#####################################################################
|
415
|
+
### M E T H O D L I S T T E M P L A T E
|
416
|
+
#####################################################################
|
417
|
+
|
418
|
+
METHOD_LIST = <<-EOF
|
419
|
+
|
420
|
+
<div id="contextContent">
|
421
|
+
<% if values["diagram"] then %>
|
422
|
+
<div id="diagram">
|
423
|
+
<%= values["diagram"] %>
|
424
|
+
</div>
|
425
|
+
<% end %>
|
426
|
+
|
427
|
+
<% if values["description"] then %>
|
428
|
+
<div id="description">
|
429
|
+
<%= values["description"] %>
|
430
|
+
</div>
|
431
|
+
<% end %>
|
432
|
+
|
433
|
+
<% if values["requires"] then %>
|
434
|
+
<div id="requires-list">
|
435
|
+
<h3 class="section-bar">Required files</h3>
|
436
|
+
|
437
|
+
<div class="name-list">
|
438
|
+
<% values["requires"].each do |requires| %>
|
439
|
+
<%= href requires["aref"], requires["name"] %>
|
440
|
+
<% end # values["requires"] %>
|
441
|
+
</div>
|
442
|
+
</div>
|
443
|
+
<% end %>
|
444
|
+
|
445
|
+
<% if values["toc"] then %>
|
446
|
+
<div id="contents-list">
|
447
|
+
<h3 class="section-bar">Contents</h3>
|
448
|
+
<ul>
|
449
|
+
<% values["toc"].each do |toc| %>
|
450
|
+
<li><a href="#<%= values["href"] %>"><%= values["secname"] %></a></li>
|
451
|
+
<% end # values["toc"] %>
|
452
|
+
</ul>
|
453
|
+
<% end %>
|
454
|
+
</div>
|
455
|
+
|
456
|
+
<% if values["methods"] then %>
|
457
|
+
<div id="method-list">
|
458
|
+
<h3 class="section-bar">Methods</h3>
|
459
|
+
|
460
|
+
<div class="name-list">
|
461
|
+
<% values["methods"].each do |methods| %>
|
462
|
+
<%= href methods["aref"], methods["name"] %>
|
463
|
+
<% end # values["methods"] %>
|
464
|
+
</div>
|
465
|
+
</div>
|
466
|
+
<% end %>
|
467
|
+
|
468
|
+
</div>
|
469
|
+
|
470
|
+
|
471
|
+
<!-- if includes -->
|
472
|
+
<% if values["includes"] then %>
|
473
|
+
<div id="includes">
|
474
|
+
<h3 class="section-bar">Included Modules</h3>
|
475
|
+
|
476
|
+
<div id="includes-list">
|
477
|
+
<% values["includes"].each do |includes| %>
|
478
|
+
<span class="include-name"><%= href includes["aref"], includes["name"] %></span>
|
479
|
+
<% end # values["includes"] %>
|
480
|
+
</div>
|
481
|
+
</div>
|
482
|
+
<% end %>
|
483
|
+
|
484
|
+
<% values["sections"].each do |sections| %>
|
485
|
+
<div id="section">
|
486
|
+
<% if sections["sectitle"] then %>
|
487
|
+
<h2 class="section-title"><a name="<%= sections["secsequence"] %>"><%= sections["sectitle"] %></a></h2>
|
488
|
+
<% if sections["seccomment"] then %>
|
489
|
+
<div class="section-comment">
|
490
|
+
<%= sections["seccomment"] %>
|
491
|
+
</div>
|
492
|
+
<% end %>
|
493
|
+
<% end %>
|
494
|
+
|
495
|
+
<% if values["classlist"] then %>
|
496
|
+
<div id="class-list">
|
497
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
498
|
+
|
499
|
+
<%= values["classlist"] %>
|
500
|
+
</div>
|
501
|
+
<% end %>
|
502
|
+
|
503
|
+
<% if values["constants"] then %>
|
504
|
+
<div id="constants-list">
|
505
|
+
<h3 class="section-bar">Constants</h3>
|
506
|
+
|
507
|
+
<div class="name-list">
|
508
|
+
<table summary="Constants">
|
509
|
+
<% values["constants"].each do |constants| %>
|
510
|
+
<tr class="top-aligned-row context-row">
|
511
|
+
<td class="context-item-name"><%= constants["name"] %></td>
|
512
|
+
<td>=</td>
|
513
|
+
<td class="context-item-value"><%= constants["value"] %></td>
|
514
|
+
<% if values["desc"] then %>
|
515
|
+
<td width="3em"> </td>
|
516
|
+
<td class="context-item-desc"><%= constants["desc"] %></td>
|
517
|
+
<% end %>
|
518
|
+
</tr>
|
519
|
+
<% end # values["constants"] %>
|
520
|
+
</table>
|
521
|
+
</div>
|
522
|
+
</div>
|
523
|
+
<% end %>
|
524
|
+
|
525
|
+
<% if values["aliases"] then %>
|
526
|
+
<div id="aliases-list">
|
527
|
+
<h3 class="section-bar">External Aliases</h3>
|
528
|
+
|
529
|
+
<div class="name-list">
|
530
|
+
<table summary="aliases">
|
531
|
+
<% values["aliases"].each do |aliases| $stderr.puts({ :aliases => aliases }.inspect) %>
|
532
|
+
<tr class="top-aligned-row context-row">
|
533
|
+
<td class="context-item-name"><%= values["old_name"] %></td>
|
534
|
+
<td>-></td>
|
535
|
+
<td class="context-item-value"><%= values["new_name"] %></td>
|
536
|
+
</tr>
|
537
|
+
<% if values["desc"] then %>
|
538
|
+
<tr class="top-aligned-row context-row">
|
539
|
+
<td> </td>
|
540
|
+
<td colspan="2" class="context-item-desc"><%= values["desc"] %></td>
|
541
|
+
</tr>
|
542
|
+
<% end %>
|
543
|
+
<% end # values["aliases"] %>
|
544
|
+
</table>
|
545
|
+
</div>
|
546
|
+
</div>
|
547
|
+
<% end %>
|
548
|
+
|
549
|
+
|
550
|
+
<% if values["attributes"] then %>
|
551
|
+
<div id="attribute-list">
|
552
|
+
<h3 class="section-bar">Attributes</h3>
|
553
|
+
|
554
|
+
<div class="name-list">
|
555
|
+
<table>
|
556
|
+
<% values["attributes"].each do |attributes| $stderr.puts({ :attributes => attributes }.inspect) %>
|
557
|
+
<tr class="top-aligned-row context-row">
|
558
|
+
<td class="context-item-name"><%= values["name"] %></td>
|
559
|
+
<% if values["rw"] then %>
|
560
|
+
<td class="context-item-value"> [<%= values["rw"] %>] </td>
|
561
|
+
<% end %>
|
562
|
+
<% unless values["rw"] then %>
|
563
|
+
<td class="context-item-value"> </td>
|
564
|
+
<% end %>
|
565
|
+
<td class="context-item-desc"><%= values["a_desc"] %></td>
|
566
|
+
</tr>
|
567
|
+
<% end # values["attributes"] %>
|
568
|
+
</table>
|
569
|
+
</div>
|
570
|
+
</div>
|
571
|
+
<% end %>
|
572
|
+
|
573
|
+
|
574
|
+
|
575
|
+
<!-- if method_list -->
|
576
|
+
<% if sections["method_list"] then %>
|
577
|
+
<div id="methods">
|
578
|
+
<% sections["method_list"].each do |method_list| %>
|
579
|
+
<% if method_list["methods"] then %>
|
580
|
+
<h3 class="section-bar"><%= method_list["type"] %> <%= method_list["category"] %> methods</h3>
|
581
|
+
|
582
|
+
<% method_list["methods"].each do |methods| %>
|
583
|
+
<div id="method-<%= methods["aref"] %>" class="method-detail">
|
584
|
+
<a name="<%= methods["aref"] %>"></a>
|
585
|
+
|
586
|
+
<div class="method-heading">
|
587
|
+
<% if methods["codeurl"] then %>
|
588
|
+
<a href="<%= methods["codeurl"] %>" target="Code" class="method-signature"
|
589
|
+
onclick="popupCode('<%= methods["codeurl"] %>');return false;">
|
590
|
+
<% end %>
|
591
|
+
<% if methods["sourcecode"] then %>
|
592
|
+
<a href="#<%= methods["aref"] %>" class="method-signature">
|
593
|
+
<% end %>
|
594
|
+
<% if methods["callseq"] then %>
|
595
|
+
<span class="method-name"><%= methods["callseq"] %></span>
|
596
|
+
<% end %>
|
597
|
+
<% unless methods["callseq"] then %>
|
598
|
+
<span class="method-name"><%= methods["name"] %></span><span class="method-args"><%= methods["params"] %></span>
|
599
|
+
<% end %>
|
600
|
+
<% if methods["codeurl"] then %>
|
601
|
+
</a>
|
602
|
+
<% end %>
|
603
|
+
<% if methods["sourcecode"] then %>
|
604
|
+
</a>
|
605
|
+
<% end %>
|
606
|
+
</div>
|
607
|
+
|
608
|
+
<div class="method-description">
|
609
|
+
<% if methods["m_desc"] then %>
|
610
|
+
<%= methods["m_desc"] %>
|
611
|
+
<% end %>
|
612
|
+
<% if methods["sourcecode"] then %>
|
613
|
+
<p><a class="source-toggle" href="#"
|
614
|
+
onclick="toggleCode('<%= methods["aref"] %>-source');return false;">[Source]</a></p>
|
615
|
+
<div class="method-source-code" id="<%= methods["aref"] %>-source">
|
616
|
+
<pre>
|
617
|
+
<%= methods["sourcecode"] %>
|
618
|
+
</pre>
|
619
|
+
</div>
|
620
|
+
<% end %>
|
621
|
+
</div>
|
622
|
+
</div>
|
623
|
+
|
624
|
+
<% end # method_list["methods"] %>
|
625
|
+
<% end %>
|
626
|
+
<% end # sections["method_list"] %>
|
627
|
+
|
628
|
+
</div>
|
629
|
+
<% end %>
|
630
|
+
<% end # values["sections"] %>
|
631
|
+
EOF
|
632
|
+
|
633
|
+
#####################################################################
|
634
|
+
### B O D Y T E M P L A T E
|
635
|
+
#####################################################################
|
636
|
+
|
637
|
+
BODY = HEADER + %{
|
638
|
+
|
639
|
+
<%= template_include %> <!-- banner header -->
|
640
|
+
|
641
|
+
<div id="bodyContent">
|
642
|
+
|
643
|
+
} + METHOD_LIST + %{
|
644
|
+
|
645
|
+
</div>
|
646
|
+
|
647
|
+
} + FOOTER
|
648
|
+
|
649
|
+
#####################################################################
|
650
|
+
### S O U R C E C O D E T E M P L A T E
|
651
|
+
#####################################################################
|
652
|
+
|
653
|
+
SRC_PAGE = XHTML_PREAMBLE + <<-EOF
|
654
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
655
|
+
<head>
|
656
|
+
<title><%= values["title"] %></title>
|
657
|
+
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
658
|
+
<link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
|
659
|
+
</head>
|
660
|
+
<body class="standalone-code">
|
661
|
+
<pre><%= values["code"] %></pre>
|
662
|
+
</body>
|
663
|
+
</html>
|
664
|
+
EOF
|
665
|
+
|
666
|
+
|
667
|
+
#####################################################################
|
668
|
+
### I N D E X F I L E T E M P L A T E S
|
669
|
+
#####################################################################
|
670
|
+
|
671
|
+
FR_INDEX_BODY = %{
|
672
|
+
<%= template_include %>
|
673
|
+
}
|
674
|
+
|
675
|
+
FILE_INDEX = XHTML_PREAMBLE + <<-EOF
|
676
|
+
<!--
|
677
|
+
|
678
|
+
<%= values["list_title"] %>
|
679
|
+
|
680
|
+
-->
|
681
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
682
|
+
<head>
|
683
|
+
<title><%= values["list_title"] %></title>
|
684
|
+
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
685
|
+
<link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" />
|
686
|
+
<base target="docwin" />
|
687
|
+
</head>
|
688
|
+
<body>
|
689
|
+
<div id="index">
|
690
|
+
<h1 class="section-bar"><%= values["list_title"] %></h1>
|
691
|
+
<div id="index-entries">
|
692
|
+
<% values["entries"].each do |entries| %>
|
693
|
+
<a href="<%= entries["href"] %>"><%= entries["name"] %></a><br />
|
694
|
+
<% end # values["entries"] %>
|
695
|
+
</div>
|
696
|
+
</div>
|
697
|
+
</body>
|
698
|
+
</html>
|
699
|
+
EOF
|
700
|
+
|
701
|
+
CLASS_INDEX = FILE_INDEX
|
702
|
+
METHOD_INDEX = FILE_INDEX
|
703
|
+
|
704
|
+
INDEX = <<-EOF
|
705
|
+
<?xml version="1.0" encoding="<%= values["charset"] %>"?>
|
706
|
+
<!DOCTYPE html
|
707
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
708
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
709
|
+
|
710
|
+
<!--
|
711
|
+
|
712
|
+
<%= values["title"] %>
|
713
|
+
|
714
|
+
-->
|
715
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
716
|
+
<head>
|
717
|
+
<title><%= values["title"] %></title>
|
718
|
+
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
719
|
+
</head>
|
720
|
+
<frameset rows="20%, 80%">
|
721
|
+
<frameset cols="25%,35%,45%">
|
722
|
+
<frame src="fr_file_index.html" title="Files" name="Files" />
|
723
|
+
<frame src="fr_class_index.html" name="Classes" />
|
724
|
+
<frame src="fr_method_index.html" name="Methods" />
|
725
|
+
</frameset>
|
726
|
+
<frame src="<%= values["initial_page"] %>" name="docwin" />
|
727
|
+
</frameset>
|
728
|
+
</html>
|
729
|
+
EOF
|
730
|
+
|
731
|
+
end
|
732
|
+
|