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,10 +1,11 @@
1
1
  require 'rdoc/generator/html'
2
+ require 'rdoc/generator/html/kilmerfactory'
2
3
 
3
4
  module RDoc::Generator::HTML::KILMER
4
5
 
5
6
  FONTS = "Verdana, Arial, Helvetica, sans-serif"
6
7
 
7
- STYLE = <<-EOF
8
+ CENTRAL_STYLE = <<-EOF
8
9
  body,td,p { font-family: <%= values["fonts"] %>;
9
10
  color: #000040;
10
11
  }
@@ -30,6 +31,10 @@ body,td,p { font-family: <%= values["fonts"] %>;
30
31
 
31
32
  .aqua { color: black }
32
33
 
34
+ #diagram img {
35
+ border: 0;
36
+ }
37
+
33
38
  .method-name, .attr-name {
34
39
  font-family: font-family: <%= values["fonts"] %>;
35
40
  font-weight: bold;
@@ -67,7 +72,7 @@ body,td,p { font-family: <%= values["fonts"] %>;
67
72
  font-weight: bold;
68
73
  text-decoration: none;
69
74
  color: #000033;
70
- background-color: white;
75
+ background: #ccc;
71
76
  }
72
77
 
73
78
  .srclink {
@@ -78,232 +83,8 @@ body,td,p { font-family: <%= values["fonts"] %>;
78
83
  background-color: white;
79
84
  }
80
85
 
81
- .paramsig {
82
- font-size: small;
83
- }
84
-
85
86
  .srcbut { float: right }
86
- EOF
87
-
88
- BODY = <<-EOF
89
- <html><head>
90
- <title><%= values["title"] %></title>
91
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>">
92
- <link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
93
- <script type="text/javascript" language="JavaScript">
94
- <!--
95
- function popCode(url) {
96
- parent.frames.source.location = url
97
- }
98
- //-->
99
- </script>
100
- </head>
101
- <body bgcolor="white">
102
-
103
- <%= template_include %> <!-- banner header -->
104
-
105
- <% if values["diagram"] then %>
106
- <table width="100%"><tr><td align="center">
107
- <%= values["diagram"] %>
108
- </td></tr></table>
109
- <% end %>
110
-
111
- <% if values["description"] then %>
112
- <div class="description"><%= values["description"] %></div>
113
- <% end %>
114
-
115
- <% if values["requires"] then %>
116
- <table cellpadding="5" width="100%">
117
- <tr><td class="tablesubtitle">Required files</td></tr>
118
- </table><br />
119
- <div class="name-list">
120
- <% values["requires"].each do |requires| %>
121
- <%= href requires["aref"], requires["name"] %>
122
- <% end %><%# values["requires"] %>
123
- <% end %>
124
- </div>
125
-
126
- <% if values["methods"] then %>
127
- <table cellpadding="5" width="100%">
128
- <tr><td class="tablesubtitle">Methods</td></tr>
129
- </table><br />
130
- <div class="name-list">
131
- <% values["methods"].each do |methods| %>
132
- <%= href methods["aref"], methods["name"] %>,
133
- <% end %><%# values["methods"] %>
134
- </div>
135
- <% end %>
136
-
137
-
138
- <% values["sections"].each do |sections| %>
139
- <div id="section">
140
- <% if sections["sectitle"] then %>
141
- <h2 class="section-title"><a name="<%= sections["secsequence"] %>"><%= sections["sectitle"] %></a></h2>
142
- <% if sections["seccomment"] then %>
143
- <div class="section-comment">
144
- <%= sections["seccomment"] %>
145
- </div>
146
- <% end %>
147
- <% end %>
148
-
149
- <% if sections["attributes"] then %>
150
- <table cellpadding="5" width="100%">
151
- <tr><td class="tablesubtitle">Attributes</td></tr>
152
- </table><br />
153
- <table cellspacing="5">
154
- <% sections["attributes"].each do |attributes| %>
155
- <tr valign="top">
156
- <% if attributes["rw"] then %>
157
- <td align="center" class="attr-rw">&nbsp;[<%= attributes["rw"] %>]&nbsp;</td>
158
- <% end %>
159
- <% unless attributes["rw"] then %>
160
- <td></td>
161
- <% end %>
162
- <td class="attr-name"><%= attributes["name"] %></td>
163
- <td><%= attributes["a_desc"] %></td>
164
- </tr>
165
- <% end %><%# sections["attributes"] %>
166
- </table>
167
- <% end %>
168
-
169
- <% if sections["classlist"] then %>
170
- <table cellpadding="5" width="100%">
171
- <tr><td class="tablesubtitle">Classes and Modules</td></tr>
172
- </table><br />
173
- <%= sections["classlist"] %><br />
174
- <% end %>
175
-
176
- <%= template_include %> <!-- method descriptions -->
177
-
178
- <% end %><%# values["sections"] %>
179
-
180
- </body>
181
- </html>
182
- EOF
183
-
184
- FILE_PAGE = <<-EOF
185
- <table width="100%">
186
- <tr class="title-row">
187
- <td><table width="100%"><tr>
188
- <td class="big-title-font" colspan="2"><font size="-3"><b>File</b><br /></font><%= values["short_name"] %></td>
189
- <td align="right"><table cellspacing="0" cellpadding="2">
190
- <tr>
191
- <td class="small-title-font">Path:</td>
192
- <td class="small-title-font"><%= values["full_path"] %>
193
- <% if values["cvsurl"] then %>
194
- &nbsp;(<a href="<%= values["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
195
- <% end %>
196
- </td>
197
- </tr>
198
- <tr>
199
- <td class="small-title-font">Modified:</td>
200
- <td class="small-title-font"><%= values["dtm_modified"] %></td>
201
- </tr>
202
- </table>
203
- </td></tr></table></td>
204
- </tr>
205
- </table><br />
206
- EOF
207
-
208
- CLASS_PAGE = <<-EOF
209
- <table width="100%" border="0" cellspacing="0">
210
- <tr class="title-row">
211
- <td class="big-title-font">
212
- <font size="-3"><b><%= values["classmod"] %></b><br /></font><%= values["full_name"] %>
213
- </td>
214
- <td align="right">
215
- <table cellspacing="0" cellpadding="2">
216
- <tr valign="top">
217
- <td class="small-title-font">In:</td>
218
- <td class="small-title-font">
219
- <% values["infiles"].each do |infiles| %>
220
- <%= href infiles["full_path_url"], infiles["full_path"] %>
221
- <% if infiles["cvsurl"] then %>
222
- &nbsp;(<a href="<%= infiles["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
223
- <% end %>
224
- <% end %><%# values["infiles"] %>
225
- </td>
226
- </tr>
227
- <% if values["parent"] then %>
228
- <tr>
229
- <td class="small-title-font">Parent:</td>
230
- <td class="small-title-font">
231
- <% if values["par_url"] then %>
232
- <a href="<%= values["par_url"] %>" class="cyan">
233
- <% end %>
234
- <%= values["parent"] %>
235
- <% if values["par_url"] then %>
236
- </a>
237
- <% end %>
238
- </td>
239
- </tr>
240
- <% end %>
241
- </table>
242
- </td>
243
- </tr>
244
- </table><br />
245
- EOF
246
87
 
247
- METHOD_LIST = <<-EOF
248
- <% if values["includes"] then %>
249
- <div class="tablesubsubtitle">Included modules</div><br />
250
- <div class="name-list">
251
- <% values["includes"].each do |includes| %>
252
- <span class="method-name"><%= href includes["aref"], includes["name"] %></span>
253
- <% end %><%# values["includes"] %>
254
- </div>
255
- <% end %>
256
-
257
- <% if values["method_list"] then %>
258
- <% values["method_list"].each do |method_list| $stderr.puts({ :method_list => method_list }.inspect) %>
259
- <% if values["methods"] then %>
260
- <table cellpadding=5 width="100%">
261
- <tr><td class="tablesubtitle"><%= values["type"] %> <%= values["category"] %> methods</td></tr>
262
- </table>
263
- <% values["methods"].each do |methods| $stderr.puts({ :methods => methods }.inspect) %>
264
- <table width="100%" cellspacing="0" cellpadding="5" border="0">
265
- <tr><td class="methodtitle">
266
- <a name="<%= values["aref"] %>">
267
- <% if values["callseq"] then %>
268
- <b><%= values["callseq"] %></b>
269
- <% end %>
270
- <% unless values["callseq"] then %>
271
- <b><%= values["name"] %></b><%= values["params"] %>
272
- <% end %>
273
- <% if values["codeurl"] then %>
274
- <a href="<%= values["codeurl"] %>" target="source" class="srclink">src</a>
275
- <% end %>
276
- </a></td></tr>
277
- </table>
278
- <% if values["m_desc"] then %>
279
- <div class="description">
280
- <%= values["m_desc"] %>
281
- </div>
282
- <% end %>
283
- <% if values["aka"] then %>
284
- <div class="aka">
285
- This method is also aliased as
286
- <% values["aka"].each do |aka| $stderr.puts({ :aka => aka }.inspect) %>
287
- <a href="<%= values["aref"] %>"><%= values["name"] %></a>
288
- <% end %><%# values["aka"] %>
289
- </div>
290
- <% end %>
291
- <% if values["sourcecode"] then %>
292
- <pre class="source">
293
- <%= values["sourcecode"] %>
294
- </pre>
295
- <% end %>
296
- <% end %><%# values["methods"] %>
297
- <% end %>
298
- <% end %><%# values["method_list"] %>
299
- <% end %>
300
- EOF
301
-
302
- SRC_PAGE = <<-EOF
303
- <html>
304
- <head><title><%= values["title"] %></title>
305
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>">
306
- <style type="text/css">
307
88
  .ruby-comment { color: green; font-style: italic }
308
89
  .ruby-constant { color: #4433aa; font-weight: bold; }
309
90
  .ruby-identifier { color: #222222; }
@@ -313,28 +94,9 @@ This method is also aliased as
313
94
  .ruby-operator { color: #111111; }
314
95
  .ruby-regexp { color: #662222; }
315
96
  .ruby-value { color: #662222; font-style: italic }
316
- .kw { color: #3333FF; font-weight: bold }
317
- .cmt { color: green; font-style: italic }
318
- .str { color: #662222; font-style: italic }
319
- .re { color: #662222; }
320
- </style>
321
- </head>
322
- <body bgcolor="white">
323
- <pre><%= values["code"] %></pre>
324
- </body>
325
- </html>
326
97
  EOF
327
98
 
328
- FR_INDEX_BODY = %{
329
- <%= template_include %>
330
- }
331
-
332
- FILE_INDEX = <<-EOF
333
- <html>
334
- <head>
335
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>">
336
- <style>
337
- <!--
99
+ INDEX_STYLE = <<-EOF
338
100
  body {
339
101
  background-color: #ddddff;
340
102
  font-family: #{FONTS};
@@ -355,64 +117,35 @@ div.banner {
355
117
  text-align: center;
356
118
  width: 100%;
357
119
  }
120
+ EOF
358
121
 
359
- -->
360
- </style>
361
- <base target="docwin">
362
- </head>
363
- <body>
364
- <div class="banner"><%= values["list_title"] %></div>
365
- <% values["entries"].each do |entries| %>
366
- <a href="<%= entries["href"] %>"><%= entries["name"] %></a><br />
367
- <% end %><%# values["entries"] %>
368
- </body></html>
369
- EOF
122
+ FACTORY = RDoc::Generator::HTML::
123
+ KilmerFactory.new(:central_css => CENTRAL_STYLE,
124
+ :index_css => INDEX_STYLE)
370
125
 
371
- CLASS_INDEX = FILE_INDEX
372
- METHOD_INDEX = FILE_INDEX
126
+ STYLE = FACTORY.get_STYLE()
373
127
 
374
- INDEX = <<-EOF
375
- <html>
376
- <head>
377
- <title><%= values["title"] %></title>
378
- <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>">
379
- </head>
128
+ METHOD_LIST = FACTORY.get_METHOD_LIST()
129
+
130
+ BODY = FACTORY.get_BODY()
131
+
132
+ FILE_PAGE = FACTORY.get_FILE_PAGE()
380
133
 
381
- <frameset cols="20%,*">
382
- <frameset rows="15%,35%,50%">
383
- <frame src="fr_file_index.html" title="Files" name="Files">
384
- <frame src="fr_class_index.html" name="Classes">
385
- <frame src="fr_method_index.html" name="Methods">
386
- </frameset>
387
- <% if values["inline_source"] then %>
388
- <frame src="<%= values["initial_page"] %>" name="docwin">
389
- <% end %>
390
- <% unless values["inline_source"] then %>
391
- <frameset rows="80%,20%">
392
- <frame src="<%= values["initial_page"] %>" name="docwin">
393
- <frame src="blank.html" name="source">
394
- </frameset>
395
- <% end %>
396
- <noframes>
397
- <body bgcolor="white">
398
- Click <a href="html/index.html">here</a> for a non-frames
399
- version of this page.
400
- </body>
401
- </noframes>
402
- </frameset>
134
+ CLASS_PAGE = FACTORY.get_CLASS_PAGE()
403
135
 
404
- </html>
405
- EOF
136
+ SRC_PAGE = FACTORY.get_SRC_PAGE()
406
137
 
407
- # A blank page to use as a target
408
- BLANK = %{
409
- <html><body bgcolor="white"></body></html>
410
- }
138
+ FR_INDEX_BODY = FACTORY.get_FR_INDEX_BODY()
411
139
 
412
- def write_extra_pages
413
- template = TemplatePage.new(BLANK)
414
- File.open("blank.html", "w") { |f| template.write_html_on(f, {}) }
415
- end
140
+ FILE_INDEX = FACTORY.get_FILE_INDEX()
416
141
 
417
- end
142
+ CLASS_INDEX = FACTORY.get_CLASS_INDEX()
418
143
 
144
+ METHOD_INDEX = FACTORY.get_METHOD_INDEX()
145
+
146
+ INDEX = FACTORY.get_INDEX()
147
+
148
+ def self.write_extra_pages(values)
149
+ FACTORY.write_extra_pages(values)
150
+ end
151
+ end
@@ -0,0 +1,427 @@
1
+ require 'rdoc/generator/html'
2
+ require 'rdoc/generator/html/common'
3
+
4
+ #
5
+ # This class generates Kilmer-style templates. Right now,
6
+ # rdoc is shipped with two such templates:
7
+ # * kilmer
8
+ # * hefss
9
+ #
10
+ # Kilmer-style templates use frames. The left side of the page has
11
+ # three frames stacked on top of each other: one lists
12
+ # files, one lists classes, and one lists methods. If source code
13
+ # is not inlined, an additional frame runs across the bottom of
14
+ # the page and will be used to display method source code.
15
+ # The central (and largest frame) display class and file
16
+ # pages.
17
+ #
18
+ # The constructor of this class accepts a Hash containing stylistic
19
+ # attributes. Then, a get_BLAH instance method of this class returns a
20
+ # value for the template's BLAH constant. get_BODY, for instance, returns
21
+ # the value of the template's BODY constant.
22
+ #
23
+ class RDoc::Generator::HTML::KilmerFactory
24
+
25
+ include RDoc::Generator::HTML::Common
26
+
27
+ #
28
+ # The contents of the stylesheet that should be used for the
29
+ # central frame (for the class and file pages).
30
+ #
31
+ # This must be specified in the Hash passed to the constructor.
32
+ #
33
+ attr_reader :central_css
34
+
35
+ #
36
+ # The contents of the stylesheet that should be used for the
37
+ # index pages.
38
+ #
39
+ # This must be specified in the Hash passed to the constructor.
40
+ #
41
+ attr_reader :index_css
42
+
43
+ #
44
+ # The heading that should be displayed before listing methods.
45
+ #
46
+ # If not supplied, this defaults to "Methods".
47
+ #
48
+ attr_reader :method_list_heading
49
+
50
+ #
51
+ # The heading that should be displayed before listing classes and
52
+ # modules.
53
+ #
54
+ # If not supplied, this defaults to "Classes and Modules".
55
+ #
56
+ attr_reader :class_and_module_list_heading
57
+
58
+ #
59
+ # The heading that should be displayed before listing attributes.
60
+ #
61
+ # If not supplied, this defaults to "Attributes".
62
+ #
63
+ attr_reader :attribute_list_heading
64
+
65
+ #
66
+ # ====Description:
67
+ # This method constructs a KilmerFactory instance, which
68
+ # can be used to build Kilmer-style template classes.
69
+ # The +style_attributes+ argument is a Hash that contains the
70
+ # values of the classes attributes (Symbols mapped to Strings).
71
+ #
72
+ # ====Parameters:
73
+ # [style_attributes]
74
+ # A Hash describing the appearance of the Kilmer-style.
75
+ #
76
+ def initialize(style_attributes)
77
+ @central_css = style_attributes[:central_css]
78
+ if(!@central_css)
79
+ raise ArgumentError, "did not specify a value for :central_css"
80
+ end
81
+
82
+ @index_css = style_attributes[:index_css]
83
+ if(!@index_css)
84
+ raise ArgumentError, "did not specify a value for :index_css"
85
+ end
86
+
87
+ @method_list_heading = style_attributes[:method_list_heading]
88
+ if(!@method_list_heading)
89
+ @method_list_heading = "Methods"
90
+ end
91
+
92
+ @class_and_module_list_heading = style_attributes[:class_and_module_list_heading]
93
+ if(!@class_and_module_list_heading)
94
+ @class_and_module_list_heading = "Classes and Modules"
95
+ end
96
+
97
+ @attribute_list_heading = style_attributes[:attribute_list_heading]
98
+ if(!@attribute_list_heading)
99
+ @attribute_list_heading = "Attributes"
100
+ end
101
+ end
102
+
103
+ def get_STYLE
104
+ return @central_css
105
+ end
106
+
107
+ def get_METHOD_LIST
108
+ return %{
109
+ <% if values["diagram"] then %>
110
+ <div id="diagram">
111
+ <table width="100%"><tr><td align="center">
112
+ <%= values["diagram"] %>
113
+ </td></tr></table>
114
+ </div>
115
+ <% end %>
116
+
117
+ <% if values["description"] then %>
118
+ <div class="description"><%= values["description"] %></div>
119
+ <% end %>
120
+
121
+ <% if values["requires"] then %>
122
+ <table cellpadding="5" width="100%">
123
+ <tr><td class="tablesubtitle">Required files</td></tr>
124
+ </table><br />
125
+ <div class="name-list">
126
+ <% values["requires"].each do |requires| %>
127
+ <%= href requires["aref"], requires["name"] %>
128
+ <% end %><%# values["requires"] %>
129
+ </div>
130
+ <% end %>
131
+
132
+ <% if values["methods"] then %>
133
+ <table cellpadding="5" width="100%">
134
+ <tr><td class="tablesubtitle">#{@method_list_heading}</td></tr>
135
+ </table><br />
136
+ <div class="name-list">
137
+ <% values["methods"].each do |methods| %>
138
+ <%= href methods["aref"], methods["name"] %>,
139
+ <% end %><%# values["methods"] %>
140
+ </div>
141
+ <% end %>
142
+
143
+ <% if values["includes"] then %>
144
+ <div class="tablesubsubtitle">Included modules</div><br />
145
+ <div class="name-list">
146
+ <% values["includes"].each do |includes| %>
147
+ <span class="method-name"><%= href includes["aref"], includes["name"] %></span>
148
+ <% end %><%# values["includes"] %>
149
+ </div>
150
+ <% end %>
151
+
152
+ <% values["sections"].each do |sections| %>
153
+ <div id="section">
154
+ <% if sections["sectitle"] then %>
155
+ <h2 class="section-title"><a name="<%= sections["secsequence"] %>"><%= sections["sectitle"] %></a></h2>
156
+ <% if sections["seccomment"] then %>
157
+ <div class="section-comment">
158
+ <%= sections["seccomment"] %>
159
+ </div>
160
+ <% end %>
161
+ <% end %>
162
+ <% if sections["attributes"] then %>
163
+ <table cellpadding="5" width="100%">
164
+ <tr><td class="tablesubtitle">#{@attribute_list_heading}</td></tr>
165
+ </table><br />
166
+ <table cellspacing="5">
167
+ <% sections["attributes"].each do |attributes| %>
168
+ <tr valign="top">
169
+ <% if attributes["rw"] then %>
170
+ <td align="center" class="attr-rw">&nbsp;[<%= attributes["rw"] %>]&nbsp;</td>
171
+ <% end %>
172
+ <% unless attributes["rw"] then %>
173
+ <td></td>
174
+ <% end %>
175
+ <td class="attr-name"><%= attributes["name"] %></td>
176
+ <td><%= attributes["a_desc"] %></td>
177
+ </tr>
178
+ <% end %><%# sections["attributes"] %>
179
+ </table>
180
+ <% end %>
181
+
182
+ <% if sections["classlist"] then %>
183
+ <table cellpadding="5" width="100%">
184
+ <tr><td class="tablesubtitle">#{@class_and_module_list_heading}</td></tr>
185
+ </table><br />
186
+ <%= sections["classlist"] %><br />
187
+ <% end %>
188
+
189
+ <% if sections["method_list"] then %>
190
+ <% sections["method_list"].each do |method_list| %>
191
+ <% if method_list["methods"] then %>
192
+ <table cellpadding="5" width="100%">
193
+ <tr><td class="tablesubtitle"><%= method_list["type"] %> <%= method_list["category"] %> methods</td></tr>
194
+ </table>
195
+ <% method_list["methods"].each do |methods| %>
196
+ <table width="100%" cellspacing="0" cellpadding="5" border="0">
197
+ <tr><td class="methodtitle">
198
+ <a name="<%= methods["aref"] %>">
199
+ <% if methods["callseq"] then %>
200
+ <b><%= methods["callseq"] %></b>
201
+ <% end %>
202
+ <% unless methods["callseq"] then %>
203
+ <b><%= methods["name"] %></b><%= methods["params"] %>
204
+ <% end %>
205
+ </a>
206
+ <% if methods["codeurl"] then %>
207
+ <a href="<%= methods["codeurl"] %>" target="source" class="srclink">src</a>
208
+ <% end %>
209
+ </td></tr>
210
+ </table>
211
+ <% if methods["m_desc"] then %>
212
+ <div class="description">
213
+ <%= methods["m_desc"] %>
214
+ </div>
215
+ <% end %>
216
+ <% if methods["aka"] then %>
217
+ <div class="aka">
218
+ This method is also aliased as
219
+ <% methods["aka"].each do |aka| %>
220
+ <a href="<%= methods["aref"] %>"><%= methods["name"] %></a>
221
+ <% end %><%# methods["aka"] %>
222
+ </div>
223
+ <% end %>
224
+ <% if methods["sourcecode"] then %>
225
+ <pre class="source">
226
+ <%= methods["sourcecode"] %>
227
+ </pre>
228
+ <% end %>
229
+ <% end %><%# method_list["methods"] %>
230
+ <% end %>
231
+ <% end %><%# sections["method_list"] %>
232
+ <% end %>
233
+
234
+ <% end %><%# values["sections"] %>
235
+ </div>
236
+ }
237
+ end
238
+
239
+ def get_BODY
240
+ return XHTML_STRICT_PREAMBLE + HTML_ELEMENT + %{
241
+ <head>
242
+ <title><%= values["title"] %></title>
243
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
244
+ <link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
245
+ <script type="text/javascript">
246
+ <!--
247
+ function popCode(url) {
248
+ parent.frames.source.location = url
249
+ }
250
+ //-->
251
+ </script>
252
+ </head>
253
+ <body>
254
+ <div class="bodyContent">
255
+ <%= template_include %> <!-- banner header -->
256
+
257
+ #{get_METHOD_LIST()}
258
+ </div>
259
+ </body>
260
+ </html>
261
+ }
262
+ end
263
+
264
+ def get_FILE_PAGE
265
+ return %{
266
+ <table width="100%">
267
+ <tr class="title-row">
268
+ <td><table width="100%"><tr>
269
+ <td class="big-title-font" colspan="2">File<br /><%= values["short_name"] %></td>
270
+ <td align="right"><table cellspacing="0" cellpadding="2">
271
+ <tr>
272
+ <td class="small-title-font">Path:</td>
273
+ <td class="small-title-font"><%= values["full_path"] %>
274
+ <% if values["cvsurl"] then %>
275
+ &nbsp;(<a href="<%= values["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
276
+ <% end %>
277
+ </td>
278
+ </tr>
279
+ <tr>
280
+ <td class="small-title-font">Modified:</td>
281
+ <td class="small-title-font"><%= values["dtm_modified"] %></td>
282
+ </tr>
283
+ </table>
284
+ </td></tr></table></td>
285
+ </tr>
286
+ </table><br />
287
+ }
288
+ end
289
+
290
+ def get_CLASS_PAGE
291
+ return %{
292
+ <table width="100%" border="0" cellspacing="0">
293
+ <tr class="title-row">
294
+ <td class="big-title-font">
295
+ <%= values["classmod"] %><br /><%= values["full_name"] %>
296
+ </td>
297
+ <td align="right">
298
+ <table cellspacing="0" cellpadding="2">
299
+ <tr valign="top">
300
+ <td class="small-title-font">In:</td>
301
+ <td class="small-title-font">
302
+ <% values["infiles"].each do |infiles| %>
303
+ <%= href infiles["full_path_url"], infiles["full_path"] %>
304
+ <% if infiles["cvsurl"] then %>
305
+ &nbsp;(<a href="<%= infiles["cvsurl"] %>"><acronym title="Concurrent Versioning System">CVS</acronym></a>)
306
+ <% end %>
307
+ <% end %><%# values["infiles"] %>
308
+ </td>
309
+ </tr>
310
+ <% if values["parent"] then %>
311
+ <tr>
312
+ <td class="small-title-font">Parent:</td>
313
+ <td class="small-title-font">
314
+ <% if values["par_url"] then %>
315
+ <a href="<%= values["par_url"] %>" class="cyan">
316
+ <% end %>
317
+ <%= values["parent"] %>
318
+ <% if values["par_url"] then %>
319
+ </a>
320
+ <% end %>
321
+ </td>
322
+ </tr>
323
+ <% end %>
324
+ </table>
325
+ </td>
326
+ </tr>
327
+ </table><br />
328
+ }
329
+ end
330
+
331
+ def get_SRC_PAGE
332
+ return XHTML_STRICT_PREAMBLE + HTML_ELEMENT + %{
333
+ <head><title><%= values["title"] %></title>
334
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
335
+ <link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
336
+ </head>
337
+ <body>
338
+ <pre><%= values["code"] %></pre>
339
+ </body>
340
+ </html>
341
+ }
342
+ end
343
+
344
+ def get_FR_INDEX_BODY
345
+ return %{<%= template_include %>}
346
+ end
347
+
348
+ def get_FILE_INDEX
349
+ return XHTML_STRICT_PREAMBLE + HTML_ELEMENT + %{
350
+ <head>
351
+ <title><%= values["title"] %></title>
352
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
353
+ <style type="text/css">
354
+ <!--
355
+ #{@index_css}
356
+ -->
357
+ </style>
358
+ <base target="docwin" />
359
+ </head>
360
+ <body>
361
+ <div class="index">
362
+ <div class="banner"><%= values["list_title"] %></div>
363
+ <% values["entries"].each do |entries| %>
364
+ <a href="<%= entries["href"] %>"><%= entries["name"] %></a><br />
365
+ <% end %><%# values["entries"] %>
366
+ </div>
367
+ </body></html>
368
+ }
369
+ end
370
+
371
+ def get_CLASS_INDEX
372
+ return get_FILE_INDEX
373
+ end
374
+
375
+ def get_METHOD_INDEX
376
+ return get_FILE_INDEX
377
+ end
378
+
379
+ def get_INDEX
380
+ return XHTML_FRAME_PREAMBLE + HTML_ELEMENT + %{
381
+ <head>
382
+ <title><%= values["title"] %></title>
383
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
384
+ </head>
385
+
386
+ <frameset cols="20%,*">
387
+ <frameset rows="15%,35%,50%">
388
+ <frame src="fr_file_index.html" title="Files" name="Files" />
389
+ <frame src="fr_class_index.html" name="Classes" />
390
+ <frame src="fr_method_index.html" name="Methods" />
391
+ </frameset>
392
+ <% if values["inline_source"] then %>
393
+ <frame src="<%= values["initial_page"] %>" name="docwin" />
394
+ <% end %>
395
+ <% unless values["inline_source"] then %>
396
+ <frameset rows="80%,20%">
397
+ <frame src="<%= values["initial_page"] %>" name="docwin" />
398
+ <frame src="blank.html" name="source" />
399
+ </frameset>
400
+ <% end %>
401
+ </frameset>
402
+
403
+ </html>
404
+ }
405
+ end
406
+
407
+ def get_BLANK
408
+ # This will be displayed in the source code frame before
409
+ # any source code has been selected.
410
+ return XHTML_STRICT_PREAMBLE + HTML_ELEMENT + %{
411
+ <head>
412
+ <title>Source Code Frame <%= values["title_suffix"] %></title>
413
+ <meta http-equiv="Content-Type" content="text/html; charset=<%= values["charset"] %>" />
414
+ <link rel="stylesheet" href="<%= values["style_url"] %>" type="text/css" media="screen" />
415
+ </head>
416
+ <body>
417
+ </body>
418
+ </html>
419
+ }
420
+ end
421
+
422
+ def write_extra_pages(values)
423
+ template = RDoc::TemplatePage.new(get_BLANK())
424
+ File.open("blank.html", "w") { |f| template.write_html_on(f, values) }
425
+ end
426
+
427
+ end