rdoc 2.1.0 → 2.2.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.

Files changed (57) hide show
  1. data/History.txt +82 -1
  2. data/Manifest.txt +8 -0
  3. data/README.txt +33 -9
  4. data/RI.txt +58 -0
  5. data/Rakefile +2 -0
  6. data/bin/ri +1 -2
  7. data/lib/rdoc.rb +154 -36
  8. data/lib/rdoc/code_objects.rb +38 -2
  9. data/lib/rdoc/diagram.rb +17 -15
  10. data/lib/rdoc/generator.rb +21 -15
  11. data/lib/rdoc/generator/chm/chm.rb +2 -0
  12. data/lib/rdoc/generator/html.rb +137 -89
  13. data/lib/rdoc/generator/html/common.rb +24 -0
  14. data/lib/rdoc/generator/html/frameless.rb +28 -731
  15. data/lib/rdoc/generator/html/hefss.rb +47 -311
  16. data/lib/rdoc/generator/html/html.rb +226 -156
  17. data/lib/rdoc/generator/html/kilmer.rb +31 -298
  18. data/lib/rdoc/generator/html/kilmerfactory.rb +427 -0
  19. data/lib/rdoc/generator/html/one_page_html.rb +6 -5
  20. data/lib/rdoc/generator/texinfo.rb +3 -6
  21. data/lib/rdoc/generator/xml.rb +4 -7
  22. data/lib/rdoc/generator/xml/xml.rb +21 -9
  23. data/lib/rdoc/markup.rb +0 -95
  24. data/lib/rdoc/markup/inline.rb +1 -1
  25. data/lib/rdoc/markup/to_html.rb +9 -6
  26. data/lib/rdoc/markup/to_html_crossref.rb +67 -21
  27. data/lib/rdoc/markup/to_texinfo.rb +1 -1
  28. data/lib/rdoc/parser.rb +22 -1
  29. data/lib/rdoc/parser/c.rb +14 -16
  30. data/lib/rdoc/parser/ruby.rb +3 -3
  31. data/lib/rdoc/parser/simple.rb +1 -1
  32. data/lib/rdoc/rdoc.rb +0 -1
  33. data/lib/rdoc/ri/cache.rb +5 -6
  34. data/lib/rdoc/ri/descriptions.rb +3 -0
  35. data/lib/rdoc/ri/display.rb +157 -37
  36. data/lib/rdoc/ri/driver.rb +314 -198
  37. data/lib/rdoc/ri/formatter.rb +1 -1
  38. data/lib/rdoc/ri/paths.rb +2 -11
  39. data/lib/rdoc/ri/reader.rb +3 -3
  40. data/lib/rdoc/ri/util.rb +0 -2
  41. data/test/binary.dat +0 -0
  42. data/test/rdoc_markup_to_html_crossref_reference.rb +31 -0
  43. data/test/test_attribute_manager.rb +73 -0
  44. data/test/test_rdoc_info_formatting.rb +6 -6
  45. data/test/test_rdoc_info_sections.rb +2 -2
  46. data/test/test_rdoc_markup_attribute_manager.rb +14 -14
  47. data/test/test_rdoc_markup_to_html.rb +15 -3
  48. data/test/test_rdoc_markup_to_html_crossref.rb +276 -7
  49. data/test/test_rdoc_parser.rb +13 -0
  50. data/test/test_rdoc_parser_c.rb +1 -1
  51. data/test/test_rdoc_parser_ruby.rb +72 -1
  52. data/test/test_rdoc_ri_default_display.rb +23 -22
  53. data/test/test_rdoc_ri_driver.rb +1 -1
  54. data/test/test_rdoc_ri_formatter.rb +1 -1
  55. metadata +27 -35
  56. data.tar.gz.sig +0 -1
  57. metadata.gz.sig +0 -0
@@ -1,16 +1,16 @@
1
1
  require 'rdoc/generator/html'
2
- require 'rdoc/generator/html/html'
2
+ require 'rdoc/generator/html/kilmerfactory'
3
3
 
4
4
  module RDoc::Generator::HTML::HEFSS
5
5
 
6
6
  FONTS = "Verdana, Arial, Helvetica, sans-serif"
7
7
 
8
- STYLE = <<-EOF
9
- body,p { font-family: Verdana, Arial, Helvetica, sans-serif;
8
+ CENTRAL_STYLE = <<-EOF
9
+ body,p { font-family: <%= values["fonts"] %>;
10
10
  color: #000040; background: #BBBBBB;
11
11
  }
12
12
 
13
- td { font-family: Verdana, Arial, Helvetica, sans-serif;
13
+ td { font-family: <%= values["fonts"] %>;
14
14
  color: #000040;
15
15
  }
16
16
 
@@ -21,16 +21,20 @@ td { font-family: Verdana, Arial, Helvetica, sans-serif;
21
21
  }
22
22
 
23
23
  .big-title-font { color: white;
24
- font-family: Verdana, Arial, Helvetica, sans-serif;
24
+ font-family: <%= values["fonts"] %>;
25
25
  font-size: large;
26
26
  height: 50px}
27
27
 
28
28
  .small-title-font { color: purple;
29
- font-family: Verdana, Arial, Helvetica, sans-serif;
29
+ font-family: <%= values["fonts"] %>;
30
30
  font-size: small; }
31
31
 
32
32
  .aqua { color: purple }
33
33
 
34
+ #diagram img {
35
+ border: 0;
36
+ }
37
+
34
38
  .method-name, attr-name {
35
39
  font-family: monospace; font-weight: bold;
36
40
  }
@@ -75,241 +79,6 @@ td { font-family: Verdana, Arial, Helvetica, sans-serif;
75
79
  color: #0000AA;
76
80
  }
77
81
 
78
- .column-title {
79
- font-size: medium;
80
- font-weight: bold;
81
- text_decoration: none;
82
- padding: 3px 3px 3px 20px;
83
- color: #3333CC;
84
- }
85
-
86
- .variable-name {
87
- font-family: monospace;
88
- font-size: medium;
89
- text_decoration: none;
90
- padding: 3px 3px 3px 20px;
91
- color: #0000AA;
92
- }
93
-
94
- .row-name {
95
- font-size: medium;
96
- font-weight: medium;
97
- font-family: monospace;
98
- text_decoration: none;
99
- padding: 3px 3px 3px 20px;
100
- }
101
-
102
- .paramsig {
103
- font-size: small;
104
- }
105
-
106
- .srcbut { float: right }
107
-
108
- EOF
109
-
110
- BODY = <<-EOF
111
- <html><head>
112
- <title><%= values["title"] %></title>
113
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>">
114
- <link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
115
- <script type="text/javascript" language="JavaScript">
116
- <!--
117
- function popCode(url) {
118
- parent.frames.source.location = url
119
- }
120
- //-->
121
- </script>
122
- </head>
123
- <body bgcolor="#BBBBBB">
124
-
125
- <%= template_include %> <!-- banner header -->
126
-
127
- <% if values["diagram"] then %>
128
- <table width="100%"><tr><td align="center">
129
- <%= values["diagram"] %>
130
- </td></tr></table>
131
- <% end %>
132
-
133
- <% if values["description"] then %>
134
- <div class="description"><%= values["description"] %></div>
135
- <% end %>
136
-
137
- <% if values["requires"] then %>
138
- <table cellpadding="5" width="100%">
139
- <tr><td class="tablesubtitle">Required files</td></tr>
140
- </table><br />
141
- <div class="name-list">
142
- <% values["requires"].each do |requires| %>
143
- <%= href requires["aref"], requires["name"] %>
144
- <% end %><%# values["requires"] %>
145
- <% end %>
146
- </div>
147
-
148
- <% if values["sections"] then %>
149
- <% values["sections"].each do |sections| %>
150
- <% if sections["method_list"] then %>
151
- <% sections["method_list"].each do |method_list| %>
152
- <% if method_list["methods"] then %>
153
- <table cellpadding="5" width="100%">
154
- <tr><td class="tablesubtitle">Subroutines and Functions</td></tr>
155
- </table><br />
156
- <div class="name-list">
157
- <% method_list["methods"].each do |methods| %>
158
- <a href="<%= methods["codeurl"] %>" target="source"><%= methods["name"] %></a>
159
- <% end %><%# values["methods"] %>
160
- </div>
161
- <% end %>
162
- <% end %><%# values["method_list"] %>
163
- <% end %>
164
-
165
- <% if sections["attributes"] then %>
166
- <table cellpadding="5" width="100%">
167
- <tr><td class="tablesubtitle">Arguments</td></tr>
168
- </table><br />
169
- <table cellspacing="5">
170
- <% sections["attributes"].each do |attributes| %>
171
- <tr valign="top">
172
- <% if attributes["rw"] then %>
173
- <td align="center" class="attr-rw">&nbsp;[<%= attributes["rw"] %>]&nbsp;</td>
174
- <% end %>
175
- <% unless attributes["rw"] then %>
176
- <td></td>
177
- <% end %>
178
- <td class="attr-name"><%= attributes["name"] %></td>
179
- <td><%= attributes["a_desc"] %></td>
180
- </tr>
181
- <% end %><%# values["attributes"] %>
182
- </table>
183
- <% end %>
184
- <% end %><%# values["sections"] %>
185
- <% end %>
186
-
187
- <% if values["classlist"] then %>
188
- <table cellpadding="5" width="100%">
189
- <tr><td class="tablesubtitle">Modules</td></tr>
190
- </table><br />
191
- <%= values["classlist"] %><br />
192
- <% end %>
193
-
194
- <%= template_include %> <!-- method descriptions -->
195
-
196
- </body>
197
- </html>
198
- EOF
199
-
200
- FILE_PAGE = <<-EOF
201
- <table width="100%">
202
- <tr class="title-row">
203
- <td><table width="100%"><tr>
204
- <td class="big-title-font" colspan="2"><font size="-3"><b>File</b><br /></font><%= values["short_name"] %></td>
205
- <td align="right"><table cellspacing="0" cellpadding="2">
206
- <tr>
207
- <td class="small-title-font">Path:</td>
208
- <td class="small-title-font"><%= values["full_path"] %>
209
- <% if values["cvsurl"] then %>
210
- &nbsp;(<a href="<%= values["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
211
- <% end %>
212
- </td>
213
- </tr>
214
- <tr>
215
- <td class="small-title-font">Modified:</td>
216
- <td class="small-title-font"><%= values["dtm_modified"] %></td>
217
- </tr>
218
- </table>
219
- </td></tr></table></td>
220
- </tr>
221
- </table><br />
222
- EOF
223
-
224
- CLASS_PAGE = <<-EOF
225
- <table width="100%" border="0" cellspacing="0">
226
- <tr class="title-row">
227
- <td class="big-title-font">
228
- <font size="-3"><b><%= values["classmod"] %></b><br /></font><%= values["full_name"] %>
229
- </td>
230
- <td align="right">
231
- <table cellspacing="0" cellpadding="2">
232
- <tr valign="top">
233
- <td class="small-title-font">In:</td>
234
- <td class="small-title-font">
235
- <% values["infiles"].each do |infiles| %>
236
- <%= href infiles["full_path_url"], infiles["full_path"] %>
237
- <% if infiles["cvsurl"] then %>
238
- &nbsp;(<a href="<%= infiles["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
239
- <% end %>
240
- <% end %><%# values["infiles"] %>
241
- </td>
242
- </tr>
243
- <% if values["parent"] then %>
244
- <tr>
245
- <td class="small-title-font">Parent:</td>
246
- <td class="small-title-font">
247
- <% if values["par_url"] then %>
248
- <a href="<%= values["par_url"] %>" class="cyan">
249
- <% end %>
250
- <%= values["parent"] %>
251
- <% if values["par_url"] then %>
252
- </a>
253
- <% end %>
254
- </td>
255
- </tr>
256
- <% end %>
257
- </table>
258
- </td>
259
- </tr>
260
- </table><br />
261
- EOF
262
-
263
- METHOD_LIST = <<-EOF
264
- <% if values["includes"] then %>
265
- <div class="tablesubsubtitle">Uses</div><br />
266
- <div class="name-list">
267
- <% values["includes"].each do |includes| %>
268
- <span class="method-name"><%= href includes["aref"], includes["name"] %></span>
269
- <% end %><%# values["includes"] %>
270
- </div>
271
- <% end %>
272
-
273
- <% if values["sections"] then %>
274
- <% values["sections"].each do |sections| %>
275
- <% if sections["method_list"] then %>
276
- <% sections["method_list"].each do |method_list| %>
277
- <% if method_list["methods"] then %>
278
- <table cellpadding="5" width="100%">
279
- <tr><td class="tablesubtitle"><%= method_list["type"] %> <%= method_list["category"] %> methods</td></tr>
280
- </table>
281
- <% method_list["methods"].each do |methods| %>
282
- <table width="100%" cellspacing="0" cellpadding="5" border="0">
283
- <tr><td class="methodtitle">
284
- <a name="<%= methods["aref"] %>">
285
- <b><%= methods["name"] %></b><%= methods["params"] %>
286
- <% if methods["codeurl"] then %>
287
- <a href="<%= methods["codeurl"] %>" target="source" class="srclink">src</a>
288
- <% end %>
289
- </a></td></tr>
290
- </table>
291
- <% if method_list["m_desc"] then %>
292
- <div class="description">
293
- <%= method_list["m_desc"] %>
294
- </div>
295
- <% end %>
296
- <% end %><%# method_list["methods"] %>
297
- <% end %>
298
- <% end %><%# sections["method_list"] %>
299
- <% end %>
300
- <% end %><%# values["sections"] %>
301
- <% end %>
302
- EOF
303
-
304
- SRC_PAGE = <<-EOF
305
- <html>
306
- <head><title><%= values["title"] %></title>
307
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>">
308
- <style type="text/css">
309
- .kw { color: #3333FF; font-weight: bold }
310
- .cmt { color: green; font-style: italic }
311
- .str { color: #662222; font-style: italic }
312
- .re { color: #662222; }
313
82
  .ruby-comment { color: green; font-style: italic }
314
83
  .ruby-constant { color: #4433aa; font-weight: bold; }
315
84
  .ruby-identifier { color: #222222; }
@@ -319,35 +88,23 @@ td { font-family: Verdana, Arial, Helvetica, sans-serif;
319
88
  .ruby-operator { color: #111111; }
320
89
  .ruby-regexp { color: #662222; }
321
90
  .ruby-value { color: #662222; font-style: italic }
322
- </style>
323
- </head>
324
- <body bgcolor="#BBBBBB">
325
- <pre><%= values["code"] %></pre>
326
- </body>
327
- </html>
91
+
92
+ .srcbut { float: right }
328
93
  EOF
329
94
 
330
- FR_INDEX_BODY = %{
331
- <%= template_include %>
95
+ INDEX_STYLE = <<-EOF
96
+ body {
97
+ background-color: #bbbbbb;
98
+ font-family: #{FONTS};
99
+ font-size: 11px;
100
+ font-style: normal;
101
+ line-height: 14px;
102
+ color: #000040;
332
103
  }
333
104
 
334
- FILE_INDEX = <<-EOF
335
- <html>
336
- <head>
337
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>">
338
- <style type="text/css">
339
- <!--
340
- body {
341
- background-color: #bbbbbb;
342
- font-family: #{FONTS};
343
- font-size: 11px;
344
- font-style: normal;
345
- line-height: 14px;
346
- color: #000040;
347
- }
348
105
  div.banner {
349
106
  background: #bbbbcc;
350
- color: white;
107
+ color: white;
351
108
  padding: 1;
352
109
  margin: 0;
353
110
  font-size: 90%;
@@ -356,59 +113,38 @@ div.banner {
356
113
  text-align: center;
357
114
  width: 100%;
358
115
  }
116
+ EOF
359
117
 
360
- -->
361
- </style>
362
- <base target="docwin">
363
- </head>
364
- <body>
365
- <div class="banner"><%= values["list_title"] %></div>
366
- <% values["entries"].each do |entries| %>
367
- <a href="<%= entries["href"] %>"><%= entries["name"] %></a><br />
368
- <% end %><%# values["entries"] %>
369
- </body></html>
370
- EOF
118
+ FACTORY = RDoc::Generator::HTML::
119
+ KilmerFactory.new(:central_css => CENTRAL_STYLE,
120
+ :index_css => INDEX_STYLE,
121
+ :method_list_heading => "Subroutines and Functions",
122
+ :class_and_module_list_heading => "Classes and Modules",
123
+ :attribute_list_heading => "Arguments")
371
124
 
372
- CLASS_INDEX = FILE_INDEX
373
- METHOD_INDEX = FILE_INDEX
125
+ STYLE = FACTORY.get_STYLE()
374
126
 
375
- INDEX = <<-EOF
376
- <html>
377
- <head>
378
- <title><%= values["title"] %></title>
379
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>">
380
- </head>
127
+ METHOD_LIST = FACTORY.get_METHOD_LIST()
128
+
129
+ BODY = FACTORY.get_BODY()
130
+
131
+ FILE_PAGE = FACTORY.get_FILE_PAGE()
381
132
 
382
- <frameset cols="20%,*">
383
- <frameset rows="15%,35%,50%">
384
- <frame src="fr_file_index.html" title="Files" name="Files">
385
- <frame src="fr_class_index.html" name="Modules">
386
- <frame src="fr_method_index.html" name="Subroutines and Functions">
387
- </frameset>
388
- <frameset rows="80%,20%">
389
- <frame src="<%= values["initial_page"] %>" name="docwin">
390
- <frame src="blank.html" name="source">
391
- </frameset>
392
- <noframes>
393
- <body bgcolor="#BBBBBB">
394
- Click <a href="html/index.html">here</a> for a non-frames
395
- version of this page.
396
- </body>
397
- </noframes>
398
- </frameset>
133
+ CLASS_PAGE = FACTORY.get_CLASS_PAGE()
399
134
 
400
- </html>
401
- EOF
135
+ SRC_PAGE = FACTORY.get_SRC_PAGE()
402
136
 
403
- # Blank page to use as a target
404
- BLANK = %{
405
- <html><body bgcolor="#BBBBBB"></body></html>
406
- }
137
+ FR_INDEX_BODY = FACTORY.get_FR_INDEX_BODY()
407
138
 
408
- def write_extra_pages
409
- template = TemplatePage.new(BLANK)
410
- File.open("blank.html", "w") { |f| template.write_html_on(f, {}) }
411
- end
139
+ FILE_INDEX = FACTORY.get_FILE_INDEX()
412
140
 
413
- end
141
+ CLASS_INDEX = FACTORY.get_CLASS_INDEX()
142
+
143
+ METHOD_INDEX = FACTORY.get_METHOD_INDEX()
414
144
 
145
+ INDEX = FACTORY.get_INDEX()
146
+
147
+ def self.write_extra_pages(values)
148
+ FACTORY.write_extra_pages(values)
149
+ end
150
+ end
@@ -1,15 +1,17 @@
1
1
  require 'rdoc/generator/html'
2
- require 'rdoc/generator/html/one_page_html'
2
+ require 'rdoc/generator/html/common'
3
3
 
4
4
  ##
5
5
  # = CSS2 RDoc HTML template
6
6
  #
7
- # This is a template for RDoc that uses XHTML 1.0 Transitional and dictates a
7
+ # This is a template for RDoc that uses XHTML 1.0 Strict and dictates a
8
8
  # bit more of the appearance of the output to cascading stylesheets than the
9
9
  # default. It was designed for clean inline code display, and uses DHTMl to
10
10
  # toggle the visibility of each method's source with each click on the
11
11
  # '[source]' link.
12
12
  #
13
+ # This template *also* forms the basis of the frameless template.
14
+ #
13
15
  # == Authors
14
16
  #
15
17
  # * Michael Granger <ged@FaerieMUD.org>
@@ -23,34 +25,53 @@ require 'rdoc/generator/html/one_page_html'
23
25
 
24
26
  module RDoc::Generator::HTML::HTML
25
27
 
28
+ include RDoc::Generator::HTML::Common
29
+
26
30
  FONTS = "Verdana,Arial,Helvetica,sans-serif"
27
31
 
28
32
  STYLE = <<-EOF
29
33
  body {
30
- font-family: Verdana,Arial,Helvetica,sans-serif;
31
- font-size: 90%;
32
- margin: 0;
33
- margin-left: 40px;
34
- padding: 0;
35
- background: white;
34
+ font-family: #{FONTS};
35
+ font-size: 90%;
36
+ margin: 0;
37
+ margin-left: 40px;
38
+ padding: 0;
39
+ background: white;
40
+ }
41
+
42
+ h1, h2, h3, h4 {
43
+ margin: 0;
44
+ background: transparent;
45
+ }
46
+
47
+ h1 {
48
+ font-size: 150%;
36
49
  }
37
50
 
38
- h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
39
- h1 { font-size: 150%; }
40
- h2,h3,h4 { margin-top: 1em; }
51
+ h2,h3,h4 {
52
+ margin-top: 1em;
53
+ }
54
+
55
+ :link, :visited {
56
+ background: #eef;
57
+ color: #039;
58
+ text-decoration: none;
59
+ }
41
60
 
42
- a { background: #eef; color: #039; text-decoration: none; }
43
- a:hover { background: #039; color: #eef; }
61
+ :link:hover, :visited:hover {
62
+ background: #039;
63
+ color: #eef;
64
+ }
44
65
 
45
66
  /* Override the base stylesheet's Anchor inside a table cell */
46
- td > a {
67
+ td > :link, td > :visited {
47
68
  background: transparent;
48
69
  color: #039;
49
70
  text-decoration: none;
50
71
  }
51
72
 
52
73
  /* and inside a section title */
53
- .section-title > a {
74
+ .section-title > :link, .section-title > :visited {
54
75
  background: transparent;
55
76
  color: #eee;
56
77
  text-decoration: none;
@@ -58,181 +79,255 @@ td > a {
58
79
 
59
80
  /* === Structural elements =================================== */
60
81
 
61
- div#index {
62
- margin: 0;
63
- margin-left: -40px;
64
- padding: 0;
65
- font-size: 90%;
82
+ .index {
83
+ margin: 0;
84
+ margin-left: -40px;
85
+ padding: 0;
86
+ font-size: 90%;
66
87
  }
67
88
 
68
-
69
- div#index a {
70
- margin-left: 0.7em;
89
+ .index :link, .index :visited {
90
+ margin-left: 0.7em;
71
91
  }
72
92
 
73
- div#index .section-bar {
74
- margin-left: 0px;
75
- padding-left: 0.7em;
76
- background: #ccc;
77
- font-size: small;
93
+ .index .section-bar {
94
+ margin-left: 0px;
95
+ padding-left: 0.7em;
96
+ background: #ccc;
97
+ font-size: small;
78
98
  }
79
99
 
80
-
81
- div#classHeader, div#fileHeader {
82
- width: auto;
83
- color: white;
84
- padding: 0.5em 1.5em 0.5em 1.5em;
85
- margin: 0;
86
- margin-left: -40px;
87
- border-bottom: 3px solid #006;
100
+ #classHeader, #fileHeader {
101
+ width: auto;
102
+ color: white;
103
+ padding: 0.5em 1.5em 0.5em 1.5em;
104
+ margin: 0;
105
+ margin-left: -40px;
106
+ border-bottom: 3px solid #006;
88
107
  }
89
108
 
90
- div#classHeader a, div#fileHeader a {
91
- background: inherit;
92
- color: white;
109
+ #classHeader :link, #fileHeader :link,
110
+ #classHeader :visited, #fileHeader :visited {
111
+ background: inherit;
112
+ color: white;
93
113
  }
94
114
 
95
- div#classHeader td, div#fileHeader td {
96
- background: inherit;
97
- color: white;
115
+ #classHeader td, #fileHeader td {
116
+ background: inherit;
117
+ color: white;
98
118
  }
99
119
 
100
-
101
- div#fileHeader {
102
- background: #057;
120
+ #fileHeader {
121
+ background: #057;
103
122
  }
104
123
 
105
- div#classHeader {
106
- background: #048;
124
+ #classHeader {
125
+ background: #048;
107
126
  }
108
127
 
109
-
110
128
  .class-name-in-header {
111
129
  font-size: 180%;
112
130
  font-weight: bold;
113
131
  }
114
132
 
115
-
116
- div#bodyContent {
117
- padding: 0 1.5em 0 1.5em;
133
+ #bodyContent {
134
+ padding: 0 1.5em 0 1.5em;
118
135
  }
119
136
 
120
- div#description {
121
- padding: 0.5em 1.5em;
122
- background: #efefef;
123
- border: 1px dotted #999;
137
+ #description {
138
+ padding: 0.5em 1.5em;
139
+ background: #efefef;
140
+ border: 1px dotted #999;
124
141
  }
125
142
 
126
- div#description h1,h2,h3,h4,h5,h6 {
127
- color: #125;;
128
- background: transparent;
143
+ #description h1, #description h2, #description h3,
144
+ #description h4, #description h5, #description h6 {
145
+ color: #125;
146
+ background: transparent;
129
147
  }
130
148
 
131
- div#validator-badges {
132
- text-align: center;
149
+ #validator-badges {
150
+ text-align: center;
133
151
  }
134
- div#validator-badges img { border: 0; }
135
152
 
136
- div#copyright {
137
- color: #333;
138
- background: #efefef;
139
- font: 0.75em sans-serif;
140
- margin-top: 5em;
141
- margin-bottom: 0;
142
- padding: 0.5em 2em;
153
+ #validator-badges img {
154
+ border: 0;
143
155
  }
144
156
 
157
+ #copyright {
158
+ color: #333;
159
+ background: #efefef;
160
+ font: 0.75em sans-serif;
161
+ margin-top: 5em;
162
+ margin-bottom: 0;
163
+ padding: 0.5em 2em;
164
+ }
145
165
 
146
166
  /* === Classes =================================== */
147
167
 
148
168
  table.header-table {
149
- color: white;
150
- font-size: small;
169
+ color: white;
170
+ font-size: small;
151
171
  }
152
172
 
153
173
  .type-note {
154
- font-size: small;
155
- color: #DEDEDE;
174
+ font-size: small;
175
+ color: #dedede;
156
176
  }
157
177
 
158
- .xxsection-bar {
159
- background: #eee;
160
- color: #333;
161
- padding: 3px;
178
+ .section-bar {
179
+ color: #333;
180
+ border-bottom: 1px solid #999;
181
+ margin-left: -20px;
162
182
  }
163
183
 
164
- .section-bar {
165
- color: #333;
166
- border-bottom: 1px solid #999;
167
- margin-left: -20px;
184
+ .section-title {
185
+ background: #79a;
186
+ color: #eee;
187
+ padding: 3px;
188
+ margin-top: 2em;
189
+ margin-left: -30px;
190
+ border: 1px solid #999;
168
191
  }
169
192
 
193
+ .top-aligned-row {
194
+ vertical-align: top
195
+ }
170
196
 
171
- .section-title {
172
- background: #79a;
173
- color: #eee;
174
- padding: 3px;
175
- margin-top: 2em;
176
- margin-left: -30px;
177
- border: 1px solid #999;
197
+ .bottom-aligned-row {
198
+ vertical-align: bottom
178
199
  }
179
200
 
180
- .top-aligned-row { vertical-align: top }
181
- .bottom-aligned-row { vertical-align: bottom }
201
+ #diagram img {
202
+ border: 0;
203
+ }
182
204
 
183
205
  /* --- Context section classes ----------------------- */
184
206
 
185
207
  .context-row { }
186
- .context-item-name { font-family: monospace; font-weight: bold; color: black; }
187
- .context-item-value { font-size: small; color: #448; }
188
- .context-item-desc { color: #333; padding-left: 2em; }
208
+
209
+ .context-item-name {
210
+ font-family: monospace;
211
+ font-weight: bold;
212
+ color: black;
213
+ }
214
+
215
+ .context-item-value {
216
+ font-size: small;
217
+ color: #448;
218
+ }
219
+
220
+ .context-item-desc {
221
+ color: #333;
222
+ padding-left: 2em;
223
+ }
189
224
 
190
225
  /* --- Method classes -------------------------- */
226
+
191
227
  .method-detail {
192
- background: #efefef;
193
- padding: 0;
194
- margin-top: 0.5em;
195
- margin-bottom: 1em;
196
- border: 1px dotted #ccc;
228
+ background: #efefef;
229
+ padding: 0;
230
+ margin-top: 0.5em;
231
+ margin-bottom: 1em;
232
+ border: 1px dotted #ccc;
197
233
  }
234
+
198
235
  .method-heading {
199
236
  color: black;
200
237
  background: #ccc;
201
238
  border-bottom: 1px solid #666;
202
239
  padding: 0.2em 0.5em 0 0.5em;
203
240
  }
204
- .method-signature { color: black; background: inherit; }
205
- .method-name { font-weight: bold; }
206
- .method-args { font-style: italic; }
207
- .method-description { padding: 0 0.5em 0 0.5em; }
241
+
242
+ .method-signature {
243
+ color: black;
244
+ background: inherit;
245
+ }
246
+
247
+ .method-name {
248
+ font-weight: bold;
249
+ }
250
+
251
+ .method-args {
252
+ font-style: italic;
253
+ }
254
+
255
+ .method-description {
256
+ padding: 0 0.5em 0 0.5em;
257
+ }
208
258
 
209
259
  /* --- Source code sections -------------------- */
210
260
 
211
- a.source-toggle { font-size: 90%; }
261
+ :link.source-toggle, :visited.source-toggle {
262
+ font-size: 90%;
263
+ }
264
+
212
265
  div.method-source-code {
213
- background: #262626;
214
- color: #ffdead;
215
- margin: 1em;
216
- padding: 0.5em;
217
- border: 1px dashed #999;
218
- overflow: hidden;
266
+ background: #262626;
267
+ color: #ffdead;
268
+ margin: 1em;
269
+ padding: 0.5em;
270
+ border: 1px dashed #999;
271
+ overflow: auto;
219
272
  }
220
273
 
221
- div.method-source-code pre { color: #ffdead; overflow: hidden; }
274
+ div.method-source-code pre {
275
+ color: #ffdead;
276
+ }
222
277
 
223
278
  /* --- Ruby keyword styles --------------------- */
224
279
 
225
- .standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
226
-
227
- .ruby-constant { color: #7fffd4; background: transparent; }
228
- .ruby-keyword { color: #00ffff; background: transparent; }
229
- .ruby-ivar { color: #eedd82; background: transparent; }
230
- .ruby-operator { color: #00ffee; background: transparent; }
231
- .ruby-identifier { color: #ffdead; background: transparent; }
232
- .ruby-node { color: #ffa07a; background: transparent; }
233
- .ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
234
- .ruby-regexp { color: #ffa07a; background: transparent; }
235
- .ruby-value { color: #7fffd4; background: transparent; }
280
+ .standalone-code {
281
+ background: #221111;
282
+ color: #ffdead;
283
+ overflow: auto;
284
+ }
285
+
286
+ .ruby-constant {
287
+ color: #7fffd4;
288
+ background: transparent;
289
+ }
290
+
291
+ .ruby-keyword {
292
+ color: #00ffff;
293
+ background: transparent;
294
+ }
295
+
296
+ .ruby-ivar {
297
+ color: #eedd82;
298
+ background: transparent;
299
+ }
300
+
301
+ .ruby-operator {
302
+ color: #00ffee;
303
+ background: transparent;
304
+ }
305
+
306
+ .ruby-identifier {
307
+ color: #ffdead;
308
+ background: transparent;
309
+ }
310
+
311
+ .ruby-node {
312
+ color: #ffa07a;
313
+ background: transparent;
314
+ }
315
+
316
+ .ruby-comment {
317
+ color: #b22222;
318
+ font-weight: bold;
319
+ background: transparent;
320
+ }
321
+
322
+ .ruby-regexp {
323
+ color: #ffa07a;
324
+ background: transparent;
325
+ }
326
+
327
+ .ruby-value {
328
+ color: #7fffd4;
329
+ background: transparent;
330
+ }
236
331
  EOF
237
332
 
238
333
 
@@ -240,15 +335,7 @@ EOF
240
335
  ### H E A D E R T E M P L A T E
241
336
  #####################################################################
242
337
 
243
- XHTML_PREAMBLE = <<-EOF
244
- <?xml version="1.0" encoding="<%= values["charset"] %>"?>
245
- <!DOCTYPE html
246
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
247
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
248
- EOF
249
-
250
- HEADER = XHTML_PREAMBLE + <<-EOF
251
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
338
+ HEADER = XHTML_STRICT_PREAMBLE + HTML_ELEMENT + <<-EOF
252
339
  <head>
253
340
  <title><%= values["title"] %></title>
254
341
  <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
@@ -281,7 +368,7 @@ EOF
281
368
  }
282
369
 
283
370
  // Make codeblocks hidden by default
284
- document.writeln( "<style type=\\"text/css\\">div.method-source-code { display: none }</style>" )
371
+ document.writeln( "<style type=\\"text/css\\">div.method-source-code { display: none }<\\/style>" )
285
372
 
286
373
  // ]]>
287
374
  </script>
@@ -290,13 +377,6 @@ EOF
290
377
  <body>
291
378
  EOF
292
379
 
293
- #####################################################################
294
- ### C O N T E X T C O N T E N T T E M P L A T E
295
- #####################################################################
296
-
297
- CONTEXT_CONTENT = %{
298
- }
299
-
300
380
  #####################################################################
301
381
  ### F O O T E R T E M P L A T E
302
382
  #####################################################################
@@ -480,8 +560,8 @@ EOF
480
560
  <td class="context-item-name"><%= constants["name"] %></td>
481
561
  <td>=</td>
482
562
  <td class="context-item-value"><%= constants["value"] %></td>
483
- <% if sections["desc"] then %>
484
- <td width="3em">&nbsp;</td>
563
+ <% if constants["desc"] then %>
564
+ <td>&nbsp;</td>
485
565
  <td class="context-item-desc"><%= constants["desc"] %></td>
486
566
  <% end %>
487
567
  </tr>
@@ -616,8 +696,7 @@ EOF
616
696
  ### S O U R C E C O D E T E M P L A T E
617
697
  #####################################################################
618
698
 
619
- SRC_PAGE = XHTML_PREAMBLE + <<-EOF
620
- <html>
699
+ SRC_PAGE = XHTML_STRICT_PREAMBLE + HTML_ELEMENT + <<-EOF
621
700
  <head>
622
701
  <title><%= values["title"] %></title>
623
702
  <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
@@ -634,25 +713,22 @@ EOF
634
713
  ### I N D E X F I L E T E M P L A T E S
635
714
  #####################################################################
636
715
 
637
- FR_INDEX_BODY = %{
638
- <%= template_include %>
639
- }
716
+ FR_INDEX_BODY = %{<%= template_include %>}
640
717
 
641
- FILE_INDEX = XHTML_PREAMBLE + <<-EOF
718
+ FILE_INDEX = XHTML_STRICT_PREAMBLE + HTML_ELEMENT + <<-EOF
642
719
  <!--
643
720
 
644
- <%= values["list_title"] %>
721
+ <%= values["title"] %>
645
722
 
646
723
  -->
647
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
648
724
  <head>
649
- <title><%= values["list_title"] %></title>
725
+ <title><%= values["title"] %></title>
650
726
  <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
651
727
  <link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" />
652
728
  <base target="docwin" />
653
729
  </head>
654
730
  <body>
655
- <div id="index">
731
+ <div class="index">
656
732
  <h1 class="section-bar"><%= values["list_title"] %></h1>
657
733
  <div id="index-entries">
658
734
  <% values["entries"].each do |entries| %>
@@ -667,18 +743,12 @@ EOF
667
743
  CLASS_INDEX = FILE_INDEX
668
744
  METHOD_INDEX = FILE_INDEX
669
745
 
670
- INDEX = <<-EOF
671
- <?xml version="1.0" encoding="<%= values["charset"] %>"?>
672
- <!DOCTYPE html
673
- PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
674
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
675
-
746
+ INDEX = XHTML_FRAME_PREAMBLE + HTML_ELEMENT + <<-EOF
676
747
  <!--
677
748
 
678
749
  <%= values["title"] %>
679
750
 
680
751
  -->
681
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
682
752
  <head>
683
753
  <title><%= values["title"] %></title>
684
754
  <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />