RE: [PHP-GTK-DOC] Attempted understanding of the docs structure

From: Date: Fri, 23 Jul 2004 15:29:47 +0000
Subject: RE: [PHP-GTK-DOC] Attempted understanding of the docs structure
References: 1  Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-918@lists.php.net to get a copy of this message
I used to have more or less the same template on a website for new doccers, only at that point there weren't any. Don't know what happened to the site, manucorp.com used to host it (and no, I no longer have the original). NB this is why it's a good idea to keep all php.net-related material on php.net servers. :I Yep, looks right, Scott. The constructor is exactly the same as a method, except that there isn't a return type. In the GTK section, constructor return types would always be 'GtkWidget' or else the name of that specific widget - I can't remember why we didn't have them, possibly it was felt to be too confusing for non-programmer readers. The 'one-liners' turn up as index page descriptions, and need to be short enough so they don't wrap. The 'ro' flag denotes a 'read only' property. These are probably all over the shop in the existing documentation, largely because at the time I wrote most of it I didn't actually know what a 'read-only property' was. (Andrei had the hardest of hard times explaining what 'void' meant, back then..) Go for it :) - Steph > -----Original Message----- > From: Scott Mattocks [mailto:scott@crisscott.com] > Sent: 23 July 2004 14:29 > To: php-gtk-doc@lists.php.net > Subject: [PHP-GTK-DOC] Attempted understanding of the docs structure > > > I have been pouring over the docs in CVS for a while now and I want to > make sure that I understand the basics of the DocBook files. Here is my > version of a widget doc template. I know all the classes already have > doc pages that just need to be edited but I figure that if I can build > one from scratch then editing should be no problem. Please let me know > if I have the idea right. (The signals section is a little confusing.) > > From what I understand, one XML file is turned into many doc pages. > There will be one page for the class description (the classmeta > section), one page for the constructor (the constructor section), one > page for each entry in the signals, properties and methods sections. > > Thanks, > Scott Mattocks > > <?xml version="1.0" encoding="ISO-8859-1" ?> > <classentry id="gtk.widget"> > <classmeta> > <classtitle>WidgetName</classtitle> > <classparent>ParentWidgetName</classparent> > <shortdesc> > A one-liner that breifly describes the widget's purpose. > </shortdesc> > <desc> > A longer description that gives more details, such as why you would > want to use the widget in the first place. > </desc> > </classmeta> > > <constructor id="gtk.widgetname.constructor"> > <funcsynopsis> > <funcprototype> > <funcdef> > <function>ConstructorName</function> > </funcdef> > <paramdef> > <classname>ParameterType</classname> > <parameter>ParameterName</parameter> > </paramdef> > </funcprototype> > </funcsynopsis> > <shortdesc> > Creates a new instance of this class. > </shortdesc> > <desc> > A description of what the constructor does. > Should contain a description of what each parameter is for. > Might also contain a usage example. > </desc> > </constructor> > > <methods> > <method id="gtk.widgetname.method.method_name"> > <funcsynopsis> > <funcprototype> > <funcdef>return type > <function>method_name</function> > </funcdef> > <paramdef>Parameter type > <parameter>parameter_name</parameter> > </paramdef> > </funcprototype> > </funcsynopsis> > <shortdesc> > A one-liner describing the what the method does. > </shortdesc> > <desc> > A full description goes here. > All parameters should be described. > <example> > <title>A usage example goes here.</title> > <programlist role="php"> > <![CDATA > PHP code here > ]]> > </programlist> > </example> > </desc> > </method> > </methods> > > <properties> > <prop id="gtk.widgetname.property.property_name" type="ro"> > <!-- I don't know what type="ro" is for --> > <propname>property_name</propname> > <proptype>property_type</proptype> > <shortdesc> > One-line description of what the property is for > </shortdesc> > <desc> > A long description of what the property is for and why you would > want to use it. > </desc> > </prop> > </properties> > > <signals> > <signal id="gtk.widgetname.signal.signal-name"> > <signalname>signal-name</signalname> > <funcsynopsis> > <funcprototype> > <funcdef> > return_type <cbfunction>callback</cbfunction> > </funcdef> > <paramdef> > <classname>GtkWidgetName</classname> widgetname > </paramdef> > </funcprototype> > </funcsynopsis> > <shortdesc> > A one-liner about what the signal does > </shortdesc> > <desc> > A long description about the signal. > </desc> > </signal> > </signals> > </classentry> > > -- > PHP-GTK Documentation Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.gtk.doc (#918) next »