Widgets

QuickUI defines a set of widgets. The ones currently available are:

All widgets have two attributes that are required: id and text. The id attribute is a unique identifier, while the text attribute contains a description of the widget. Here is a screenshot of a GUI createad out of all the examples below.

file

Name Required Default Value Description
mode yes - open|save Open or save file dialog.
button no "Browse..." .* The text of the browse button.
filter no "" [a-z]+(\|[a-z]+)* A pipe (|) separated list of file extensions to show in the file dialog.
value no "" .* Default value for the widget.
dir no "" .* Start directory for the file dialog if default attribute is not specified.

Example:

<file id="doc" text="Input document" mode="open" button="Browse..."/>

checkbox

Name Required Default Value Description
value no "off" on|off Descides whether the checkbox should be checked at startup or not.

Example:

<checkbox id="doTask" text="Perform task" value="on"/>

radio

Each radio widget consists of a radio element containing one or more item elements. Each item element describes one radio item. The value of the radio widget is the id of the currently selected item.

Apart from the id and text attributes, the item element can have the following attribute:

Name Required Default Value Description
value no "off" on|off Descides whether the item should be selected at startup or not.

Example:

<radio id="fruit" text="Favorite fruit">
  <item id="apples" text="Apples"/>
  <item id="oranges" text="Oranges" value="on"/>
</radio>

text

Name Required Default Value Description
value no "" .* The default value of the widget.

Example:

<text id="field" text="Name" value="Mr. Smith"/>

textarea

Name Required Default Value Description
rows no "5" 1-100 The initial number of rows the textarea should occupy.

Example:

<textarea id="area" text="Description" rows="10"/>

spinbox

Name Required Default Value Description
value no "0" integer The initial value of the spinbox.
min no "0" integer The minimum value of the spinbox.
max no "100" integer The maximum value of the spinbox.

Example:

<spinbox id="box" text="Number of pins" min="0" max="50" value="22"/>

button

Example:

<button id="okButton" text="OK"/>