cvs: php-gtk-doc / reference.xml /stylesheets/common en.xml /stylesheets/html autotoc.xsl chunk-common.xsl class.xsl hierarchy.xsl
| From: | Christian Weiske | Date: | Sun, 01 Aug 2004 16:41:29 +0000 |
| Subject: | cvs: php-gtk-doc / reference.xml /stylesheets/common en.xml /stylesheets/html autotoc.xsl chunk-common.xsl class.xsl hierarchy.xsl | ||
| Groups: | php.gtk.doc | ||
| Request: | Send a blank email to php-gtk-doc+get-1016@lists.php.net to get a copy of this message | ||
cweiske Sun Aug 1 12:41:29 2004 EDT
Modified files:
/php-gtk-doc/stylesheets/html class.xsl hierarchy.xsl
chunk-common.xsl autotoc.xsl
/php-gtk-doc/stylesheets/common en.xml
/php-gtk-doc reference.xml
Log:
This adds a new page in the manual containing
the class hierarchy tree for the gtk classes
To use it, one has to create a new file with the following structure:
<classtree>
<title>title of the classtree</title>
<topclass>gtk.gtkobject</topclass>
</classtree>
Add it to reference.xml (probalby best on top of the classset) and
a new page with a tree of the classes will be created
It is necessary to create a new file for each classtree as we need
an id to have a separate file created (and the gtk tree does not fit
on the same page as the normal gtk toc). This gives you the ability
to have several class trees as well as the decision not to have a tree
when it is not needed, e.g. with gdk classes
http://cvs.php.net/diff.php/php-gtk-doc/stylesheets/html/class.xsl?r1=1.9&r2=1.10&ty=u Index: php-gtk-doc/stylesheets/html/class.xsl diff -u php-gtk-doc/stylesheets/html/class.xsl:1.9 php-gtk-doc/stylesheets/html/class.xsl:1.10 --- php-gtk-doc/stylesheets/html/class.xsl:1.9 Sun Aug 1 07:56:24 2004 +++ php-gtk-doc/stylesheets/html/class.xsl Sun Aug 1 12:41:29 2004 @@ -13,6 +13,7 @@ <div dir="rtl"> <xsl:apply-templates select="./title"/> <xsl:apply-templates select="./partintro"/> + <xsl:apply-templates select="./classtree" /> <xsl:call-template name="component.toc"/> </div> <xsl:apply-templates select="./classentry|./refentry"/> @@ -22,6 +23,7 @@ <div class="{name(.)}" id="{$id}"> <xsl:apply-templates select="./title"/> <xsl:apply-templates select="./partintro"/> + <xsl:apply-templates select="./classtree" /> <xsl:call-template name="component.toc"/> <xsl:apply-templates select="./classentry|./refentry"/> </div> @@ -60,6 +62,17 @@ <h1> <xsl:apply-templates /> </h1> + </xsl:template> + + <xsl:template match="classtree"> + <h2> + <xsl:copy-of select="title/node()" /> + </h2> + <pre class="classtree"> + <xsl:call-template name="classtree_display"> + <xsl:with-param name="classid"><xsl:value-of select="topclass" /></xsl:with-param> + </xsl:call-template> + </pre> </xsl:template> <!--========================================================================--> http://cvs.php.net/diff.php/php-gtk-doc/stylesheets/html/hierarchy.xsl?r1=1.6&r2=1.7&ty=u Index: php-gtk-doc/stylesheets/html/hierarchy.xsl diff -u php-gtk-doc/stylesheets/html/hierarchy.xsl:1.6 php-gtk-doc/stylesheets/html/hierarchy.xsl:1.7 --- php-gtk-doc/stylesheets/html/hierarchy.xsl:1.6 Sun Aug 1 07:56:24 2004 +++ php-gtk-doc/stylesheets/html/hierarchy.xsl Sun Aug 1 12:41:29 2004 @@ -208,4 +208,60 @@ </xsl:for-each> </xsl:template> + +<!-- + creates a class tree beginning from + one top class with all its subclasses +--> +<xsl:template name="classtree_display"> + <!-- class is the ID of the class, e.g. "gtk.gtkwidget"--> + <xsl:param name="classid"/> + <xsl:param name="indent"/> + + <!-- display the current class --> + <xsl:variable name="classname" select="/set/book/classset/classentry[@id=$classid]/classmeta/classtitle" /> + + <xsl:value-of select="$indent"/> + <xsl:text>+- </xsl:text> + <xsl:variable name="link"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="id($classid)"/> + </xsl:call-template> + </xsl:variable> + <span dir="ltr"> + <a> + <xsl:attribute name="href"> + <xsl:value-of select="$link" /> + </xsl:attribute> + <xsl:value-of select="$classname" /> + </a> + </span> + <br/> + + <!-- display all the other classes below the current one --> + <xsl:variable name="newindent"> + <xsl:value-of select="$indent"/> + <xsl:choose> + <xsl:when test="position() = last()"> + <xsl:text> </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>| </xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:for-each select="/set/book/classset/classentry[classmeta/classparent=$classname]"> + <xsl:call-template name="classtree_display"> + <xsl:with-param name="classid"> + <xsl:value-of select="@id" /> + </xsl:with-param> + <xsl:with-param name="indent"> + <xsl:value-of select="$newindent"/> + </xsl:with-param> + </xsl:call-template> + </xsl:for-each> + +</xsl:template> + </xsl:stylesheet> http://cvs.php.net/diff.php/php-gtk-doc/stylesheets/html/chunk-common.xsl?r1=1.6&r2=1.7&ty=u Index: php-gtk-doc/stylesheets/html/chunk-common.xsl diff -u php-gtk-doc/stylesheets/html/chunk-common.xsl:1.6 php-gtk-doc/stylesheets/html/chunk-common.xsl:1.7 --- php-gtk-doc/stylesheets/html/chunk-common.xsl:1.6 Sun Aug 3 13:54:08 2003 +++ php-gtk-doc/stylesheets/html/chunk-common.xsl Sun Aug 1 12:41:29 2004 @@ -97,6 +97,7 @@ <xsl:when test="name($node)='set'">1</xsl:when> <xsl:when test="name($node)='classset'">1</xsl:when> <xsl:when test="name($node)='enumset'">1</xsl:when> + <xsl:when test="name($node)='classtree'">1</xsl:when> <xsl:when test="name($node)='classentry'">1</xsl:when> <xsl:when test="name($node)='method'">1</xsl:when> <xsl:when test="name($node)='signal'">1</xsl:when> @@ -711,6 +712,7 @@ |preceding::classset[1] |preceding::enumset[1] |preceding::prop[1] + |preceding::classtree[1] |preceding::classentry[1] |preceding::refentry[1] |preceding::enum[1] @@ -725,6 +727,7 @@ |ancestor::signal[1] |ancestor::classset[1] |ancestor::enumset[1] + |ancestor::classtree[1] |ancestor::classentry[1])[last()]"/> <xsl:variable name="next" @@ -737,6 +740,7 @@ |following::constructor[1] |following::method[1] |following::signal[1] + |following::classtree[1] |following::classentry[1] |following::refentry[1] |following::enum[1] @@ -754,6 +758,7 @@ |descendant::signal[1] |descendant::classset[1] |descendant::enumset[1] + |descendant::classtree[1] |descendant::classentry[1] |descendant::reference[1] |descendant::refentry[1] @@ -777,6 +782,7 @@ |preceding::classset[1] |preceding::enumset[1] |preceding::prop[1] + |preceding::classtree[1] |preceding::classentry[1] |preceding::refentry[1] |preceding::enum[1] @@ -791,6 +797,7 @@ |ancestor::signal[1] |ancestor::classset[1] |ancestor::enumset[1] + |ancestor::classtree[1] |ancestor::classentry[1])[last()]"/> <xsl:variable name="next" @@ -803,6 +810,7 @@ |following::constructor[1] |following::method[1] |following::signal[1] + |following::classtree[1] |following::classentry[1] |following::refentry[1] |following::enum[1] @@ -820,6 +828,7 @@ |descendant::signal[1] |descendant::classset[1] |descendant::enumset[1] + |descendant::classtree[1] |descendant::classentry[1] |descendant::refentry[1] |descendant::sect1[name(parent::*) != 'sect1'][1])[1]"/> @@ -842,6 +851,7 @@ |preceding::classset[1] |preceding::enumset[1] |preceding::prop[1] + |preceding::classtree[1] |preceding::classentry[1] |preceding::refentry[1] |preceding::enum[1] @@ -856,6 +866,7 @@ |ancestor::signal[1] |ancestor::classset[1] |ancestor::enumset[1] + |ancestor::classtree[1] |ancestor::classentry[1])[last()]"/> <xsl:variable name="next" @@ -868,6 +879,7 @@ |following::constructor[1] |following::method[1] |following::signal[1] + |following::classtree[1] |following::classentry[1] |following::refentry[1] |following::enum[1] @@ -883,6 +895,7 @@ |descendant::signal[1] |descendant::enumset[1] |descendant::classset[1] + |descendant::classtree[1] |descendant::classentry[1] |descendant::refentry[1] |descendant::part[1] @@ -1036,7 +1049,7 @@ </xsl:choose> </xsl:template> -<xsl:template match="enumset|classset|classentry|method|signal|prop|constructor|enum"> +<xsl:template match="enumset|classset|classtree|classentry|method|signal|prop|constructor|enum"> <xsl:call-template name="process-chunk-element"/> </xsl:template> http://cvs.php.net/diff.php/php-gtk-doc/stylesheets/html/autotoc.xsl?r1=1.5&r2=1.6&ty=u Index: php-gtk-doc/stylesheets/html/autotoc.xsl diff -u php-gtk-doc/stylesheets/html/autotoc.xsl:1.5 php-gtk-doc/stylesheets/html/autotoc.xsl:1.6 --- php-gtk-doc/stylesheets/html/autotoc.xsl:1.5 Tue Dec 30 18:43:45 2003 +++ php-gtk-doc/stylesheets/html/autotoc.xsl Sun Aug 1 12:41:29 2004 @@ -6,7 +6,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: autotoc.xsl,v 1.5 2003/12/30 23:43:45 sfox Exp $ + $Id: autotoc.xsl,v 1.6 2004/08/01 16:41:29 cweiske Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -89,6 +89,7 @@ <xsl:if test="$generate.component.toc != 0"> <xsl:variable name="nodes" select="section|sect1|sect2|refentry |classentry[@hide='0'] + |classtree |enums/enum[@hide='0'] |bridgehead[not(@renderas)] |.//bridgehead[@renderas='sect1']"/> @@ -266,8 +267,20 @@ </xsl:attribute> <xsl:apply-templates select="./enumname" mode="title" /> </a> + </xsl:element> +</xsl:template> + +<xsl:template match="classtree" mode="toc"> + <xsl:element name="{$toc.listitem.type}"> + <a> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"/> + </xsl:attribute> + <xsl:apply-templates select="./title" mode="title" /> + </a> </xsl:element> </xsl:template> + </xsl:stylesheet> http://cvs.php.net/diff.php/php-gtk-doc/stylesheets/common/en.xml?r1=1.8&r2=1.9&ty=u Index: php-gtk-doc/stylesheets/common/en.xml diff -u php-gtk-doc/stylesheets/common/en.xml:1.8 php-gtk-doc/stylesheets/common/en.xml:1.9 --- php-gtk-doc/stylesheets/common/en.xml:1.8 Sun Aug 1 07:56:24 2004 +++ php-gtk-doc/stylesheets/common/en.xml Sun Aug 1 12:41:29 2004 @@ -37,6 +37,7 @@ <template name="chapter" text="%t"/> <template name="classset" text="%t"/> <template name="classentry" text="%t"/> + <template name="classtree" text="%t"/> <template name="constructor" text="%t"/> <template name="enum" text="%t"/> <template name="enums" text="%t"/> http://cvs.php.net/diff.php/php-gtk-doc/reference.xml?r1=1.7&r2=1.8&ty=u Index: php-gtk-doc/reference.xml diff -u php-gtk-doc/reference.xml:1.7 php-gtk-doc/reference.xml:1.8 --- php-gtk-doc/reference.xml:1.7 Sat Jul 31 01:55:35 2004 +++ php-gtk-doc/reference.xml Sun Aug 1 12:41:29 2004 @@ -5,6 +5,7 @@ <classset id="gtkclasses"> <title>&GtkClasses;</title> <partintro>&GtkClassesDesc;</partintro> + >k.gtk-classtree; >k.gtkaccelgroup; >k.gtkaccellabel; >k.gtkadjustment;
http://cvs.php.net/diff.php/php-gtk-doc/stylesheets/html/class.xsl?r1=1.9&r2=1.10&ty=u Index: php-gtk-doc/stylesheets/html/class.xsl diff -u php-gtk-doc/stylesheets/html/class.xsl:1.9 php-gtk-doc/stylesheets/html/class.xsl:1.10 --- php-gtk-doc/stylesheets/html/class.xsl:1.9 Sun Aug 1 07:56:24 2004 +++ php-gtk-doc/stylesheets/html/class.xsl Sun Aug 1 12:41:29 2004 @@ -13,6 +13,7 @@ <div dir="rtl"> <xsl:apply-templates select="./title"/> <xsl:apply-templates select="./partintro"/> + <xsl:apply-templates select="./classtree" /> <xsl:call-template name="component.toc"/> </div> <xsl:apply-templates select="./classentry|./refentry"/> @@ -22,6 +23,7 @@ <div class="{name(.)}" id="{$id}"> <xsl:apply-templates select="./title"/> <xsl:apply-templates select="./partintro"/> + <xsl:apply-templates select="./classtree" /> <xsl:call-template name="component.toc"/> <xsl:apply-templates select="./classentry|./refentry"/> </div> @@ -60,6 +62,17 @@ <h1> <xsl:apply-templates /> </h1> + </xsl:template> + + <xsl:template match="classtree"> + <h2> + <xsl:copy-of select="title/node()" /> + </h2> + <pre class="classtree"> + <xsl:call-template name="classtree_display"> + <xsl:with-param name="classid"><xsl:value-of select="topclass" /></xsl:with-param> + </xsl:call-template> + </pre> </xsl:template> <!--========================================================================--> http://cvs.php.net/diff.php/php-gtk-doc/stylesheets/html/hierarchy.xsl?r1=1.6&r2=1.7&ty=u Index: php-gtk-doc/stylesheets/html/hierarchy.xsl diff -u php-gtk-doc/stylesheets/html/hierarchy.xsl:1.6 php-gtk-doc/stylesheets/html/hierarchy.xsl:1.7 --- php-gtk-doc/stylesheets/html/hierarchy.xsl:1.6 Sun Aug 1 07:56:24 2004 +++ php-gtk-doc/stylesheets/html/hierarchy.xsl Sun Aug 1 12:41:29 2004 @@ -208,4 +208,60 @@ </xsl:for-each> </xsl:template> + +<!-- + creates a class tree beginning from + one top class with all its subclasses +--> +<xsl:template name="classtree_display"> + <!-- class is the ID of the class, e.g. "gtk.gtkwidget"--> + <xsl:param name="classid"/> + <xsl:param name="indent"/> + + <!-- display the current class --> + <xsl:variable name="classname" select="/set/book/classset/classentry[@id=$classid]/classmeta/classtitle" /> + + <xsl:value-of select="$indent"/> + <xsl:text>+- </xsl:text> + <xsl:variable name="link"> + <xsl:call-template name="href.target"> + <xsl:with-param name="object" select="id($classid)"/> + </xsl:call-template> + </xsl:variable> + <span dir="ltr"> + <a> + <xsl:attribute name="href"> + <xsl:value-of select="$link" /> + </xsl:attribute> + <xsl:value-of select="$classname" /> + </a> + </span> + <br/> + + <!-- display all the other classes below the current one --> + <xsl:variable name="newindent"> + <xsl:value-of select="$indent"/> + <xsl:choose> + <xsl:when test="position() = last()"> + <xsl:text> </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>| </xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + + <xsl:for-each select="/set/book/classset/classentry[classmeta/classparent=$classname]"> + <xsl:call-template name="classtree_display"> + <xsl:with-param name="classid"> + <xsl:value-of select="@id" /> + </xsl:with-param> + <xsl:with-param name="indent"> + <xsl:value-of select="$newindent"/> + </xsl:with-param> + </xsl:call-template> + </xsl:for-each> + +</xsl:template> + </xsl:stylesheet> http://cvs.php.net/diff.php/php-gtk-doc/stylesheets/html/chunk-common.xsl?r1=1.6&r2=1.7&ty=u Index: php-gtk-doc/stylesheets/html/chunk-common.xsl diff -u php-gtk-doc/stylesheets/html/chunk-common.xsl:1.6 php-gtk-doc/stylesheets/html/chunk-common.xsl:1.7 --- php-gtk-doc/stylesheets/html/chunk-common.xsl:1.6 Sun Aug 3 13:54:08 2003 +++ php-gtk-doc/stylesheets/html/chunk-common.xsl Sun Aug 1 12:41:29 2004 @@ -97,6 +97,7 @@ <xsl:when test="name($node)='set'">1</xsl:when> <xsl:when test="name($node)='classset'">1</xsl:when> <xsl:when test="name($node)='enumset'">1</xsl:when> + <xsl:when test="name($node)='classtree'">1</xsl:when> <xsl:when test="name($node)='classentry'">1</xsl:when> <xsl:when test="name($node)='method'">1</xsl:when> <xsl:when test="name($node)='signal'">1</xsl:when> @@ -711,6 +712,7 @@ |preceding::classset[1] |preceding::enumset[1] |preceding::prop[1] + |preceding::classtree[1] |preceding::classentry[1] |preceding::refentry[1] |preceding::enum[1] @@ -725,6 +727,7 @@ |ancestor::signal[1] |ancestor::classset[1] |ancestor::enumset[1] + |ancestor::classtree[1] |ancestor::classentry[1])[last()]"/> <xsl:variable name="next" @@ -737,6 +740,7 @@ |following::constructor[1] |following::method[1] |following::signal[1] + |following::classtree[1] |following::classentry[1] |following::refentry[1] |following::enum[1] @@ -754,6 +758,7 @@ |descendant::signal[1] |descendant::classset[1] |descendant::enumset[1] + |descendant::classtree[1] |descendant::classentry[1] |descendant::reference[1] |descendant::refentry[1] @@ -777,6 +782,7 @@ |preceding::classset[1] |preceding::enumset[1] |preceding::prop[1] + |preceding::classtree[1] |preceding::classentry[1] |preceding::refentry[1] |preceding::enum[1] @@ -791,6 +797,7 @@ |ancestor::signal[1] |ancestor::classset[1] |ancestor::enumset[1] + |ancestor::classtree[1] |ancestor::classentry[1])[last()]"/> <xsl:variable name="next" @@ -803,6 +810,7 @@ |following::constructor[1] |following::method[1] |following::signal[1] + |following::classtree[1] |following::classentry[1] |following::refentry[1] |following::enum[1] @@ -820,6 +828,7 @@ |descendant::signal[1] |descendant::classset[1] |descendant::enumset[1] + |descendant::classtree[1] |descendant::classentry[1] |descendant::refentry[1] |descendant::sect1[name(parent::*) != 'sect1'][1])[1]"/> @@ -842,6 +851,7 @@ |preceding::classset[1] |preceding::enumset[1] |preceding::prop[1] + |preceding::classtree[1] |preceding::classentry[1] |preceding::refentry[1] |preceding::enum[1] @@ -856,6 +866,7 @@ |ancestor::signal[1] |ancestor::classset[1] |ancestor::enumset[1] + |ancestor::classtree[1] |ancestor::classentry[1])[last()]"/> <xsl:variable name="next" @@ -868,6 +879,7 @@ |following::constructor[1] |following::method[1] |following::signal[1] + |following::classtree[1] |following::classentry[1] |following::refentry[1] |following::enum[1] @@ -883,6 +895,7 @@ |descendant::signal[1] |descendant::enumset[1] |descendant::classset[1] + |descendant::classtree[1] |descendant::classentry[1] |descendant::refentry[1] |descendant::part[1] @@ -1036,7 +1049,7 @@ </xsl:choose> </xsl:template> -<xsl:template match="enumset|classset|classentry|method|signal|prop|constructor|enum"> +<xsl:template match="enumset|classset|classtree|classentry|method|signal|prop|constructor|enum"> <xsl:call-template name="process-chunk-element"/> </xsl:template> http://cvs.php.net/diff.php/php-gtk-doc/stylesheets/html/autotoc.xsl?r1=1.5&r2=1.6&ty=u Index: php-gtk-doc/stylesheets/html/autotoc.xsl diff -u php-gtk-doc/stylesheets/html/autotoc.xsl:1.5 php-gtk-doc/stylesheets/html/autotoc.xsl:1.6 --- php-gtk-doc/stylesheets/html/autotoc.xsl:1.5 Tue Dec 30 18:43:45 2003 +++ php-gtk-doc/stylesheets/html/autotoc.xsl Sun Aug 1 12:41:29 2004 @@ -6,7 +6,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: autotoc.xsl,v 1.5 2003/12/30 23:43:45 sfox Exp $ + $Id: autotoc.xsl,v 1.6 2004/08/01 16:41:29 cweiske Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -89,6 +89,7 @@ <xsl:if test="$generate.component.toc != 0"> <xsl:variable name="nodes" select="section|sect1|sect2|refentry |classentry[@hide='0'] + |classtree |enums/enum[@hide='0'] |bridgehead[not(@renderas)] |.//bridgehead[@renderas='sect1']"/> @@ -266,8 +267,20 @@ </xsl:attribute> <xsl:apply-templates select="./enumname" mode="title" /> </a> + </xsl:element> +</xsl:template> + +<xsl:template match="classtree" mode="toc"> + <xsl:element name="{$toc.listitem.type}"> + <a> + <xsl:attribute name="href"> + <xsl:call-template name="href.target"/> + </xsl:attribute> + <xsl:apply-templates select="./title" mode="title" /> + </a> </xsl:element> </xsl:template> + </xsl:stylesheet> http://cvs.php.net/diff.php/php-gtk-doc/stylesheets/common/en.xml?r1=1.8&r2=1.9&ty=u Index: php-gtk-doc/stylesheets/common/en.xml diff -u php-gtk-doc/stylesheets/common/en.xml:1.8 php-gtk-doc/stylesheets/common/en.xml:1.9 --- php-gtk-doc/stylesheets/common/en.xml:1.8 Sun Aug 1 07:56:24 2004 +++ php-gtk-doc/stylesheets/common/en.xml Sun Aug 1 12:41:29 2004 @@ -37,6 +37,7 @@ <template name="chapter" text="%t"/> <template name="classset" text="%t"/> <template name="classentry" text="%t"/> + <template name="classtree" text="%t"/> <template name="constructor" text="%t"/> <template name="enum" text="%t"/> <template name="enums" text="%t"/> http://cvs.php.net/diff.php/php-gtk-doc/reference.xml?r1=1.7&r2=1.8&ty=u Index: php-gtk-doc/reference.xml diff -u php-gtk-doc/reference.xml:1.7 php-gtk-doc/reference.xml:1.8 --- php-gtk-doc/reference.xml:1.7 Sat Jul 31 01:55:35 2004 +++ php-gtk-doc/reference.xml Sun Aug 1 12:41:29 2004 @@ -5,6 +5,7 @@ <classset id="gtkclasses"> <title>&GtkClasses;</title> <partintro>&GtkClassesDesc;</partintro> + >k.gtk-classtree; >k.gtkaccelgroup; >k.gtkaccellabel; >k.gtkadjustment;