User Tools

Site Tools


koda:en:documentation:appendice_koda_form_format

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

koda:en:documentation:appendice_koda_form_format [2014/07/10 10:47] (current)
Line 1: Line 1:
 +====== Format of Form Files ======
 +
 +The format of Koda's form (.kxf) files has been designed to be as simple as the powerful features of Koda will allow. It conforms to XML rules, so importing forms from, and exporting forms to, other applications is possible. Indeed, a code generator has been written to generate Corel PerfectScript dialogs from Koda form files.
 +
 +This page describes the .kxf file format. A general understanding of XML is assumed.
 +
 +**Note that:**
 +  * All tags and attribute names are case-sensitive
 +  * All property and component nodes must be present in every object, even if they are empty.
 +
 +#​remarks_header[Common structure]#
 +
 +<code xml>
 +<?xml version="​1.0"?>​
 +<object type="​type"​ name="​name">​
 +    <​properties>​
 +        <​property name="​name"​ vt="​vt">​
 +            ...
 +        </​property>​
 +    </​properties>​
 +    <​components>​
 +        <​object>​
 +            ...
 +            </​object>​
 +    </​components>​
 +</​object>​
 +</​code>​
 +
 +<color blue>. . .</​color>​ denotes a scalar value. It may also denote a list of strings or a collection: see below.
 +
 +#​remarks_header[object]#​
 +
 +<color blue>​object</​color>​ has two attributes:
 +
 +|type|classname of object, e.g. TALabel|
 +|name|unique name of object.|
 +
 +<color blue>​name</​color>​ is an application controlled attribute, so Koda's parser will not fix it if it is not unique! The only exception is an empty name: you can have any number of objects with an //empty name//.
 +
 +
 +#​remarks_header[property]#​
 +
 +<color blue>​property</​color>​ has two attributes:
 +
 +|name|name of the object property, e.g. Caption|
 +|vt |variant type, i.e. type of value|
 +
 +<color red>​vt</​color>​ is one of:
 +
 +|  |Binary|binary data (see below)|
 +|  |Collection|collection (see below)|
 +|  |Extended|floating point number (double precision)|
 +|  |False|boolean|
 +|  |Ident|object identifier|
 +|  |Int8|short 8-bit integer;|
 +|  |Int16|short 16-bit integer;|
 +|  |Int32|long 32-bit integer;|
 +|  |List|list of strings (see below)|
 +|  |Set|set of identifiers|
 +|  |Single|floating point number|
 +|  |String|ANSI string|
 +|  |True|boolean|
 +|  |UTF8String,​\\ WString|Unicode string, handled as ANSI string|
 +\\
 +#​remarks_header[Variant types requiring special handling]#
 +\\
 +**List of strings**
 +
 +__Example__:​ lines of Items property of a ListBox control
 +
 +<code xml>
 +<​property name="​Lines"​ vt="​List">​
 +    <​list>​
 +        <​li>​...</​li>​
 +        <​li>​...</​li>​
 +    </​list>​
 +</​property>​
 +</​code>​
 +
 +**Collection**
 +
 +__Example__:​ Column headings of a ListView control
 +
 +<code xml>
 +<​property name="​Columns"​ vt="​Collection">​
 +    <​collection>​
 +        <​item>​
 +            <​property name="​Caption"​ vt="​String">​Col 1</​property>​
 + </​item>​
 +        <​item>​
 +            <​property name="​Caption"​ vt="​String">​Col 2</​property>​
 +        </​item>​
 +    </​collection>​
 +</​property>​
 +</​code>​
 +
 +**Binary**
 +
 +__Example__:​ an icon
 +
 +<code xml>
 +<​property name="​Icon"​ vt="​Binary">​
 +    <​bin>​...</​bin>​
 +    <​bin>​...</​bin>​
 +</​property>​
 +</​code>​
 +
 +Binary data is split into 32-byte pieces and converted to hexadecimal,​ so every <color blue>. . .</​color>​ contains 64 hexadecimal symbols (except possibly the last one).
 +
  
koda/en/documentation/appendice_koda_form_format.txt ยท Last modified: 2014/07/10 10:47 (external edit)