Sophie

Sophie

distrib > Mandriva > 9.1 > i586 > by-pkgid > 3d47dbc756f389838269ea370c070090 > files > 710

quanta-3.1-19mdk.i586.rpm

<chapter id="advanced-quanta">
<title>&quanta; Advanced Features</title>
<para>This chapter outlines the advanced features of &quanta;.</para>

<sect1 id="kommander">
<title>Using <application>Kommander</application> with &quanta;</title>
<para>Kommander by Marc Britton.</para>
</sect1>

&debugging-quanta;

<sect1 id="tag-files">
<title>&quanta; Tag Files</title>
<para>&quanta; uses tag files to define the various actions that are available for toolbar association.  These tag files can define
a simple tag with no attributes or they can define a tag dialog box that will remember all of the available attributes for you so
that you can simply fill in the blanks.</para>
<important>
<para>Spaces don't adversely affect anything, but watch out for &amp; and &lt; characters.
These should likely be replaced by &amp;amp; and &amp;lt; respectively in all of the xml
based &quanta; resource files. This won't cause a crash, but you'll have chunks of your
work disappear if you forget.</para>
</important>
<sect2 id="tag-file-structure">
<title>Tag File Structure</title>
<sect3>
<title></title>
<para>Possible entries for the type attribute of the attr tag:
To get a list of possible types, I did the following against the tag dirs:
grep -h type= *.tag |sed -e 's/^.*type=\"\([a-z]*\).*/\1/'| sort |uniq</para>
<para>These are the types for tag dialog items:
<simplelist><member>check</member>
<member>color</member>
<member>input</member>
<member>list</member>
<member>text</member>
<member>url</member>
</simplelist>
</para>
<para>
These are the argument types inside the php function tags, ask Andras if
these are pretty much free form and the former are keywords:
<simplelist>
<member>array</member>
<member>bool</member>
<member>boolean</member>
<member>char</member>
<member>constant</member>
<member>flags</member>
<member>float</member>
<member>function</member>
<member>int</member>
<member>long</member>
<member>mixed</member>
<member>number</member>
<member>object</member>
<member>resource</member>
<member>resoure</member>
<member>string</member>
</simplelist>
</para>
<para>The tag definition has the following optional attributes:
<variablelist>
<varlistentry>
<term>hasScript</term>
<listitem><para>"1" if common events/scripts can be associated to this tag (onclick etc.)</para></listitem>
</varlistentry>
<varlistentry>
<term>hasCore</term>
<listitem><para>"1" if common core attributes are present (id, class, etc)</para></listitem>
</varlistentry>
<varlistentry>
<term>hasI18n</term>
<listitem><para>"1" if common i18n attributes are present (lang, dir)</para></listitem>
</varlistentry>
<varlistentry>
<term>single </term>
<listitem><para>"1" if it is a single tag (eg. &lt;hr>)</para></listitem>
</varlistentry>
<varlistentry>
<term>optional </term>
<listitem><para>"1" if it is an optional tag (eg. &lt;colgroup>)</para></listitem>
</varlistentry>
<varlistentry>
<term>returnType</term>
<listitem><para>for scripting languages, the function return type if any. (eg int)</para></listitem>
</varlistentry>
</variablelist>
</para>

<para>
The &lt;attr> definition can have the following attributes:
<variablelist>
<varlistentry>
<term>defaultValue</term><listitem><para>the default value of the tag  ???</para></listitem>
</varlistentry>
<varlistentry>
<term>status</term>
<listitem><para>can be <quote>optional</quote>, <quote>required</quote>, <quote>implied</quote></para></listitem>
</varlistentry>
</variablelist>
</para>
</sect3>
<sect3>
<sect3info>
<author>
<firstname></firstname>
<surname></surname>
</author>
</sect3info>
<title></title>
<para>
For scripting language functions, define tag files as such:
<informalexample>
<literallayout>
&lt;!DOCTYPE tags>
&lt;tags>

&lt;tag name=<quote>[function-name]</quote> type=<quote>function</quote> returnType=<quote>[return-type]</quote>>
  &lt;attr name=<quote>[argument1]></quote> type=<quote>[argument1-type]</quote>>&lt;/attr>
  &lt;attr name=<quote>[argument2]</quote> type=<quote>[argument2-type]</quote> status=<quote>optional</quote>>&lt;/attr>
    ...
&lt;/tag>
&lt;tag ...
...
&lt;/tag>
 ...
&lt;/tags>
</literallayout>
</informalexample>
</para>
<para>
Items in [] are to be substituted.  argument1 above is required and argument2 is optional.
</para>
<para>
A tag file that you want to have tag dialog editing of should look like this:
<informalexample>
<programlisting>
<markup>
&lt;!DOCTYPE tags>
&lt;tags>
  &lt;tag name="[name] [hasCore="[01]" hasI18n="[01]" hasScript="[01]"]>
    &lt;attr name="[attribute1]" type="[check|color|input|list|text|url]">
      &lt;text>&lt;/text>
      &lt;textlocation col="0" row="0" />
      &lt;tooltip>&lt;/tooltip>
      &lt;location col="1" row="0" colspan="3"/>
    &lt;/attr>
  ...
  &lt;/tag>
  ...
&lt;/tags>
</markup>
</programlisting>
</informalexample>
</para>

<para>
&lt;text>&lt;/text> defines brief descriptive text for the object.
</para>
<para>
&lt;textlocation ... /> defines row and column layout for &lt;text> tag.
</para>
<para>
&lt;tooltip>&lt;/tooltip> is text description for a hovering user.
</para>
<para>
&lt;location ../> defines the location of the object for that attribute.
</para>
<para>
All the attributes must be enumarated in the tag file. If you don't want to
appear in the tagdialog, just forget the &lt;location> tag. eg &lt;attr ...> &lt;/attr>
</para>
</sect3>
</sect2>
</sect1>

</chapter>