<chapter id="technical-reference">
<chapterinfo>

<authorgroup>
<author
> <firstname
>Eric</firstname
> <surname
>Bischoff</surname
> </author>
<othercredit role="translator"
><firstname
>Maren</firstname
><surname
>Pakura</surname
><affiliation
><address
><email
>maren@kde.org</email
></address
></affiliation
><contrib
>Deutsche Übersetzung</contrib
></othercredit>
</authorgroup>

<date
>2002-04-10</date>
<releaseinfo
>0.03.02</releaseinfo>

<keywordset>
<keyword
>KDE</keyword>
<keyword
>KTuberling</keyword>
<keyword
>Technische Referenz (in englisch)</keyword>
</keywordset>
</chapterinfo>

<title
>Technische Referenz (in englisch)</title>

<para
> &ktuberling; offers a gentle and rewarding introduction to &kde; customization and programming. The application can be extended. For example, without any coding, new playgrounds can be added by changing the graphics files. By adding appropriate sound files, translators can change the sounds to their native tongue! </para>

<para
> If you extend or add to the game please consider sending your additions to the developer <ulink url="mailto:e.bischoff@noos.fr"
>Eric Bischoff</ulink
> for inclusion in future releases. </para>

<sect1 id="for-artists">
<title
>For artists</title>

<para
>  </para>

<para
>  </para>

<para
> The first type of images, <filename
>*-game.png</filename
> holds the playground and the objects that the user selects. This is the graphic that the user sees when playing the game. </para>

<para
> The second type of images, <filename
>*-mask.png</filename
>, contains only masks of the objects. The masks are used to delimit the borders of the objects and, in some cases, give the object some transparancy (for example, the spectacles). It is mandatory to put the objects at the same position in the gameboard file as in the mask file. </para>

<para
>  </para>

<para
> Still in the same directory, a file named <filename
>layout.i18n</filename
> (<filename
>$KDEDIR/share/apps/ktuberling/pics/layout.xml</filename
>) recapitulates the strings in <filename
>layout.xml</filename
> that can be translated: <itemizedlist
> <listitem
><para
></para
></listitem
> <listitem
><para
>The names of the categories of objects</para
></listitem
> </itemizedlist
> </para>

<para
>  </para>

</sect1>

<sect1 id="for-translators">
<title
>Translation</title>

<para
> Besides the usual <literal role="extension"
>.po</literal
> files mechanism for translating program labels and prompts, the sounds can be localized too. </para>

<para
>  </para>

<para
> In a future release, &ktuberling; will use OGG Vorbis rc3 file format for sounds. At that moment, it will be possible to convert the WAV files to OGG Vorbis rc3 through the following command line: <screen>
<prompt
>$</prompt
> <userinput
>oggenc_rc3 -o <replaceable
>sound.ogg</replaceable
> <replaceable
>sound.wav</replaceable
></userinput>
</screen
> </para>

<para
> Information on how to work with the translation mechanisms in &kde; is available in <ulink url="http://i18n.kde.org/translation-howto/index.html"
>The KDE Translation HOWTO</ulink
>. </para>

</sect1>

<sect1 id="for-programmers">

<title
>For programmers</title>
<para
>&ktuberling; isn't really difficult to extend for programmers.</para>

<sect2 id="classes">
<title
>C++ classes</title>

<variablelist
> <varlistentry
> <term
><classname
>TopLevel</classname
></term
> <listitem
> <para
>Top-level window and basic program management</para
> </listitem
> </varlistentry
> <varlistentry
> <term
><classname
></classname
></term
> <listitem
> <para
></para
> </listitem
> </varlistentry
> <varlistentry
> <term
><classname
>ToDraw</classname
></term
> <listitem
> <para
>Description of one of the graphical <quote
>objects</quote
> to be drawn</para
> </listitem
> </varlistentry
> <varlistentry
> <term
><classname
></classname
></term
> <listitem
> <para
></para
> </listitem
> </varlistentry
> <varlistentry
> <term
><classname
></classname
></term
> <listitem
> <para
></para
> </listitem
> </varlistentry
> </variablelist>

</sect2>

<sect2 id="files-structure">
<title
><literal role="extension"
>.tuberling</literal
> files structure</title>

<para
>A <literal role="extension"
>.tuberling</literal
> file holds all the necessary data to redraw a tuberling. It can be edited with an ordinary text editor.</para>

<para
>The first line holds the number of the playground.</para>

<para
>On all other lines, there is one graphical object per line, in the order that is used to draw them. Each line contains 5 numbers: the identifier of the object, and the rectangle where it should be drawn (left, top, right, bottom). The numbers are separated by whitespaces.</para>

</sect2>
</sect1>

<sect1 id="layout-details">
<title
>Structure of the layout file (<filename
>layout.xml</filename
>)</title>

<para
>  </para>

<para
> The <markup
>&lt;playground&gt;</markup
> tag has two attributes: <markup
>gameboard</markup
> and <markup
>masks</markup
>. These attributes give the name of the files holding the pictures. The <markup
>&lt;playground&gt;</markup
> tag also contains one <markup
>&lt;menuitem&gt;</markup
> tag, one <markup
>&lt;editablearea&gt;</markup
> tag, several <markup
>&lt;category&gt;</markup
> tags, and several <markup
>&lt;object&gt;</markup
> tags. </para>

<para
> The <markup
>&lt;menuitem&gt;</markup
> tag describes the action identifier of the menu item allowing to select position of the area where you can drop objects, and the label of this menu item. This action identifier should be identical to the one in <filename
>ktuberlingui.rc</filename
>. </para>

<para
>  </para>

<para
> The <markup
>&lt;category&gt;</markup
> tag describes the position and the label of a text describing a group of objects. For example, it can describe the position and the text of the group of <quote
>goodies</quote
>. </para>

<para
>  </para>

<para
>  </para>

<para
> The lower level tags are not explained here, since their meaning is quite straightforward. If you modify <filename
>layout.xml</filename
>, don't forget to modify <filename
>layout.i18n</filename
> and <filename
>ktuberlingui.rc</filename
> accordingly. </para>

</sect1>
</chapter>



