require 'rdoc/generator/html' require 'rdoc/generator/html/html' module RDoc::Generator::HTML::HEFSS FONTS = "Verdana, Arial, Helvetica, sans-serif" STYLE = <<-EOF body,p { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000040; background: #BBBBBB; } td { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000040; } .attr-rw { font-size: small; color: #444488 } .title-row {color: #eeeeff; background: #BBBBDD; } .big-title-font { color: white; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: large; height: 50px} .small-title-font { color: purple; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: small; } .aqua { color: purple } .method-name, attr-name { font-family: monospace; font-weight: bold; } .tablesubtitle { width: 100%; margin-top: 1ex; margin-bottom: .5ex; padding: 5px 0px 5px 20px; font-size: large; color: purple; background: #BBBBCC; } .tablesubsubtitle { width: 100%; margin-top: 1ex; margin-bottom: .5ex; padding: 5px 0px 5px 20px; font-size: medium; color: white; background: #BBBBCC; } .name-list { font-family: monospace; margin-left: 40px; margin-bottom: 2ex; line-height: 140%; } .description { margin-left: 40px; margin-bottom: 2ex; line-height: 140%; } .methodtitle { font-size: medium; text_decoration: none; padding: 3px 3px 3px 20px; color: #0000AA; } .column-title { font-size: medium; font-weight: bold; text_decoration: none; padding: 3px 3px 3px 20px; color: #3333CC; } .variable-name { font-family: monospace; font-size: medium; text_decoration: none; padding: 3px 3px 3px 20px; color: #0000AA; } .row-name { font-size: medium; font-weight: medium; font-family: monospace; text_decoration: none; padding: 3px 3px 3px 20px; } .paramsig { font-size: small; } .srcbut { float: right } EOF BODY = <<-EOF <%= values["title"] %> "> " type="text/css" media="screen" /> <%= template_include %> <% if values["diagram"] then %>
<%= values["diagram"] %>
<% end %> <% if values["description"] then %>
<%= values["description"] %>
<% end %> <% if values["requires"] then %>
Required files

<% values["requires"].each do |requires| %> <%= href requires["aref"], requires["name"] %> <% end # values["requires"] %> <% end %>
<% if values["sections"] then %> <% values["sections"].each do |sections| %> <% if sections["method_list"] then %> <% sections["method_list"].each do |method_list| %> <% if method_list["methods"] then %>
Subroutines and Functions

<% method_list["methods"].each do |methods| %> " target="source"><%= methods["name"] %> <% end # values["methods"] %>
<% end %> <% end # values["method_list"] %> <% end %> <% if sections["attributes"] then %>
Arguments

<% sections["attributes"].each do |attributes| %> <% if attributes["rw"] then %> <% end %> <% unless attributes["rw"] then %> <% end %> <% end # values["attributes"] %>
 [<%= attributes["rw"] %>] <%= attributes["name"] %> <%= attributes["a_desc"] %>
<% end %> <% end # values["sections"] %> <% end %> <% if values["classlist"] then %>
Modules

<%= values["classlist"] %>
<% end %> <%= template_include %> EOF FILE_PAGE = <<-EOF
File
<%= values["short_name"] %>
Path: <%= values["full_path"] %> <% if values["cvsurl"] then %>  (">CVS) <% end %>
Modified: <%= values["dtm_modified"] %>

EOF CLASS_PAGE = <<-EOF
<%= values["classmod"] %>
<%= values["full_name"] %>
<% if values["parent"] then %> <% end %>
In: <% values["infiles"].each do |infiles| %> <%= href infiles["full_path_url"], infiles["full_path"] %> <% if infiles["cvsurl"] then %>  (">CVS) <% end %> <% end # values["infiles"] %>
Parent: <% if values["par_url"] then %> " class="cyan"> <% end %> <%= values["parent"] %> <% if values["par_url"] then %> <% end %>

EOF METHOD_LIST = <<-EOF <% if values["includes"] then %>
Uses

<% values["includes"].each do |includes| %> <%= href includes["aref"], includes["name"] %> <% end # values["includes"] %>
<% end %> <% if values["sections"] then %> <% values["sections"].each do |sections| %> <% if sections["method_list"] then %> <% sections["method_list"].each do |method_list| %> <% if method_list["methods"] then %>
<%= method_list["type"] %> <%= method_list["category"] %> methods
<% method_list["methods"].each do |methods| %>
"> <%= methods["name"] %><%= methods["params"] %> <% if methods["codeurl"] then %> " target="source" class="srclink">src <% end %>
<% if method_list["m_desc"] then %>
<%= method_list["m_desc"] %>
<% end %> <% end # method_list["methods"] %> <% end %> <% end # sections["method_list"] %> <% end %> <% end # values["sections"] %> <% end %> EOF SRC_PAGE = <<-EOF <%= values["title"] %> ">
<%= values["code"] %>
EOF FR_INDEX_BODY = %{ <%= template_include %> } FILE_INDEX = <<-EOF "> <% values["entries"].each do |entries| %> "><%= entries["name"] %>
<% end # values["entries"] %> EOF CLASS_INDEX = FILE_INDEX METHOD_INDEX = FILE_INDEX INDEX = <<-EOF <%= values["title"] %> "> " name="docwin"> <body bgcolor="#BBBBBB"> Click <a href="html/index.html">here</a> for a non-frames version of this page. </body> EOF # Blank page to use as a target BLANK = %{ } def write_extra_pages template = TemplatePage.new(BLANK) File.open("blank.html", "w") { |f| template.write_html_on(f, {}) } end end