Reformat detailed member documentation
g0dil [Wed, 30 Apr 2008 22:19:29 +0000 (22:19 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@832 270642c3-0616-0410-b53a-bc976706d245

Console/Executor.cc
doclib/html-munge.xsl
doclib/senf.css

index a7db590..4d9b2f9 100644 (file)
@@ -60,7 +60,7 @@ prefix_ void senf::console::Executor::execute(std::ostream & output,
             GenericNode & node ( traverseCommand(command.commandPath()) );
             DirectoryNode * dir ( dynamic_cast<DirectoryNode*>(&node) );
             if ( dir ) {
-                if (autocd_) {
+                if (autocd_ && command.arguments().empty()) {
                     oldCwd_ = cwd_;
                     cwd_ = dir->thisptr();
                 } else
index 7da6022..09c5bed 100644 (file)
@@ -44,7 +44,7 @@
     <xsl:value-of select="substring-after(current(),'@TOPDIR@')"/>\r
   </xsl:template>\r
   \r
-  <!-- Add 'class' attribute to some special paragraphs/lists -->\r
+  <!-- Add 'class' attribute  -->\r
   \r
   <xsl:template name="add-class">\r
     <xsl:param name="class"/>\r
     </xsl:element>\r
   </xsl:template>\r
 \r
+  <!-- Reformat detailed member documentation -->\r
+\r
+  <xsl:template match="table[@class='memname'][contains(preceding::h1[1],' Class ')][contains(preceding::h1[1],' Reference')]">\r
+    <xsl:variable name="name"><xsl:value-of select="str:split(tr/td[@class='memname'],'::')[position()=last()]"/></xsl:variable>\r
+    <table class="memname">\r
+      <tr>\r
+        <td class="memtype" colspan="5">\r
+          <xsl:for-each select="tr/td[@class='memname']/*|tr/td[@class='memname']/text()">\r
+            <xsl:choose>\r
+              <xsl:when test="position()=last()">\r
+                <xsl:value-of select="substring(.,1,string-length(.)-string-length($name))"/>\r
+              </xsl:when>\r
+              <xsl:otherwise>\r
+                <xsl:copy-of select="."/>\r
+              </xsl:otherwise>\r
+            </xsl:choose>\r
+          </xsl:for-each>\r
+        </td>\r
+      </tr>\r
+\r
+      <xsl:choose>\r
+        <xsl:when test="tr/td[@class='paramtype']">\r
+          <tr>\r
+            <td class="memname"><xsl:copy-of select="$name"/></td>\r
+            <td class="memparen">(</td>\r
+            <xsl:copy-of select="tr[1]/td[@class='paramtype']"/>\r
+            <xsl:copy-of select="tr[1]/td[@class='paramname']"/>\r
+            <td class="memparen"><xsl:if test="not(tr[td[@class='paramkey']])">)</xsl:if></td>\r
+          </tr>\r
+\r
+          <xsl:for-each select="tr[td[@class='paramkey']]">\r
+            <tr>\r
+              <td class="memname"></td>\r
+              <td class="memparen"></td>\r
+              <xsl:copy-of select="td[@class='paramtype']"/>\r
+              <xsl:copy-of select="td[@class='paramname']"/>\r
+              <td class="memparen"><xsl:if test="position()=last()">)</xsl:if></td>\r
+            </tr>\r
+          </xsl:for-each>\r
+        </xsl:when>\r
+        <xsl:otherwise>\r
+          <tr>\r
+            <td class="memname"><xsl:copy-of select="$name"/></td>\r
+            <td class="memparen"><xsl:if test="tr/td[.='(']">()</xsl:if></td>\r
+            <td class="paramtype"></td>\r
+            <td class="paramname"></td>\r
+            <td class="memparen"></td>\r
+          </tr>\r
+        </xsl:otherwise>\r
+      </xsl:choose>\r
+      <tr>\r
+        <td colspan="5" class="memattrs"><xsl:copy-of select="tr/td[@width='100%']/code"/></td>\r
+      </tr>\r
+    </table>\r
+  </xsl:template>\r
+\r
   <!-- Add grouping to all-members page -->\r
 \r
   <xsl:template match="table[preceding-sibling::h1[1][contains(text(),'Member List')]]">\r
     </xsl:call-template>\r
   </xsl:template>\r
 \r
+  <!-- Break the following lists after each komma -->\r
+\r
   <xsl:template match="p[starts-with(text(),'Inherited by ')]">\r
     <xsl:call-template name="break-comma"/>\r
   </xsl:template>\r
index 1783cc1..86ea61a 100644 (file)
@@ -548,6 +548,43 @@ p.commalist {
         margin-left: 3em;
 }
 
+table.memname {
+        width: 100%; 
+        font-weight: normal; 
+        white-space: normal;
+}
+
+table.memname td {
+        vertical-align: top;
+}
+
+table.memname td.memtype {
+        width: 100%;
+}
+
+table.memname td.memname {
+        width: 35%; 
+        text-align: right; 
+        font-weight: bold;
+}
+
+table.memname td.memparen {
+        width: 1%;
+}
+
+table.memname td.paramtype {
+        width: 30%; 
+        text-align: right;
+}
+
+table.memname td.paramname {
+        width: 33%;
+}
+
+table.memname td.memattrs {
+        text-align: right;
+}
+
 /* \f
  * Local Variables:
  * indent-tabs-mode: nil