Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

157 lines
8.1 KiB

  1. package ActivePerl::DocTools::TOC::HTML;
  2. our $VERSION = '0.01';
  3. use strict;
  4. use warnings;
  5. use base ('ActivePerl::DocTools::TOC');
  6. my $indent = ' ' x 4;
  7. # constructs the simpler methods
  8. sub text {
  9. my ($text) = join '', map { "$_\n" } @_;
  10. return sub { $text };
  11. }
  12. # extra info is tedious to collect -- is done in a subclass or something.
  13. sub extra { '' };
  14. *header = text ("<H4>Core Perl Documentation</H4>","<hr>");
  15. sub before_pods { '' }
  16. *pod_separator = text('<br>');
  17. sub pod {
  18. my ($self, $file) = @_;
  19. return _page($self->{'podz'}->{"Pod::$file"}, $file, $self->extra($file));
  20. }
  21. sub after_pods { '' }
  22. *before_pragmas = text("<H4>Pragmas</H4>","<hr>");
  23. sub pragma {
  24. my ($self, $file) = @_;
  25. return _page($self->{'pragmaz'}->{$file}, $file, $self->extra($file));
  26. }
  27. sub after_pragmas { '' }
  28. *before_libraries = text( "<H4>Modules</H4>","<hr>");
  29. *library_indent_open = sub {''}; # text('<ul compact>');
  30. *library_indent_close = sub {''}; # text('</ul>');
  31. *library_indent_same = sub {''};
  32. sub library {
  33. my ($self, $file, $showfile, $depth) = @_;
  34. return (($indent x $depth) . _page($self->{'filez'}->{$file}, $showfile, $self->extra($file)));
  35. }
  36. sub library_container {
  37. my ($self, $file, $showfile, $depth) = @_;
  38. return (($indent x $depth) . _folder($showfile));
  39. }
  40. sub after_libraries { '' }
  41. *footer = text("</div></body></html>");
  42. sub _folder {
  43. my ($text) = @_;
  44. defined $text or die "no argument to _folder!";
  45. return qq'<img src="images/folder.gif" width="15" height="13" alt="*"> $text<br>\n';
  46. }
  47. sub _page {
  48. my ($href, $text, $extra) = @_;
  49. die "bad arguments to _page: ($href, $text, $extra)" unless (defined $href and defined $text);
  50. defined $extra or $extra = '';
  51. if ($extra ne '') {
  52. $extra = " $extra"; # just to make it EXACTLY identical to the old way.
  53. }
  54. return qq'<img src="images/page.gif" width="12" height="15" alt="*"> <a href="$href">$text</a>$extra<br>\n';
  55. }
  56. sub boilerplate {
  57. # warn "boilerplate";
  58. return boiler_header() . boiler_links();
  59. }
  60. sub boiler_header {
  61. # warn "boiler_header";
  62. return (<<HERE);
  63. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
  64. <html>
  65. <head>
  66. <title>ActivePerl Help System Index</title>
  67. <base target="PerlDoc">
  68. <link rel="STYLESHEET" href="Active.css" type="text/css">
  69. </head>
  70. <body>
  71. <p><a href="http://www.ActiveState.com" target="_top"><img src="images/aslogo.gif" border="0" width="233" height="145" alt="ActiveState!"></a></p>
  72. HERE
  73. }
  74. sub boiler_links {
  75. # warn "boiler_links";
  76. return (<<HERE);
  77. <div nowrap>
  78. <h4>ActivePerl Documentation</h4>
  79. <hr>
  80. <img src="images/page.gif" width="12" height="15" alt="*"> <a href="perlmain.html">Welcome to ActivePerl</a><br>
  81. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="RELEASE.html">Release Notes</a><br>
  82. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="readme.html">Readme</a><br>
  83. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="CHANGES.html">ActivePerl Change Log</a><br>
  84. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Copyright.html">Copyright Information</a><br>
  85. <img src="images/page.gif" width="12" height="15" alt="*"> <a href="ASPNPerl/ASPNPerl.html">ASPN Perl</a><br>
  86. <img src="images/folder.gif" width="15" height="13" alt="*"> Install Notes<br>
  87. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Linux/Install.html">Linux</a><br>
  88. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Solaris/Install.html">Solaris</a><br>
  89. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/Install.html">Windows</a><br>
  90. <img src="images/folder.gif" width="15" height="13" alt="*"> ActivePerl Components<br>
  91. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Components/Descriptions.html">Overview</a><br>
  92. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/ActivePerl-faq2.html">PPM</a><br>
  93. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/folder.gif" width="15" height="13" alt="*"> Windows Specifics<br>
  94. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="site/lib/Win32/OLE/Browser/Browser.html" target="_blank">OLE Browser</a><br>
  95. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Components/Windows/PerlScript.html">PerlScript</a><br>
  96. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="../eg/IEExamples/index.htm">PerlScript Examples</a><br>
  97. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Components/Windows/PerlISAPI.html">Perl for ISAPI</a><br>
  98. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="site/lib/Pod/PerlEz.html">PerlEz</a><br>
  99. <img src="images/folder.gif" width="15" height="13" alt="*"> ActivePerl FAQ<br>
  100. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/ActivePerl-faq.html">Introduction</a><br>
  101. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/ActivePerl-faq1.html">Availability &amp; Install</a><br>
  102. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/ActivePerl-faq2.html">Using PPM</a><br>
  103. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/ActivePerl-faq3.html">Docs &amp; Support</a><br>
  104. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Modules-faq.html">Bundled Modules</a><br>
  105. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/folder.gif" width="15" height="13" alt="*"> Windows Specifics<br>
  106. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq2.html">Perl for ISAPI</a><br>
  107. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq4.html">Windows 9X/NT/2000</a><br>
  108. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq5.html">Quirks</a><br>
  109. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq6.html">Web Server Config</a><br>
  110. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq7.html">Web Programming</a><br>
  111. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq8.html">Programming</a><br>
  112. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq9.html">Modules &amp; Samples</a><br>
  113. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq10.html">Embedding &amp; Extending</a><br>
  114. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq12.html">Using OLE with Perl</a><br>
  115. <img src="images/folder.gif" width="15" height="13" alt="*"> Windows Scripting<br>
  116. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Windows/ActiveServerPages.html">Active Server Pages</a><br>
  117. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Windows/WindowsScriptHost.html">Windows Script Host</a><br>
  118. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Windows/WindowsScriptComponents.html">Windows Script Components</a><br>
  119. HERE
  120. }