Crazy Eddies GUI System  0.7.7
Falagard XML Element Reference

The following pages contain reference material for the XML elements defined for the Falagard skin definition files.

Section Contents

Overview
<AbsoluteDim> Element
<Area> Element
<AreaProperty> Element
<Child> Element
<ColourProperty> Element
<ColourRectProperty> Element
<Colours> Element
<Dim> Element
<DimOperator> Element
<Falagard> Element
<FontDim> Element
<FontProperty> Element
<FrameComponent> Element
<HorzAlignment> Element
<HorzFormat> Element
<HorzFormatProperty> Element
<Image> Element
<ImageDim> Element
<ImageryComponent> Element
<ImageProperty> Element
<ImagerySection> Element
<Layer> Element
<NamedArea> Element
<Property> Element
<PropertyDefinition> Element
<PropertyLinkDefinition> Element
<PropertyLinkTarget> Element
<PropertyDim> Element
<Section> Element
<StateImagery> Element
<Text> Element
<TextComponent> Element
<TextProperty> Element
<UnifiedDim> Element
<VertAlignment> Element
<VertFormat> Element
<VertFormatProperty> Element
<WidgetDim> Element
<WidgetLook> Element

Overview

The reference for each element is arranged into sections, as described below:

Purpose:

This section describes what the elements general purpose is within the specifications.

Attributes:

This section describes available attributes for the elements, and whether they are required or optional.

Usage:

Describes where the element may appear, whether the element may have sub-elements, and other important usage information.

Examples:

For many elements, this section will contain brief examples showing the element used in context.

<AbsoluteDim> Element

Purpose:

The <AbsoluteDim> element is used to define a component dimension for an area rectangle. <AbsoluteDim> is used to specify absolute pixel values for a dimension.

Attributes:

Usage:

Examples:

The following shows <AbsoluteDim> used to define an area rectangle. In the example, all four component dimensions of the area rectangle are specified using <AbsoluteDim>:

<Area>
<Dim type="LeftEdge" >
<AbsoluteDim value="10" />
</Dim>
<Dim type="TopEdge" >
<AbsoluteDim value="50" />
</Dim>
<Dim type="Width" >
<AbsoluteDim value="290" />
</Dim>
<Dim type="Height" >
<AbsoluteDim value="250" />
</Dim>
</Area>

The following shows <AbsoluteDim> in use as part of a dimension calculation sequence. In the example the left edge is being set to the width of the child widget 'myWidget' minus two pixels:

<Area>
<Dim type="LeftEdge" >
<WidgetDim widget="myWidget" dimension="Width" >
<DimOperator op="Subtract" >
<AbsoluteDim value="2" />
</DimOperator>
</WidgetDim>
</Dim>
...
</Area>

Finally, we see <AbsoluteDim> as the starting dimension for a dimension calculation sequence. In the example, we are adding the value of some window property to the starting absolute value of six:

<Area>
...
<Dim type="Height" >
<AbsoluteDim value="6">
<DimOperator op="Add" >
<PropertyDim name="someHeightProperty" />
</DimOperator>
</AbsoluteDim>
</Dim>
</Area>

<Area> Element

Purpose:

The <Area> element is a simple container element for the <Dim> dimension elements, or a single <AreaProperty> element, in order to form a rectangular area. <Area> is generally used to define target regions which are to be used for rendering imagery, text, to place a component child widget, or to form 'named' areas required by the base widget.

Attributes:

<Area> has no attributes.

Usage:

Examples:

In this example we can see a named area being defined:

<NamedArea name="exampleArea" >
<Area>
<Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
<Dim type="Width"><UnifiedDim scale="1.0" /></Dim>
<Dim type="Height"><UnifiedDim scale="1.0" /></Dim>
</Area>
</NamedArea>

<AreaProperty> Element

Purpose:

The <AreaProperty> element is intended to allow the system to access a property on the target window to obtain the final target area of a component being defined.

Attributes:

Usage:

Examples:

<Child> Element

Purpose:

The <Child> element defines a component widget that will be created and added to each instance of any window using the <WidgetLook> being defined. Some base widgets have requirements for <Child> element definition that must be provided.

Attributes:

Usage:

Note: the sub-elements should appear in the order that they are defined here.

Examples:

In this example, taken from TaharezLook.looknfeel, we see how the title bar child widget required by the frame window type is defined:

<WidgetLook name="TaharezLook/FrameWindow">
...
<Child type="TaharezLook/Titlebar" nameSuffix="__auto_titlebar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" >
<FontDim type="LineSpacing">
<DimOperator op="Multiply">
<AbsoluteDim value="1.5" />
</DimOperator>
</FontDim>
</Dim>
</Area>
<Property name="AlwaysOnTop" value="False" />
</Child>
...
</WidgetLook>

<ColourProperty> Element

Purpose:

The <ColourProperty> element is intended to allow the system to access a property on the target window to obtain colour information to be used when drawing some part of the component being defined.

Attributes:

Usage:

Examples:

The following example, listing imagery for a button in the "Normal" state, shows the <ColourProperty> element in use to specify a property where colours to be used when rendering the ImagerySection named 'label' can be found:

<StateImagery name="Normal">
<Layer>
<Section section="normal" />
<Section section="label">
<ColourProperty name="NormalTextColour" />
</Section>
</Layer>
</StateImagery>

<ColourRectProperty> Element

Purpose:

The <ColourRectProperty > element is intended to allow the system to access a property on the target window to obtain colour information to be used when drawing some part of the component being defined.

Attributes:

Usage:

Examples:

...
<StateImagery name="SpecialState">
<Layer>
<Section section="special_main">
<ColourRectProperty name="SpecialColours" />
</Section>
</Layer>
</StateImagery>
...

<Colours> Element

Purpose:

The <Colours> element is used to explicitly specify values for a ColourRect that should be used when rendering some part of the component being defined.

Attributes:

Usage:

Examples:

In this example, we see the <Colours> element used to specify the value 'FFFFFF00' as the colour for all four corners of the colour rect to be used when rendering the image being defined:

...
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><AbsoluteDim value="12" /></Dim>
<Dim type="Height" ><AbsoluteDim value="24" /></Dim>
</Area>
<Image imageset="newImageset" image="FunkyComponent" />
<Colours
topLeft="FFFFFF00"
topRight="FFFFFF00"
bottomLeft="FFFFFF00"
bottomRight="FFFFFF00"
/>
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
...

<Dim> Element

Purpose:

The <Dim> element is intended as a container element for a single dimension of an area rectangle.

Attributes:

Usage:

Examples:

<DimOperator> Element

Purpose:

The <DimOperator> element allows you to combine two of the specialised dimension specifier elements via a simple mathematical operator. Since the dimension used as the second operand may also contain a <DimOperator> it is possible to create quite complex operations.

Of important note is the fact that in a large chain of operations, the calculations are done in reverse order. Also, there is no operator precedence as such, all operations are applied linearly.

Attributes:

Usage:

Examples:

The following multiplies two simple AbsoluteDim dimensions:

...
<AbsoluteDim value="10">
<DimOperator op="Multiply">
<AbsoluteDim value="4" />
</DimOperator>
</AbsoluteDim>
...

The next example takes the height of the font used for the target window, adds four pixels and multiplies the result by two.

Note the effectively reversed order and lack of 'normal' operator precedence, the operation performed will be:

$ (2 {*} (4 + LineSpacing)) $

and not:

$ ((2 {*} 4) + LineSpacing) $

...
<AbsoluteDim value="2">
<DimOperator op="Multiply">
<AbsoluteDim value="4">
<DimOperator op="Add">
<FontDim type="LineSpacing" />
</DimOperator>
</AbsoluteDim>
</DimOperator>
</AbsoluteDim>
...

<Falagard> Element

Purpose:

The <Falagard> element is the root element in Falagard XML skin definition files. The element serves mainly as a container for <WidgetLook> elements

Attributes:

Element <Falagard> has no attributes.

Usage:

Examples:

Here we just see the general structure of a Falagard XML file, notice that the <Falagard> element just serves as a container for multiple <WidgetLook> elements:

<?xml version="1.0" ?>
<Falagard>
<WidgetLook name="TaharezLook/Button">
...
</WidgetLook>
<WidgetLook ... >
...
</WidgetLook>
...
</Falagard>

<FontDim> Element

Purpose:

The <FontDim> element is used to take some measurement of a Font, and use it as a dimension component of an area rectangle.

Attributes:

Usage:

Examples:

This first example just gets the line spacing for the window's current font:

<Dim type="Height">
<FontDim type="LineSpacing" />
</Dim>

Now we take an extents measurement of the windows current text, using a specified font, and pad the result by ten pixels:

<Dim type="Width">
<FontDim type="HorzExtent" font="Roman-14" padding="10" />
</Dim>

<FontProperty> Element

Purpose:

The <FontProperty> element is intended to allow the system to access a property on the target window to obtain the font to be used when rendering the TextComponent being defined.

Attributes:

Usage:

Examples:

<FrameComponent> Element

Purpose:

The <FrameComponent> element is used to define an imagery frame using a maximum of eight images for the corners and edges, and a single, formatted, image for the background. Any of the images may be omitted if not required.

Attributes:

No attributes are currently defined for the <FrameComponent> element.

Usage:

Note: the sub-elements should appear in the order that they are defined here.

Examples:

The following defines a full frame and background. It is taken from the TaharezLook skin specification for the Listbox widget:

<FrameComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Image type="TopLeftCorner"
imageset="TaharezLook" image="ListboxTopLeft"
/>
<Image type="TopRightCorner"
imageset="TaharezLook" image="ListboxTopRight"
/>
<Image type="BottomLeftCorner"
imageset="TaharezLook" image="ListboxBottomLeft"
/>
<Image type="BottomRightCorner"
imageset="TaharezLook" image="ListboxBottomRight"
/>
<Image type="LeftEdge"
imageset="TaharezLook" image="ListboxLeft"
/>
<Image type="RightEdge"
imageset="TaharezLook" image="ListboxRight"
/>
<Image type="TopEdge"
imageset="TaharezLook" image="ListboxTop"
/>
<Image type="BottomEdge"
imageset="TaharezLook" image="ListboxBottom"
/>
<Image type="Background"
imageset="TaharezLook" image="ListboxBackdrop"
/>
</FrameComponent>

<HorzAlignment> Element

Purpose:

The <HorzAlignment> element is used to specify the horizontal alignment option required for a child window element.

Attributes:

Usage:

Examples:

This example defines a scrollbar type child widget. We have used the <HorzAlignment> element to specify that the scrollbar appear on the far right edge of the component being defined:

...
<Child type="MyLook/VertScrollbar" nameSuffix="__auto_vscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><AbsoluteDim value="15" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<HorzAlignment type="RightAligned" />
</Child>
...

<HorzFormat> Element

Purpose:

The <HorzFormat> element is used to specify the required horizontal formatting for an image, frame, or text component.

Attributes:

Usage:

Examples:

This first example shows an ImageryComponent definition. We use <HorzFormat> to specify that we want the image stretched to cover the entire width of the designated target area:

...
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><AbsoluteDim value="25" /></Dim>
<Dim type="Height" ><AbsoluteDim value="25" /></Dim>
</Area>
<Image imageset="myImageset" image="coolImage" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
...

This second example is for a TextComponent. You can see <HorzFormat> used here to specify that we want the text centred within the target area, and word-wrapped where required:

<TextComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<HorzFormat type="WordWrapLeftAligned" />
</TextComponent>

<HorzFormatProperty> Element

Purpose:

The <HorzFormatProperty> element is intended to allow the system to access a property on the target window to obtain the horizontal formatting to be used when drawing the component being defined.

Attributes:

Usage:

Examples:

<Image> Element

Purpose:

The <Image> element is used to specify an Imageset and Image pair, and for FrameComponent images, how the image is to be used.

Attributes:

Usage:

Examples:

Here you can see the <Image> element used to specify the image to render for an ImageryComponent being defined:

...
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><AbsoluteDim value="15" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
</Area>
<Image imageset="FunkyLook" image="ButtonIcon" />
<VertFormat type="CentreAligned" />
<HorzFormat type="CentreAligned" />
</ImageryComponent>
...

<ImageDim> Element

Purpose:

The <ImageDim> element is used to define a component dimension for an area rectangle. <ImageDim> is used to specify some dimension of an image for use as an area dimension.

Attributes:

Usage:

Examples:

This example shows a dimension that uses <ImageDim> to fetch the width of a specified image for use as the dimensions value:

...
<Area>
<Dim type="LeftEdge">
<ImageDim imageset="myImages" image="leftImage" dimension="Width" />
</Dim>
...
</Area>
...

<ImageryComponent> Element

Purpose:

The <ImageryComponent> element defines a single image to be drawn within a given ImagerySection. The ImageryComponent contains all information about which image is to be drawn, where it should be drawn, which colours are to be used and how the image should be formatted.

Attributes:

No attributes are defined for the <ImageryComponent> element.

Usage:

Note: the sub-elements should appear in the order that they are defined here.

Examples:

The following was taken from TaharezLook.looknfeel and shows a full ImageryComponent definition:

<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><UnifiedDim scale="0" type="LeftEdge" /></Dim>
<Dim type="TopEdge" ><UnifiedDim scale="0.2" type="TopEdge" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="0.3" type="Height" /></Dim>
</Area>
<Image imageset="TaharezLook" image="TextSelectionBrush" />
<Colours
topLeft="FFFFFF00"
topRight="FFFFFF00"
bottomLeft="FFFFFF00"
bottomRight="FFFFFF00"
/>
<VertFormat type="Tiled" />
<HorzFormat type="Stretched" />
</ImageryComponent>

<ImageProperty> Element

Purpose:

The <ImageProperty> element is intended to allow the system to access a property on the target window to obtain the final image to be used when rendering the ImageryComponent being defined.

Attributes:

Usage:

Examples:

<ImagerySection> Element

Purpose:

The <ImagerySection> element is used to group multiple <ImageryComponent> and <TextComponent> definitions into named sections which can then be specified for use as imagery in state definitions.

Attributes:

Usage:

Note: the sub-elements should appear in the order that they are defined here.

Examples:

<ImagerySection name="example">
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><AbsoluteDim value="15" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
</Area>
<Image imageset="sillyImages" image="anotherImage" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
<TextComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
</TextComponent>
</ImagerySection>

<Layer> Element

Purpose:

The <Layer> element is used to define layers of imagery within the definition of a StateImagery section.

Attributes:

Usage:

Examples:

Here we see a single layer with multiple sections included. This example was taken from the TaharezLook skin XML file (ListHeaderSegment widget):

<StateImagery name="Normal">
<Layer>
<Section section="segment_normal" />
<Section section="splitter_normal" />
<Section section="label" />
</Layer>
</StateImagery>

<NamedArea> Element

Purpose:

Defines an area that can be accessed via it's name. Generally this this used by base widgets to obtain skin supplied areas for use in rendering or other widget specific operations.

Attributes:

Usage:

Examples:

This example defines a named area called 'TextArea'. It is defined as being an area seven pixels inside the total area of the widget being defined:

<NamedArea name="TextArea">
<Area>
<Dim type="LeftEdge" >
<AbsoluteDim value="7" />
</Dim>
<Dim type="TopEdge" >
<AbsoluteDim value="7" />
</Dim>
<Dim type="RightEdge" >
<UnifiedDim scale="1.0" offset="-7" type="RightEdge" />
</Dim>
<Dim type="BottomEdge" >
<UnifiedDim scale="1.0" offset="-7" type="BottomEdge" />
</Dim>
</Area>
</NamedArea>

<Property> Element

Purpose:

The <Property> element is used to initialise a property on a window or widget being defined.

Attributes:

Usage:

Examples:

In this extract from the definition for TaharezLook/Titlebar, we can see the <Property> element used to set the 'CaptionColour' property; this establishes a default for all instances of this widget:

<WidgetLook name="TaharezLook/Titlebar">
<Property name="CaptionColour" value="FFFFFFFF" />
<ImagerySection name="main">
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
...
</Area>
...
</ImageryComponent>
</ImagerySection>
...
</WidgetLook>

<PropertyDefinition> Element

Purpose:

The <PropertyDefinition> element creates a new named property for the widget being defined. The defined property may be accessed via any means that a 'normal' property may.

Attributes:

Usage:

Examples:

In this example, within the WidgetLook we create a new property named 'ScrollbarWidth'. We then use this property to control the width of a component child widget. This effectively gives the user control over the width of the child scrollbar via the property:

<WidgetLook name="PropertyDefExample">
<PropertyDefinition
name="ScrollbarWidth"
initialValue="12"
layoutOnWrite="true"
/>
...
<Child type="MyVertScrollbar" nameSuffix="__auto_vscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><PropertyDim name="ScrollbarWidth" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<HorzAlignment type="RightAligned" />
</Child>
...
</WidgetLook>

<PropertyLinkDefinition> Element

Purpose:

The <PropertyLinkDefinition> element creates a new named property for the widget being defined that is linked to one or more properties on either child widget components, or on the parent widget. The target widgets and properties can be specified either as attributes (for example if the link is to be a one to one mapping), or via <PropertyLinkTarget> elements (if there is to be a one to many mapping). This allows properties on child widgets to be directly exposed to clients of the widget being defined, as well as allowing the widget being defined to make use of properties defined on a parent widget. The defined property may be accessed via any means that a 'normal' property may.

Attributes:

Usage:

Examples:

In this example we create a new property named 'CaptionTextColour'. This is linked to a property named 'CaptionColour' on the child widget with name suffix 'auto_titlebar'. Any access of the 'CaptionTextColour' property on the widget will actually access the 'CaptionColour' property on the specified child widget:

<WidgetLook name="PropertyLinkExample">
<PropertyLinkDefinition
name="CaptionTextColour"
widget="__auto_titlebar__"
targetProperty="CaptionColour"
initialValue="FFFF3333"
layoutOnWrite="true"
/>
...
</WidgetLook>

<PropertyLinkTarget> Element

Purpose:

The <PropertyLinkTarget> element specifies a target widget suffix and property name to be used with a <PropertyLinkDefinition>. Whenever the property defined by the enclosing <PropertyLinkDefinition> is written to, the property specified in the <PropertyLinkTarget> will be written also. If the <PropertyLinkTarget> is the first linked target it will also be used as the 'master linked target' and will be used as the source for read accesses to the property defined by the enclosing <PropertyLinkDefinition> element.

Attributes:

Usage:

Examples:

In this example we create a new property named 'TextColour'. This is linked to separate properties on two different child components. A property named 'LabelColour' on a child widget with name suffix 'auto_button1', and a property named 'ContentColour' on a child widget with name suffix 'auto_content_panel. Writing to the property 'TextColour' will cause both 'LabelColour' and 'ContentColour' to be updated, while reading the property 'TextColour' will fetch the value of 'LabelColour' (because it appears first, it is treated as the master target).

<WidgetLook name="PropertyLinkTargetExample">
<PropertyLinkDefinition name="TextColour" initialValue="FFFF00FF" >
<PropertyLinkTarget widget="__auto_button1__" property="LabelColour" />
<PropertyLinkTarget widget="__auto_content_panel__" property="ContentColour" />
</PropertyLinkDefinition>
...
</WidgetLook>

<PropertyDim> Element

Purpose:

The <PropertyDim> element is used to define a component dimension for an area rectangle. <PropertyDim> is used to specify either a UDim or a simple floating point value - accessed via a window property - for use as an area dimension.

Attributes:

Usage:

Examples:

This example shows a dimension that uses <PropertyDim> to fetch a property value to use as the dimension value. We are accessing the 'AbsoluteWidth' property, from an attached widget with the name suffix 'auto_button', that accesses a simple floating point value:

...
<Area>
<Dim type="LeftEdge">
<PropertyDim widget="__auto_button__" name="AbsoluteWidth" />
</Dim>
...
</Area>
...

Here we show a dimension that uses <PropertyDim> to access a property named 'UserWidth' on the target window. We have specified the type attribute to be 'Width', which indicates to the system that the property will access a UDim value and that the scale part of the UDim is relative to the width of the target window.

...
<Area>
...
<Dim type="Width">
<PropertyDim name="UserWidth" type="Width" />
</Dim>
...
</Area>
...

<Section> Element

Purpose:

The <Section> element is used to name an ImagerySection to be included for rendering within a StateImagery Layer definition.

Attributes:

Usage:

Examples:

Here we see a state definition from a button widget. The state specifies to use the 'normal' imagery section, and also the 'label' imagery section. The 'label' section is only drawn if the 'DrawText' property of the target window is 'True'. Colours for 'label' will be modulated with the colour obtained from the 'NormalTextColour' property of the target window:

...
<StateImagery name="Normal">
<Layer>
<Section section="normal" />
<Section section="label" controlProperty="DrawText">
<ColourProperty name="NormalTextColour" />
</Section>
</Layer>
</StateImagery>
...

<StateImagery> Element

Purpose:

The <StateImagery> element defines imagery to be used when rendering a named state. The base widget type intended as a target for the WidgetLook being defined will specify which states are required to be defined.

Attributes:

Usage:

Examples:

The following is an extract of the MenuItem definition from TaharezLook.looknfeel. The except defines some of the states required for that widget. Note that, although not shown here, a required state can be empty if no rendering is needed for that state:

...
<StateImagery name="EnabledNormal">
<Layer>
<Section section="label" />
</Layer>
</StateImagery>
<StateImagery name="EnabledHover">
<Layer>
<Section section="frame" />
<Section section="label" />
</Layer>
</StateImagery>
<StateImagery name="EnabledPushed">
<Layer>
<Section section="frame" />
<Section section="label" />
</Layer>
</StateImagery>
...

<Text> Element

Purpose:

The <Text> element is used to define font and text string information within a TextComponent.

Attributes:

Usage:

Examples:

In this simple example, we define a TextComponent that renders some static text. The <Text> element is used to specify the font and string to be used:

...
<TextComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<Text font="Roman-18" string="Render this text!" />
</TextComponent>
...

<TextComponent> Element

Purpose:

The <TextComponent> element defines a single item of text to be drawn within a given ImagerySection. The TextComponent contains all information about the text that is to be drawn, where it should be drawn, which colours are to be used and how the text should be formatted within its area.

Note that if the <Text> element appears in addition to either of the <TextProperty> or <FontProperty> elements, the string and font specified within the <Text> element will act as default values if the properties referenced in <TextProperty> or <FontProperty> evaluate to empty strings.

Attributes:

The <TextComponent> element has no attributes defined.

Usage:

Note: the sub-elements should appear in the order that they are defined here.

Examples:

The following example could be used to specify the caption text to appear within a Titlebar style widget:

...
<ImagerySection name="caption">
<TextComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="10" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="2" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<ColourProperty name="CaptionColour" />
<VertFormat type="CentreAligned" />
<HorzFormat type="WordWrapLeftAligned" />
</TextComponent>
</ImagerySection>
...

<TextProperty> Element

Purpose:

The <TextProperty> element is intended to allow the system to access a property on the target window to obtain the text to be used when rendering the TextComponent being defined.

Attributes:

Usage:

Examples:

<UnifiedDim> Element

Purpose:

The <UnifiedDim> element is used to define a component dimension for an area rectangle. <UnifiedDim> is used to specify a value using the 'unified' co-ordinate system.

Attributes:

Usage:

Examples:

This example shows a dimension that uses <UnifiedDim> to specify a UDim value to use as the dimension's value:

...
<Area>
<Dim type="LeftEdge">
<UnfiedDim scale="0.5" offset="-8" type="LeftEdge" />
</Dim>
...
</Area>
...

<VertAlignment> Element

Purpose:

The <VertAlignment> element is used to specify the vertical alignment option required for a child window element.

Attributes:

Usage:

Examples:

This example defines a scrollbar type child widget. We have used the <VertAlignment> element to specify that the scrollbar appear on the bottom edge of the component being defined:

...
<Child type="MyLook/HorzScrollbar" nameSuffix="__auto_hscrollbar__">
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><UnifiedDim scale="1" type="Width? /></Dim>
<Dim type="Height" ><AbsoluteDim value="15" /></Dim>
</Area>
<VertAlignment type="BottomAligned" />
</Child>
...

<VertFormat> Element

Purpose:

The <VertFormat> element is used to specify the required vertical formatting for an image, frame, or text component.

Attributes:

Usage:

Examples:

This first example shows an ImageryComponent definition. We use <VertFormat> to specify that we want the image tiled to cover the entire width of the designated target area:

...
<ImageryComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="Width" ><AbsoluteDim value="25" /></Dim>
<Dim type="Height" ><AbsoluteDim value="25" /></Dim>
</Area>
<Image imageset="myImageset" image="coolImage" />
<VertFormat type="Tiled" />
<HorzFormat type="Stretched" />
</ImageryComponent>
...

This second example is for a TextComponent. You can see <VertFormat> used here to specify that we want the text centred within the target area:

...
<TextComponent>
<Area>
<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
<Dim type="RightEdge" ><UnifiedDim scale="1" type="Width" /></Dim>
<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
</Area>
<VertFormat type="CentreAligned" />
</TextComponent>
...

<VertFormatProperty> Element

Purpose:

The <VertFormatProperty> element is intended to allow the system to access a property on the target window to obtain the vertical formatting to be used when drawing the component being defined.

Attributes:

Usage:

Examples:

<WidgetDim> Element

Purpose:

The <WidgetDim> element is used to define a component dimension for an area rectangle. <WidgetDim> is used to specify some dimension of an attached child widget for use as an area dimension.

Attributes:

Usage:

Examples:

This example shows using <WidgetDim> to obtain dimensions from an attached child widget 'auto_titlebar', and also from the target window itself:

...
<Area>
<Dim type="LeftEdge" >
<AbsoluteDim value="0" />
</Dim>
<Dim type="TopEdge" >
<WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" />
</Dim>
<Dim type="Width" >
<UnifiedDim scale="1" type="Width" />
</Dim>
<Dim type="BottomEdge" >
<WidgetDim dimension="BottomEdge" />
</Dim>
</Area>
...

<WidgetLook> Element

Purpose:

The <WidgetLook> element is the most important element within the system. It defines a complete widget 'look' which can be assigned to one of the Falagard base widget classes to create what is essentially a new widget type.

Attributes:

Usage:

Note: the sub-elements should appear in the order that they are defined here.

Examples:

The following example is the complete definition for 'TaharezLook/ListHeader'. This is a trivial example that actually does no rendering, it just specifies a required property:

<WidgetLook name="TaharezLook/ListHeader">
<Property
name="SegmentWidgetType"
value="TaharezLook/ListHeaderSegment"
/>
<StateImagery name="Enabled" />
<StateImagery name="Disabled" />
</WidgetLook>