Developer information

Chapter 5. Developer information

Richard Moore

Quanta Tag Dialog Definition XML

Introduction

This section describes the XML files used to define tags in the Quanta HTML editor. I believe the files are encoded as UTF 8. The files define both the attributes supported by a tag (I don't think this is used currently), and the layout and contents of the properties dialog Quanta shows for the tag.

Note

The encoding needs checking and should be specified in the XML files [rich]

Supported Elements and Attributes

The table below lists the elements currently supported in Quanta's tag definition files.

ElementDescription
TAGSTop level container tag
tagDefines the tag being described
attrDefine an attribute for the tag
locationSpecifies the location of a field in the dialog
tooltipSpecifies the tooltip for a field in the dialog
whatsthisSpecifies the 'Whats This' help for a field in the dialog
labelCreate a label
textDefine the text for a label or check box
itemsContainer element for defining lists
itemDefines an item in a list
spacerAdd a spacer to the dialog layout grid
TAGS

This is the root tag of the XML document. It has no attributes and should contain the definition of a single tag.

Note

Can I change this tag to be lower case for consistency with the others? [rich]

tag

Specifies the tag being defined.

AttributeDescription
nameSpecifies the name of the tag being defined. [required]
attr

Specifies an attribute. This element occurs once of each defined attribute and defines the name and type, it also contains additional tags that specify how this attribute should be displayed etc.

AttributeValueDescription
name Specifies the name of the attribute being defined. [required]
type Specifies the type of the attribute being defined. The value should be one of the following strings. [optional]
 inputSays the field supports free text entries (text field). [default]
 checkSays the value is boolean (check box).
 colorSays the value is a colour.
 urlSays the value is a url (Allows the user to specify a local file to refer to).
 listSays the value is an item from a specified list.
location

Specifies the position and size of a field in the dialog. This tag should occur once for each field in the dialog (ie. one for each attr and label tag). All the attributes must have integer values, and row/column indices start from 0.

AttributeDescription
rowSpecifies the row in the dialog layout of a field or label. [required]
colSpecifies the column in the dialog layout of a field or label. [required]
rowspanSpecifies the number of rows a field should span. [optional]
colspanSpecifies the number of columns a field should span. [optional]
label

Place a label in the dialog. The text is specified by a nested text tag.

text

Contains the text associated with a label. The label could be standalone, or it could be part of a widget such as a check box.

spacer

Defines a spacer in the layout of a tag dialog. The spacer orientation may be horizontal or vertical.

AttributeValueDescription
orientation Specifies the orientation of the spacer within the layout. [optional]
 hHorizontal [default]
 vVertical
items

A container tag that groups together the items in a list, it contains a bunch of item tags.

item

Contains the text for an item in a list.

tooltip

A tag containing the tool tip text for a field in the dialog.

Note

Currently only plain text is supported (you can't use any markup.

whatsthis

A tag containing the "What's This" text for a field in the dialog.

Note

Currently only plain text is supported (you can't use any markup.

Issues with the current format

For me, the current tag definition system has a number of problems:

  • Provides an inflexible UI

  • Makes the definition of the types associated with an attribute part of the specification of the GUI rather than of the data model.

  • i18n support

  • Support for multiple DTDs

KDE Logo