From 8a9719c222b39a35b70fef7b5eb56c842fa2cea0 Mon Sep 17 00:00:00 2001 From: michelou Date: Fri, 1 Dec 2006 16:21:30 +0000 Subject: added navigation frame in generated API documen... added navigation frame in generated API documentation --- .../scala/tools/nsc/doc/DocGenerator.scala | 28 ++++++++++++++++------ src/compiler/scala/tools/nsc/doc/script.js | 16 +++++++++++++ src/compiler/scala/tools/nsc/doc/style.css | 5 ++++ 3 files changed, 42 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/compiler/scala/tools/nsc/doc/DocGenerator.scala b/src/compiler/scala/tools/nsc/doc/DocGenerator.scala index c749c922da..87e700d7b3 100644 --- a/src/compiler/scala/tools/nsc/doc/DocGenerator.scala +++ b/src/compiler/scala/tools/nsc/doc/DocGenerator.scala @@ -203,13 +203,13 @@ abstract class DocGenerator extends Models { def modules: TreeMap[String, ModuleClassSymbol] def body: NodeSeq = { val x = doctitle concat - aref("all-classes.html", classesFrame, "All objects and classes") + {"All objects and classes"} val y =

Packages
{ { for (val top <- modules.elements.toList) yield - {br(aref(urlFor(top._2), classesFrame, top._2.fullNameString('.')))}; + br({top._2.fullNameString('.')}) } }
; @@ -264,11 +264,11 @@ abstract class DocGenerator extends Models { ; val body =

{ { for (val kind <- KINDS; classes contains kind) yield { -

- {Text(pluralFor(kind))} -

+
+ {Text(pluralFor(kind))} +
-
+
{ { for (val mmbr <- classes(kind).toList) yield br(urlFor(mmbr.tree, contentFrame)); @@ -825,6 +825,19 @@ abstract class DocGenerator extends Models { def modules = modules0 } + new Frame { + def title="navigation" + def path="nav-classes" + override def body0(hasBody: Boolean, nodes: NodeSeq): NodeSeq = + if (!hasBody) nodes else {nodes}; + def body = + + } + new ListClassFrame { def classes = { var allClasses = emptyMap @@ -1223,8 +1236,9 @@ abstract class DocGenerator extends Models { val index = - + + diff --git a/src/compiler/scala/tools/nsc/doc/script.js b/src/compiler/scala/tools/nsc/doc/script.js index 58cf9689de..a71d154ef5 100644 --- a/src/compiler/scala/tools/nsc/doc/script.js +++ b/src/compiler/scala/tools/nsc/doc/script.js @@ -269,4 +269,20 @@ function init() { } } } + +function goto() { + kinds = parent.frames["navigationFrame"].document.getElementById("kinds") + oldLocation = parent.frames["classesFrame"].window.location.href + //alert("oldLocation="+oldLocation); + pos = oldLocation.lastIndexOf("#") + classesURL = (pos > 0) ? oldLocation.substring(0, pos) : oldLocation; + newLocation = classesURL + kinds.options[kinds.selectedIndex].value; + //alert("newLocation="+newLocation); + parent.frames["classesFrame"].window.location = newLocation; +} + +function resetKinds() { + kinds = parent.frames["navigationFrame"].document.getElementById("kinds") + kinds.selectedIndex = 0; +} --> diff --git a/src/compiler/scala/tools/nsc/doc/style.css b/src/compiler/scala/tools/nsc/doc/style.css index 92c94ffedb..2e07756e41 100644 --- a/src/compiler/scala/tools/nsc/doc/style.css +++ b/src/compiler/scala/tools/nsc/doc/style.css @@ -33,6 +33,11 @@ div.doctitle-larger { font-weight: bold; } +div.kinds { + margin: 0.6em 0 0 0; /* top right bottom left */ + font-weight: bold; +} + div.page-title { margin: 15px 0px 15px 0px; font-size: x-large; -- cgit v1.2.3