![]() |
Houdini Development Toolkit - Version 6.5Side Effects Software Inc. 2004 |
The purpose of ui files in Houdini is to create the interface components and specify some of the connections between components and the application. Creating components also implies what we refer to as "laying them out" or defining their size and position relative to each other. The ui grammar uses keywords and tokens to define the interface components and specify their attributes. Keywords that specify a type of something or an attribute name are usually all upper case whereas keywords that specify a value are usually all lower case (there may be exceptions to these rules).
The statements within a ui file are one of two types, either an interface component definition or a command. User interface components fall into two main categories which we refer to as containers and primitive gadgets. Containers are basically collections of primitive gadgets and/or other containers.
<container type> { <attributes> <contents> }
The components within a container are often referred to as children of the container while the container is the parent of the contents.
The container type may be left out completely, in which case the braces imply just a simple container with no special behaviour. The most important container types are:
KEYWORD [parameters] <attributes> ;
Note the semi-colon at the end of a primitive gadget definition which is mandatory. Attributes are always optional and are discussed below. A given primitive keyword may or may not have parameters associated with it which are positional and thus must be given in the correct order.
It is beyond the scope of this document to list all possible gadgets and their parameters. Many of the important ones may be inferred by examination. For the purposes of dialog customization it should be sufficient to concentrate on some of the key component attributes.
LAYOUT( <layout> )The <layout> is one of:
The '>' suffix implies a right and/or top justification layout.
The '%' suffix implies a centered justification.
No suffix implies the default of left and/or bottom justification.
The attribute:
STRETCH(h, v)takes h and v as boolean values (zero or one) and indicates whether or not the component will be allowed to stretch in the horizontal and/or vertical directions.
The attribute:
SIZE(h, v)where h and v are floating point expressions, specifies the size of a gadget in inches. If either is zero then the size will be computed using the layout rules. Note that layout rules may still override the size specified, especially if the gadget is stretchable or if the container has a conforming layout.
The attribute:
MOVE(h, v)where h and v are floating point expressions, specifies the location of a gadget within it's parent in units of inches. Note that positioning of gadgets usually only applies if the parent container has a layout of "none" since the layout rules will override a manual position specification.
The attribute:
MARGIN(border, spacing)where border and spacing are floating point expressions, specifies the amount of border space to place within the outer edges of a container and the inter-gadget spacing to use between contents. Both are specified in inches.
The attribute:
DISABLEDwill disable the corresponding gadget.
The attribute:
LOOK(...)takes several different forms and is used to specify the what the gadget looks like. Please see examples of it's usage if you need to change details of a gadgets look.
The attributes:
VALUE(name) SCROLLVALUE(name[, name])are critical for connecting gadgets to other gadgets and to the application code. Existing value names should never be modified else one risks disabling the dialog.