This is a work in progress. I would love it if people sent me patches for the docs. Browse the code for more documentation. There is also documentation in the ~/uigtk directory before each function on what options can be in the xml file.
bond.dtd is an (almost) complete specification for the bond xml format, and clearly defines the bond's markup structure.
The widgets are all based around the GTK widget toolkit. If you are not familiar with GTK then I recommend you read their tutorial and api reference guide as the naming, properties and layout of widgets is closely based around their standards. http://www.gtk.org
Most widgets and dbobjects can have names specified for
them. This is by putting a name attribute into an element. Ie:
<window name="nameofthiswindow">
I have not mentioned the name attribute in the following listing, but it can be specified. If it isn't specified, however, the parser will make up a name for the widget.
The name of a widget is important because it is used to reference that widget or database object for api calls, database sources etc. A longname attribute is inserted automatically by the parser. The longname attribute should not be manually specified. It contains the full path of the widget as well as the name.
Creates a window/form widget. This may only contain one child, though for example this can be a <box> which contains many widgets. A window element can only occur under a <bond> element. The attribute visible defaults to false, so if you want it visible you must specify "true" here.
<window name="givenname" title="Window Title" visible="true"> <vbox> ... </vbox> </window>
Creates a tabled box which can contain many other widgets, under GTK its called GtkTable. Boxes can be contained within boxes.
The size of the box needs to be specified in attributes. The only child elements of a box are cells. This is the container widget for other widgets and can further describe the layout of widgets within it.
<box columns="2" rows="6"> <cell xpos="0" ypos="0"> <label>hello</label> </cell> <cell xpos="1" ypos="0"> <entry>...</entry> </cell> ... </box>
A cell may be in a box, vbox or hbox. The attributes available to it are different in the vbox and hbox.
<vbox> <cell fill="true" expand="true" shirk="false"> <box columns="4" rows="3"> <cell xpos="0" ypos="0"> ... </cell> ... </box> </cell> </vbox>
A database object. This can be included as a child to any widget, though it normally is used under <window>.
<dbobject name="sales"> <sql> SELECT id, qty, amount FROM sales ORDER BY date </sql> </dbobject>
Specifies a link to a database field. If no <dbobjectsrc> is stated it will recursively look up its widget path for a <dbobjectsrc> or dbobject in one of its parents. So if a dbobject is specified in the window the field occurs it will use that if no dbobjectsrc is states.
<entry name="TextDataEntryBox1"> <field>tablefieldname</field> </entry>
If you're using a <dbobject> where the contents is reasonably static you can cache it using the <cache /> with a <lookup> element to speed up draw times.
Dropdown boxes with lookups can have dynamically changing contents. So you can have a dynamic dropdown list based on other widgets or fields present. An example of this would be a drill down approach with 2 dropdown boxes, where one dominates the contents of the other drop down box.
A primary field can be specified in a <lookup>. This is in case you don't want to save the value your displaying in the list, but an alternative primary key value instead. You use the <primary> tag in the <lookup> to specify what field it will be. An example is if you would like to display the name value for a group of objects, but save an id value associated with the item.