rdoc 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rdoc might be problematic. Click here for more details.
- data.tar.gz.sig +1 -0
- data/History.txt +30 -0
- data/Manifest.txt +18 -6
- data/Rakefile +52 -0
- data/lib/rdoc.rb +69 -69
- data/lib/rdoc/code_objects.rb +331 -112
- data/lib/rdoc/generator.rb +172 -144
- data/lib/rdoc/generator/html.rb +45 -18
- data/lib/rdoc/generator/html/frameless.rb +795 -0
- data/lib/rdoc/generator/html/hefss.rb +11 -11
- data/lib/rdoc/generator/html/html.rb +81 -87
- data/lib/rdoc/generator/html/kilmer.rb +10 -10
- data/lib/rdoc/generator/html/one_page_html.rb +9 -9
- data/lib/rdoc/generator/ri.rb +5 -8
- data/lib/rdoc/generator/texinfo.rb +84 -0
- data/lib/rdoc/generator/texinfo/class.texinfo.erb +44 -0
- data/lib/rdoc/generator/texinfo/file.texinfo.erb +6 -0
- data/lib/rdoc/generator/texinfo/method.texinfo.erb +6 -0
- data/lib/rdoc/generator/texinfo/texinfo.erb +28 -0
- data/lib/rdoc/known_classes.rb +69 -0
- data/lib/rdoc/markup.rb +3 -3
- data/lib/rdoc/markup/attribute_manager.rb +0 -9
- data/lib/rdoc/markup/fragments.rb +1 -1
- data/lib/rdoc/markup/preprocess.rb +10 -6
- data/lib/rdoc/markup/to_html.rb +55 -8
- data/lib/rdoc/markup/to_html_crossref.rb +21 -5
- data/lib/rdoc/markup/to_texinfo.rb +69 -0
- data/lib/rdoc/options.rb +37 -14
- data/lib/rdoc/parser.rb +109 -0
- data/lib/rdoc/parser/c.rb +656 -0
- data/lib/rdoc/parser/f95.rb +1835 -0
- data/lib/rdoc/{parsers/parse_rb.rb → parser/ruby.rb} +1436 -1191
- data/lib/rdoc/parser/simple.rb +38 -0
- data/lib/rdoc/rdoc.rb +48 -32
- data/lib/rdoc/ri.rb +5 -1
- data/lib/rdoc/ri/descriptions.rb +8 -5
- data/lib/rdoc/ri/driver.rb +148 -49
- data/lib/rdoc/stats.rb +94 -4
- data/test/test_rdoc_info_formatting.rb +175 -0
- data/test/test_rdoc_info_sections.rb +136 -0
- data/test/test_rdoc_markup_to_html.rb +30 -0
- data/test/test_rdoc_markup_to_html_crossref.rb +18 -0
- data/test/{test_rdoc_c_parser.rb → test_rdoc_parser_c.rb} +8 -11
- data/test/test_rdoc_parser_ruby.rb +539 -0
- data/test/test_rdoc_ri_default_display.rb +17 -16
- data/test/test_rdoc_ri_driver.rb +92 -0
- metadata +54 -12
- metadata.gz.sig +0 -0
- data/lib/rdoc/parsers/parse_c.rb +0 -775
- data/lib/rdoc/parsers/parse_f95.rb +0 -1841
- data/lib/rdoc/parsers/parse_simple.rb +0 -40
- data/lib/rdoc/parsers/parserfactory.rb +0 -99
data/lib/rdoc/generator/html.rb
CHANGED
@@ -82,7 +82,7 @@ class RDoc::Generator::HTML
|
|
82
82
|
@classes = []
|
83
83
|
|
84
84
|
write_style_sheet
|
85
|
-
gen_sub_directories
|
85
|
+
gen_sub_directories
|
86
86
|
build_indices
|
87
87
|
generate_html
|
88
88
|
end
|
@@ -157,6 +157,7 @@ class RDoc::Generator::HTML
|
|
157
157
|
# the individual descriptions for files and classes
|
158
158
|
gen_into(@files)
|
159
159
|
gen_into(@classes)
|
160
|
+
|
160
161
|
# and the index files
|
161
162
|
gen_file_index
|
162
163
|
gen_class_index
|
@@ -168,14 +169,21 @@ class RDoc::Generator::HTML
|
|
168
169
|
end
|
169
170
|
|
170
171
|
def gen_into(list)
|
172
|
+
@file_list ||= index_to_links @files
|
173
|
+
@class_list ||= index_to_links @classes
|
174
|
+
@method_list ||= index_to_links RDoc::Generator::Method.all_methods
|
175
|
+
|
171
176
|
list.each do |item|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
177
|
+
next unless item.document_self
|
178
|
+
|
179
|
+
op_file = item.path
|
180
|
+
|
181
|
+
FileUtils.mkdir_p File.dirname(op_file)
|
182
|
+
|
183
|
+
open op_file, 'w' do |io|
|
184
|
+
item.write_on io, @file_list, @class_list, @method_list
|
176
185
|
end
|
177
186
|
end
|
178
|
-
|
179
187
|
end
|
180
188
|
|
181
189
|
def gen_file_index
|
@@ -221,9 +229,23 @@ class RDoc::Generator::HTML
|
|
221
229
|
# line.
|
222
230
|
|
223
231
|
def gen_main_index
|
224
|
-
template
|
232
|
+
if @template.const_defined? :FRAMELESS then
|
233
|
+
main = @files.find do |file|
|
234
|
+
@main_page == file.name
|
235
|
+
end
|
236
|
+
|
237
|
+
if main.nil? then
|
238
|
+
main = @classes.find do |klass|
|
239
|
+
main_page == klass.context.full_name
|
240
|
+
end
|
241
|
+
end
|
242
|
+
else
|
243
|
+
main = RDoc::TemplatePage.new @template::INDEX
|
244
|
+
end
|
225
245
|
|
226
246
|
open 'index.html', 'w' do |f|
|
247
|
+
style_url = style_url '', @options.css
|
248
|
+
|
227
249
|
classes = @classes.sort.map { |klass| klass.value_hash }
|
228
250
|
|
229
251
|
values = {
|
@@ -237,18 +259,31 @@ class RDoc::Generator::HTML
|
|
237
259
|
|
238
260
|
values['inline_source'] = @options.inline_source
|
239
261
|
|
240
|
-
|
262
|
+
if main.respond_to? :write_on then
|
263
|
+
main.write_on f, @file_list, @class_list, @method_list, values
|
264
|
+
else
|
265
|
+
main.write_html_on f, values
|
266
|
+
end
|
241
267
|
end
|
242
268
|
end
|
243
269
|
|
270
|
+
def index_to_links(collection)
|
271
|
+
collection.sort.map do |f|
|
272
|
+
next unless f.document_self
|
273
|
+
{ "href" => f.path, "name" => f.index_name }
|
274
|
+
end.compact
|
275
|
+
end
|
276
|
+
|
244
277
|
##
|
245
278
|
# Returns the url of the main page
|
246
279
|
|
247
280
|
def main_url
|
248
281
|
@main_page = @options.main_page
|
249
282
|
@main_page_ref = nil
|
250
|
-
|
283
|
+
|
284
|
+
if @main_page then
|
251
285
|
@main_page_ref = RDoc::Generator::AllReferences[@main_page]
|
286
|
+
|
252
287
|
if @main_page_ref then
|
253
288
|
@main_page_path = @main_page_ref.path
|
254
289
|
else
|
@@ -351,15 +386,8 @@ class RDoc::Generator::HTMLInOne < RDoc::Generator::HTML
|
|
351
386
|
end
|
352
387
|
|
353
388
|
def gen_an_index(collection, title)
|
354
|
-
res = []
|
355
|
-
collection.sort.each do |f|
|
356
|
-
if f.document_self
|
357
|
-
res << { "href" => f.path, "name" => f.index_name }
|
358
|
-
end
|
359
|
-
end
|
360
|
-
|
361
389
|
return {
|
362
|
-
"entries" =>
|
390
|
+
"entries" => index_to_links(collection),
|
363
391
|
'list_title' => title,
|
364
392
|
'index_url' => main_url,
|
365
393
|
}
|
@@ -367,4 +395,3 @@ class RDoc::Generator::HTMLInOne < RDoc::Generator::HTML
|
|
367
395
|
|
368
396
|
end
|
369
397
|
|
370
|
-
|
@@ -0,0 +1,795 @@
|
|
1
|
+
require 'rdoc/generator/html'
|
2
|
+
require 'rdoc/generator/html/one_page_html'
|
3
|
+
|
4
|
+
##
|
5
|
+
# = CSS2 RDoc HTML template
|
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
|
+
# == Authors
|
14
|
+
#
|
15
|
+
# * Michael Granger <ged@FaerieMUD.org>
|
16
|
+
#
|
17
|
+
# Copyright (c) 2002, 2003 The FaerieMUD Consortium. Some rights reserved.
|
18
|
+
#
|
19
|
+
# This work is licensed under the Creative Commons Attribution License. To view
|
20
|
+
# a copy of this license, visit http://creativecommons.org/licenses/by/1.0/ or
|
21
|
+
# send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
|
22
|
+
# 94305, USA.
|
23
|
+
|
24
|
+
module RDoc::Generator::HTML::FRAMELESS
|
25
|
+
|
26
|
+
FRAMELESS = true
|
27
|
+
|
28
|
+
FONTS = "Verdana,Arial,Helvetica,sans-serif"
|
29
|
+
|
30
|
+
STYLE = <<-EOF
|
31
|
+
body {
|
32
|
+
font-family: #{FONTS};
|
33
|
+
font-size: 90%;
|
34
|
+
margin: 0;
|
35
|
+
margin-left: 40px;
|
36
|
+
padding: 0;
|
37
|
+
background: white;
|
38
|
+
}
|
39
|
+
|
40
|
+
h1, h2, h3, h4 {
|
41
|
+
margin: 0;
|
42
|
+
color: #efefef;
|
43
|
+
background: transparent;
|
44
|
+
}
|
45
|
+
|
46
|
+
h1 {
|
47
|
+
font-size: 150%;
|
48
|
+
}
|
49
|
+
|
50
|
+
h2,h3,h4 {
|
51
|
+
margin-top: 1em;
|
52
|
+
}
|
53
|
+
|
54
|
+
:link, :visited {
|
55
|
+
background: #eef;
|
56
|
+
color: #039;
|
57
|
+
text-decoration: none;
|
58
|
+
}
|
59
|
+
|
60
|
+
:link:hover, :visited:hover {
|
61
|
+
background: #039;
|
62
|
+
color: #eef;
|
63
|
+
}
|
64
|
+
|
65
|
+
/* Override the base stylesheet's Anchor inside a table cell */
|
66
|
+
td > :link, td > :visited {
|
67
|
+
background: transparent;
|
68
|
+
color: #039;
|
69
|
+
text-decoration: none;
|
70
|
+
}
|
71
|
+
|
72
|
+
/* and inside a section title */
|
73
|
+
.section-title > :link, .section-title > :visited {
|
74
|
+
background: transparent;
|
75
|
+
color: #eee;
|
76
|
+
text-decoration: none;
|
77
|
+
}
|
78
|
+
|
79
|
+
/* === Structural elements =================================== */
|
80
|
+
|
81
|
+
.index {
|
82
|
+
margin: 0;
|
83
|
+
margin-left: -40px;
|
84
|
+
padding: 0;
|
85
|
+
font-size: 90%;
|
86
|
+
}
|
87
|
+
|
88
|
+
.index :link, .index :visited {
|
89
|
+
margin-left: 0.7em;
|
90
|
+
}
|
91
|
+
|
92
|
+
.index .section-bar {
|
93
|
+
margin-left: 0px;
|
94
|
+
padding-left: 0.7em;
|
95
|
+
background: #ccc;
|
96
|
+
font-size: small;
|
97
|
+
}
|
98
|
+
|
99
|
+
#classHeader, #fileHeader {
|
100
|
+
width: auto;
|
101
|
+
color: white;
|
102
|
+
padding: 0.5em 1.5em 0.5em 1.5em;
|
103
|
+
margin: 0;
|
104
|
+
margin-left: -40px;
|
105
|
+
border-bottom: 3px solid #006;
|
106
|
+
}
|
107
|
+
|
108
|
+
#classHeader :link, #fileHeader :link,
|
109
|
+
#classHeader :visited, #fileHeader :visited {
|
110
|
+
background: inherit;
|
111
|
+
color: white;
|
112
|
+
}
|
113
|
+
|
114
|
+
#classHeader td, #fileHeader td {
|
115
|
+
background: inherit;
|
116
|
+
color: white;
|
117
|
+
}
|
118
|
+
|
119
|
+
#fileHeader {
|
120
|
+
background: #057;
|
121
|
+
}
|
122
|
+
|
123
|
+
#classHeader {
|
124
|
+
background: #048;
|
125
|
+
}
|
126
|
+
|
127
|
+
.class-name-in-header {
|
128
|
+
font-size: 180%;
|
129
|
+
font-weight: bold;
|
130
|
+
}
|
131
|
+
|
132
|
+
#bodyContent {
|
133
|
+
padding: 0 1.5em 0 1.5em;
|
134
|
+
}
|
135
|
+
|
136
|
+
#description {
|
137
|
+
padding: 0.5em 1.5em;
|
138
|
+
background: #efefef;
|
139
|
+
border: 1px dotted #999;
|
140
|
+
}
|
141
|
+
|
142
|
+
#description h1, #description h2, #description h3,
|
143
|
+
#description h4, #description h5, #description h6 {
|
144
|
+
color: #125;
|
145
|
+
background: transparent;
|
146
|
+
}
|
147
|
+
|
148
|
+
#copyright {
|
149
|
+
color: #333;
|
150
|
+
background: #efefef;
|
151
|
+
font: 0.75em sans-serif;
|
152
|
+
margin-top: 5em;
|
153
|
+
margin-bottom: 0;
|
154
|
+
padding: 0.5em 2em;
|
155
|
+
}
|
156
|
+
|
157
|
+
/* === Classes =================================== */
|
158
|
+
|
159
|
+
table.header-table {
|
160
|
+
color: white;
|
161
|
+
font-size: small;
|
162
|
+
}
|
163
|
+
|
164
|
+
.type-note {
|
165
|
+
font-size: small;
|
166
|
+
color: #dedede;
|
167
|
+
}
|
168
|
+
|
169
|
+
.xxsection-bar {
|
170
|
+
background: #eee;
|
171
|
+
color: #333;
|
172
|
+
padding: 3px;
|
173
|
+
}
|
174
|
+
|
175
|
+
.section-bar {
|
176
|
+
color: #333;
|
177
|
+
border-bottom: 1px solid #999;
|
178
|
+
margin-left: -20px;
|
179
|
+
}
|
180
|
+
|
181
|
+
.section-title {
|
182
|
+
background: #79a;
|
183
|
+
color: #eee;
|
184
|
+
padding: 3px;
|
185
|
+
margin-top: 2em;
|
186
|
+
margin-left: -30px;
|
187
|
+
border: 1px solid #999;
|
188
|
+
}
|
189
|
+
|
190
|
+
.top-aligned-row {
|
191
|
+
vertical-align: top
|
192
|
+
}
|
193
|
+
|
194
|
+
.bottom-aligned-row {
|
195
|
+
vertical-align: bottom
|
196
|
+
}
|
197
|
+
|
198
|
+
/* --- Context section classes ----------------------- */
|
199
|
+
|
200
|
+
.context-row { }
|
201
|
+
|
202
|
+
.context-item-name {
|
203
|
+
font-family: monospace;
|
204
|
+
font-weight: bold;
|
205
|
+
color: black;
|
206
|
+
}
|
207
|
+
|
208
|
+
.context-item-value {
|
209
|
+
font-size: small;
|
210
|
+
color: #448;
|
211
|
+
}
|
212
|
+
|
213
|
+
.context-item-desc {
|
214
|
+
color: #333;
|
215
|
+
padding-left: 2em;
|
216
|
+
}
|
217
|
+
|
218
|
+
/* --- Method classes -------------------------- */
|
219
|
+
|
220
|
+
.method-detail {
|
221
|
+
background: #efefef;
|
222
|
+
padding: 0;
|
223
|
+
margin-top: 0.5em;
|
224
|
+
margin-bottom: 1em;
|
225
|
+
border: 1px dotted #ccc;
|
226
|
+
}
|
227
|
+
|
228
|
+
.method-heading {
|
229
|
+
color: black;
|
230
|
+
background: #ccc;
|
231
|
+
border-bottom: 1px solid #666;
|
232
|
+
padding: 0.2em 0.5em 0 0.5em;
|
233
|
+
}
|
234
|
+
|
235
|
+
.method-signature {
|
236
|
+
color: black;
|
237
|
+
background: inherit;
|
238
|
+
}
|
239
|
+
|
240
|
+
.method-name {
|
241
|
+
font-weight: bold;
|
242
|
+
}
|
243
|
+
|
244
|
+
.method-args {
|
245
|
+
font-style: italic;
|
246
|
+
}
|
247
|
+
|
248
|
+
.method-description {
|
249
|
+
padding: 0 0.5em 0 0.5em;
|
250
|
+
}
|
251
|
+
|
252
|
+
/* --- Source code sections -------------------- */
|
253
|
+
|
254
|
+
:link.source-toggle, :visited.source-toggle {
|
255
|
+
font-size: 90%;
|
256
|
+
}
|
257
|
+
|
258
|
+
div.method-source-code {
|
259
|
+
background: #262626;
|
260
|
+
color: #ffdead;
|
261
|
+
margin: 1em;
|
262
|
+
padding: 0.5em;
|
263
|
+
border: 1px dashed #999;
|
264
|
+
overflow: hidden;
|
265
|
+
}
|
266
|
+
|
267
|
+
div.method-source-code pre {
|
268
|
+
color: #ffdead;
|
269
|
+
overflow: hidden;
|
270
|
+
}
|
271
|
+
|
272
|
+
/* --- Ruby keyword styles --------------------- */
|
273
|
+
|
274
|
+
.standalone-code {
|
275
|
+
background: #221111;
|
276
|
+
color: #ffdead;
|
277
|
+
overflow: hidden;
|
278
|
+
}
|
279
|
+
|
280
|
+
.ruby-constant {
|
281
|
+
color: #7fffd4;
|
282
|
+
background: transparent;
|
283
|
+
}
|
284
|
+
|
285
|
+
.ruby-keyword {
|
286
|
+
color: #00ffff;
|
287
|
+
background: transparent;
|
288
|
+
}
|
289
|
+
|
290
|
+
.ruby-ivar {
|
291
|
+
color: #eedd82;
|
292
|
+
background: transparent;
|
293
|
+
}
|
294
|
+
|
295
|
+
.ruby-operator {
|
296
|
+
color: #00ffee;
|
297
|
+
background: transparent;
|
298
|
+
}
|
299
|
+
|
300
|
+
.ruby-identifier {
|
301
|
+
color: #ffdead;
|
302
|
+
background: transparent;
|
303
|
+
}
|
304
|
+
|
305
|
+
.ruby-node {
|
306
|
+
color: #ffa07a;
|
307
|
+
background: transparent;
|
308
|
+
}
|
309
|
+
|
310
|
+
.ruby-comment {
|
311
|
+
color: #b22222;
|
312
|
+
font-weight: bold;
|
313
|
+
background: transparent;
|
314
|
+
}
|
315
|
+
|
316
|
+
.ruby-regexp {
|
317
|
+
color: #ffa07a;
|
318
|
+
background: transparent;
|
319
|
+
}
|
320
|
+
|
321
|
+
.ruby-value {
|
322
|
+
color: #7fffd4;
|
323
|
+
background: transparent;
|
324
|
+
}
|
325
|
+
|
326
|
+
EOF
|
327
|
+
|
328
|
+
##
|
329
|
+
# Header template
|
330
|
+
|
331
|
+
XHTML_PREAMBLE = <<-EOF
|
332
|
+
<?xml version="1.0" encoding="<%= values["charset"] %>"?>
|
333
|
+
<!DOCTYPE html
|
334
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
335
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
336
|
+
EOF
|
337
|
+
|
338
|
+
HEADER = XHTML_PREAMBLE + <<-EOF
|
339
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
340
|
+
<head>
|
341
|
+
<title><%= values["title"] %></title>
|
342
|
+
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
343
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
344
|
+
<link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
|
345
|
+
<script type="text/javascript">
|
346
|
+
// <![CDATA[
|
347
|
+
|
348
|
+
function popupCode( url ) {
|
349
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
350
|
+
}
|
351
|
+
|
352
|
+
function toggleCode( id ) {
|
353
|
+
if ( document.getElementById )
|
354
|
+
elem = document.getElementById( id );
|
355
|
+
else if ( document.all )
|
356
|
+
elem = eval( "document.all." + id );
|
357
|
+
else
|
358
|
+
return false;
|
359
|
+
|
360
|
+
elemStyle = elem.style;
|
361
|
+
|
362
|
+
if ( elemStyle.display != "block" ) {
|
363
|
+
elemStyle.display = "block"
|
364
|
+
} else {
|
365
|
+
elemStyle.display = "none"
|
366
|
+
}
|
367
|
+
|
368
|
+
return true;
|
369
|
+
}
|
370
|
+
|
371
|
+
// Make codeblocks hidden by default
|
372
|
+
document.writeln( "<style type=\\"text/css\\">div.method-source-code { display: none }</style>" )
|
373
|
+
|
374
|
+
// ]]>
|
375
|
+
</script>
|
376
|
+
|
377
|
+
</head>
|
378
|
+
<body>
|
379
|
+
EOF
|
380
|
+
|
381
|
+
##
|
382
|
+
# Context content template
|
383
|
+
|
384
|
+
CONTEXT_CONTENT = %{
|
385
|
+
}
|
386
|
+
|
387
|
+
##
|
388
|
+
# Footer template
|
389
|
+
|
390
|
+
FOOTER = <<-EOF
|
391
|
+
<div id="popupmenu" class="index">
|
392
|
+
<ul>
|
393
|
+
<li class="index-entries section-bar">Classes
|
394
|
+
<ul>
|
395
|
+
<% values["class_list"].each do |klass| %>
|
396
|
+
<li><a href="<%= klass["href"] %>"><%= klass["name"] %></a>
|
397
|
+
<% end %>
|
398
|
+
</ul>
|
399
|
+
</li>
|
400
|
+
|
401
|
+
<li class="index-entries section-bar">Methods
|
402
|
+
<ul>
|
403
|
+
<% values["method_list"].each do |file| %>
|
404
|
+
<li><a href="<%= file["href"] %>"><%= file["name"] %></a>
|
405
|
+
<% end %>
|
406
|
+
</ul>
|
407
|
+
</li>
|
408
|
+
|
409
|
+
<li class="index-entries section-bar">Files
|
410
|
+
<ul>
|
411
|
+
<% values["file_list"].each do |file| %>
|
412
|
+
<li><a href="<%= file["href"] %>"><%= file["name"] %></a>
|
413
|
+
<% end %>
|
414
|
+
</ul>
|
415
|
+
</li>
|
416
|
+
</ul>
|
417
|
+
</li>
|
418
|
+
|
419
|
+
</body>
|
420
|
+
</html>
|
421
|
+
EOF
|
422
|
+
|
423
|
+
##
|
424
|
+
# File page header template
|
425
|
+
|
426
|
+
FILE_PAGE = <<-EOF
|
427
|
+
<div id="fileHeader">
|
428
|
+
<h1><%= values["short_name"] %></h1>
|
429
|
+
|
430
|
+
<table class="header-table">
|
431
|
+
<tr class="top-aligned-row">
|
432
|
+
<td><strong>Path:</strong></td>
|
433
|
+
<td><%= values["full_path"] %>
|
434
|
+
<% if values["cvsurl"] then %>
|
435
|
+
(<a href="<%= values["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
|
436
|
+
<% end %>
|
437
|
+
</td>
|
438
|
+
</tr>
|
439
|
+
|
440
|
+
<tr class="top-aligned-row">
|
441
|
+
<td><strong>Last Update:</strong></td>
|
442
|
+
<td><%= values["dtm_modified"] %></td>
|
443
|
+
</tr>
|
444
|
+
</table>
|
445
|
+
</div>
|
446
|
+
EOF
|
447
|
+
|
448
|
+
##
|
449
|
+
# Class page header template
|
450
|
+
|
451
|
+
CLASS_PAGE = <<-EOF
|
452
|
+
<div id="classHeader">
|
453
|
+
<table class="header-table">
|
454
|
+
<tr class="top-aligned-row">
|
455
|
+
<td><strong><%= values["classmod"] %></strong></td>
|
456
|
+
<td class="class-name-in-header"><%= values["full_name"] %></td>
|
457
|
+
</tr>
|
458
|
+
|
459
|
+
<tr class="top-aligned-row">
|
460
|
+
<td><strong>In:</strong></td>
|
461
|
+
<td>
|
462
|
+
<% values["infiles"].each do |infiles| %>
|
463
|
+
<% if infiles["full_path_url"] then %>
|
464
|
+
<a href="<%= infiles["full_path_url"] %>">
|
465
|
+
<% end %>
|
466
|
+
<%= infiles["full_path"] %>
|
467
|
+
<% if infiles["full_path_url"] then %>
|
468
|
+
</a>
|
469
|
+
<% end %>
|
470
|
+
<% if infiles["cvsurl"] then %>
|
471
|
+
(<a href="<%= infiles["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
|
472
|
+
<% end %>
|
473
|
+
<br />
|
474
|
+
<% end %><%# values["infiles"] %>
|
475
|
+
</td>
|
476
|
+
</tr>
|
477
|
+
|
478
|
+
<% if values["parent"] then %>
|
479
|
+
<tr class="top-aligned-row">
|
480
|
+
<td><strong>Parent:</strong></td>
|
481
|
+
<td>
|
482
|
+
<% if values["par_url"] then %>
|
483
|
+
<a href="<%= values["par_url"] %>">
|
484
|
+
<% end %>
|
485
|
+
<%= values["parent"] %>
|
486
|
+
<% if values["par_url"] then %>
|
487
|
+
</a>
|
488
|
+
<% end %>
|
489
|
+
</td>
|
490
|
+
</tr>
|
491
|
+
<% end %>
|
492
|
+
</table>
|
493
|
+
</div>
|
494
|
+
EOF
|
495
|
+
|
496
|
+
##
|
497
|
+
# Method list template
|
498
|
+
|
499
|
+
METHOD_LIST = <<-EOF
|
500
|
+
|
501
|
+
<div id="contextContent">
|
502
|
+
<% if values["diagram"] then %>
|
503
|
+
<div id="diagram">
|
504
|
+
<%= values["diagram"] %>
|
505
|
+
</div>
|
506
|
+
<% end %>
|
507
|
+
|
508
|
+
<% if values["description"] then %>
|
509
|
+
<div id="description">
|
510
|
+
<%= values["description"] %>
|
511
|
+
</div>
|
512
|
+
<% end %>
|
513
|
+
|
514
|
+
<% if values["requires"] then %>
|
515
|
+
<div id="requires-list">
|
516
|
+
<h3 class="section-bar">Required files</h3>
|
517
|
+
|
518
|
+
<div class="name-list">
|
519
|
+
<% values["requires"].each do |requires| %>
|
520
|
+
<%= href requires["aref"], requires["name"] %>
|
521
|
+
<% end %><%# values["requires"] %>
|
522
|
+
</div>
|
523
|
+
</div>
|
524
|
+
<% end %>
|
525
|
+
|
526
|
+
<% if values["toc"] then %>
|
527
|
+
<div id="contents-list">
|
528
|
+
<h3 class="section-bar">Contents</h3>
|
529
|
+
<ul>
|
530
|
+
<% values["toc"].each do |toc| %>
|
531
|
+
<li><a href="#<%= values["href"] %>"><%= values["secname"] %></a></li>
|
532
|
+
<% end %><%# values["toc"] %>
|
533
|
+
</ul>
|
534
|
+
<% end %>
|
535
|
+
</div>
|
536
|
+
|
537
|
+
<% if values["methods"] then %>
|
538
|
+
<div id="method-list">
|
539
|
+
<h3 class="section-bar">Methods</h3>
|
540
|
+
|
541
|
+
<div class="name-list">
|
542
|
+
<% values["methods"].each do |methods| %>
|
543
|
+
<%= href methods["aref"], methods["name"] %>
|
544
|
+
<% end %><%# values["methods"] %>
|
545
|
+
</div>
|
546
|
+
</div>
|
547
|
+
<% end %>
|
548
|
+
|
549
|
+
</div>
|
550
|
+
|
551
|
+
|
552
|
+
<!-- if includes -->
|
553
|
+
<% if values["includes"] then %>
|
554
|
+
<div id="includes">
|
555
|
+
<h3 class="section-bar">Included Modules</h3>
|
556
|
+
|
557
|
+
<div id="includes-list">
|
558
|
+
<% values["includes"].each do |includes| %>
|
559
|
+
<span class="include-name"><%= href includes["aref"], includes["name"] %></span>
|
560
|
+
<% end %><%# values["includes"] %>
|
561
|
+
</div>
|
562
|
+
</div>
|
563
|
+
<% end %>
|
564
|
+
|
565
|
+
<% values["sections"].each do |sections| %>
|
566
|
+
<div id="section">
|
567
|
+
<% if sections["sectitle"] then %>
|
568
|
+
<h2 class="section-title"><a name="<%= sections["secsequence"] %>"><%= sections["sectitle"] %></a></h2>
|
569
|
+
<% if sections["seccomment"] then %>
|
570
|
+
<div class="section-comment">
|
571
|
+
<%= sections["seccomment"] %>
|
572
|
+
</div>
|
573
|
+
<% end %>
|
574
|
+
<% end %>
|
575
|
+
|
576
|
+
<% if values["classlist"] then %>
|
577
|
+
<div id="class-list">
|
578
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
579
|
+
|
580
|
+
<%= values["classlist"] %>
|
581
|
+
</div>
|
582
|
+
<% end %>
|
583
|
+
|
584
|
+
<% if values["constants"] then %>
|
585
|
+
<div id="constants-list">
|
586
|
+
<h3 class="section-bar">Constants</h3>
|
587
|
+
|
588
|
+
<div class="name-list">
|
589
|
+
<table summary="Constants">
|
590
|
+
<% values["constants"].each do |constants| %>
|
591
|
+
<tr class="top-aligned-row context-row">
|
592
|
+
<td class="context-item-name"><%= constants["name"] %></td>
|
593
|
+
<td>=</td>
|
594
|
+
<td class="context-item-value"><%= constants["value"] %></td>
|
595
|
+
<% if values["desc"] then %>
|
596
|
+
<td width="3em"> </td>
|
597
|
+
<td class="context-item-desc"><%= constants["desc"] %></td>
|
598
|
+
<% end %>
|
599
|
+
</tr>
|
600
|
+
<% end %><%# values["constants"] %>
|
601
|
+
</table>
|
602
|
+
</div>
|
603
|
+
</div>
|
604
|
+
<% end %>
|
605
|
+
|
606
|
+
<% if values["aliases"] then %>
|
607
|
+
<div id="aliases-list">
|
608
|
+
<h3 class="section-bar">External Aliases</h3>
|
609
|
+
|
610
|
+
<div class="name-list">
|
611
|
+
<table summary="aliases">
|
612
|
+
<% values["aliases"].each do |aliases| $stderr.puts({ :aliases => aliases }.inspect) %>
|
613
|
+
<tr class="top-aligned-row context-row">
|
614
|
+
<td class="context-item-name"><%= values["old_name"] %></td>
|
615
|
+
<td>-></td>
|
616
|
+
<td class="context-item-value"><%= values["new_name"] %></td>
|
617
|
+
</tr>
|
618
|
+
<% if values["desc"] then %>
|
619
|
+
<tr class="top-aligned-row context-row">
|
620
|
+
<td> </td>
|
621
|
+
<td colspan="2" class="context-item-desc"><%= values["desc"] %></td>
|
622
|
+
</tr>
|
623
|
+
<% end %>
|
624
|
+
<% end %><%# values["aliases"] %>
|
625
|
+
</table>
|
626
|
+
</div>
|
627
|
+
</div>
|
628
|
+
<% end %>
|
629
|
+
|
630
|
+
|
631
|
+
<% if values["attributes"] then %>
|
632
|
+
<div id="attribute-list">
|
633
|
+
<h3 class="section-bar">Attributes</h3>
|
634
|
+
|
635
|
+
<div class="name-list">
|
636
|
+
<table>
|
637
|
+
<% values["attributes"].each do |attributes| $stderr.puts({ :attributes => attributes }.inspect) %>
|
638
|
+
<tr class="top-aligned-row context-row">
|
639
|
+
<td class="context-item-name"><%= values["name"] %></td>
|
640
|
+
<% if values["rw"] then %>
|
641
|
+
<td class="context-item-value"> [<%= values["rw"] %>] </td>
|
642
|
+
<% end %>
|
643
|
+
<% unless values["rw"] then %>
|
644
|
+
<td class="context-item-value"> </td>
|
645
|
+
<% end %>
|
646
|
+
<td class="context-item-desc"><%= values["a_desc"] %></td>
|
647
|
+
</tr>
|
648
|
+
<% end %><%# values["attributes"] %>
|
649
|
+
</table>
|
650
|
+
</div>
|
651
|
+
</div>
|
652
|
+
<% end %>
|
653
|
+
|
654
|
+
<!-- if method_list -->
|
655
|
+
<% if sections["method_list"] then %>
|
656
|
+
<div id="methods">
|
657
|
+
<% sections["method_list"].each do |method_list| %>
|
658
|
+
<% if method_list["methods"] then %>
|
659
|
+
<h3 class="section-bar"><%= method_list["type"] %> <%= method_list["category"] %> methods</h3>
|
660
|
+
|
661
|
+
<% method_list["methods"].each do |methods| %>
|
662
|
+
<div id="method-<%= methods["aref"] %>" class="method-detail">
|
663
|
+
<a name="<%= methods["aref"] %>"></a>
|
664
|
+
|
665
|
+
<div class="method-heading">
|
666
|
+
<% if methods["codeurl"] then %>
|
667
|
+
<a href="<%= methods["codeurl"] %>" target="Code" class="method-signature"
|
668
|
+
onclick="popupCode('<%= methods["codeurl"] %>');return false;">
|
669
|
+
<% end %>
|
670
|
+
<% if methods["sourcecode"] then %>
|
671
|
+
<a href="#<%= methods["aref"] %>" class="method-signature">
|
672
|
+
<% end %>
|
673
|
+
<% if methods["callseq"] then %>
|
674
|
+
<span class="method-name"><%= methods["callseq"] %></span>
|
675
|
+
<% end %>
|
676
|
+
<% unless methods["callseq"] then %>
|
677
|
+
<span class="method-name"><%= methods["name"] %></span><span class="method-args"><%= methods["params"] %></span>
|
678
|
+
<% end %>
|
679
|
+
<% if methods["codeurl"] then %>
|
680
|
+
</a>
|
681
|
+
<% end %>
|
682
|
+
<% if methods["sourcecode"] then %>
|
683
|
+
</a>
|
684
|
+
<% end %>
|
685
|
+
</div>
|
686
|
+
|
687
|
+
<div class="method-description">
|
688
|
+
<% if methods["m_desc"] then %>
|
689
|
+
<%= methods["m_desc"] %>
|
690
|
+
<% end %>
|
691
|
+
<% if methods["sourcecode"] then %>
|
692
|
+
<p><a class="source-toggle" href="#"
|
693
|
+
onclick="toggleCode('<%= methods["aref"] %>-source');return false;">[Source]</a></p>
|
694
|
+
<div class="method-source-code" id="<%= methods["aref"] %>-source">
|
695
|
+
<pre>
|
696
|
+
<%= methods["sourcecode"] %>
|
697
|
+
</pre>
|
698
|
+
</div>
|
699
|
+
<% end %>
|
700
|
+
</div>
|
701
|
+
</div>
|
702
|
+
|
703
|
+
<% end %><%# method_list["methods"] %>
|
704
|
+
<% end %>
|
705
|
+
<% end %><%# sections["method_list"] %>
|
706
|
+
|
707
|
+
</div>
|
708
|
+
<% end %>
|
709
|
+
<% end %><%# values["sections"] %>
|
710
|
+
EOF
|
711
|
+
|
712
|
+
##
|
713
|
+
# Body template
|
714
|
+
|
715
|
+
BODY = HEADER + %{
|
716
|
+
|
717
|
+
<%= template_include %> <!-- banner header -->
|
718
|
+
|
719
|
+
<div id="bodyContent">
|
720
|
+
|
721
|
+
} + METHOD_LIST + %{
|
722
|
+
|
723
|
+
</div>
|
724
|
+
|
725
|
+
} + FOOTER
|
726
|
+
|
727
|
+
##
|
728
|
+
# Source code template
|
729
|
+
|
730
|
+
SRC_PAGE = XHTML_PREAMBLE + <<-EOF
|
731
|
+
<html>
|
732
|
+
<head>
|
733
|
+
<title><%= values["title"] %></title>
|
734
|
+
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
735
|
+
<link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
|
736
|
+
</head>
|
737
|
+
<body class="standalone-code">
|
738
|
+
<pre><%= values["code"] %></pre>
|
739
|
+
</body>
|
740
|
+
</html>
|
741
|
+
EOF
|
742
|
+
|
743
|
+
##
|
744
|
+
# Index file templates
|
745
|
+
|
746
|
+
FR_INDEX_BODY = %{
|
747
|
+
<%= template_include %>
|
748
|
+
}
|
749
|
+
|
750
|
+
FILE_INDEX = XHTML_PREAMBLE + <<-EOF
|
751
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
752
|
+
<head>
|
753
|
+
<title><%= values["list_title"] %></title>
|
754
|
+
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
755
|
+
<link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" />
|
756
|
+
<base target="docwin" />
|
757
|
+
</head>
|
758
|
+
<body>
|
759
|
+
<div class="index">
|
760
|
+
<h1 class="section-bar"><%= values["list_title"] %></h1>
|
761
|
+
<div class="index-entries">
|
762
|
+
<% values["entries"].each do |entries| %>
|
763
|
+
<a href="<%= entries["href"] %>"><%= entries["name"] %></a><br />
|
764
|
+
<% end %><%# values["entries"] %>
|
765
|
+
</div>
|
766
|
+
</div>
|
767
|
+
</body>
|
768
|
+
</html>
|
769
|
+
EOF
|
770
|
+
|
771
|
+
CLASS_INDEX = FILE_INDEX
|
772
|
+
METHOD_INDEX = FILE_INDEX
|
773
|
+
|
774
|
+
INDEX = <<-EOF
|
775
|
+
<?xml version="1.0" encoding="<%= values["charset"] %>"?>
|
776
|
+
<!DOCTYPE html
|
777
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
|
778
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
|
779
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
780
|
+
<head>
|
781
|
+
<title><%= values["title"] %></title>
|
782
|
+
<meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
|
783
|
+
</head>
|
784
|
+
<frameset rows="20%, 80%">
|
785
|
+
<frameset cols="45%,55%">
|
786
|
+
<frame src="fr_class_index.html" name="Classes" />
|
787
|
+
<frame src="fr_method_index.html" name="Methods" />
|
788
|
+
</frameset>
|
789
|
+
<frame src="<%= values["initial_page"] %>" name="docwin" />
|
790
|
+
</frameset>
|
791
|
+
</html>
|
792
|
+
EOF
|
793
|
+
|
794
|
+
end
|
795
|
+
|