Templates
What are templates
Templates describe a set of views (controls). A window can own several templates, containing more or less controls.
They are used by the application to create more complex views, too. For example you just have to describe one mixer channel
and the application creates the whole mixer strip.
Note that the names of templates and views have to be known by the application!
<template
name="..."
title="..."
background="..."
buttons="..."
help="..."
style="..."
shape="...">
<!-- place views here -->
</template>
Attributes:
name |
application-specific template name
|
title |
window caption
|
background |
You can specify a background bitmap for the template here.
The window size will match the bitmap size.
|
buttons |
standard buttons for dialogs
can be a combination of "ok", "cancel" (e.g. "ok|cancel")
|
help |
context string for help system
If the template is used in a dialog, a help button will be created.
|
style |
Window styles:
windowstyle | - normal window with minimize, maximize,... |
dialogstyle | - dialog window (not sizable,...) |
panelstyle | - panel window (small titlebar) |
noframe | - no OS specific window frame |
|
shape |
assign a window shape to the template
|
Window Shapes
Howto include bitmaps
Variant/Condition
<variant condition="...">
<!-- place controls here -->
</variant>
The controls inside a <variant> tag only appear under the specified condition.
A condition is expressed by certain strings (defined by the application), which can be combined with the logical operators
AND, OR and NOT.
The expression is parsed from left to right.
e.g. part of a mixer channel template:
<variant condition="surround">
<variant condition="stereo">
...
</variant>
<variant condition="NOT stereo">
...
</variant>
</variant>
<variant condition="NOT surround">
...
</variant>
|
<variant condition="surround AND stereo">
</variant>
<variant condition="surround AND NOT stereo">
</variant>
<variant condition="NOT surround AND stereo">
</variant>
<variant condition="NOT surround AND NOT stereo">
</variant>
|
View auto-alignment
<row [col] width="integer" height="integer" margin="integer">
<!-- place views here -->
</row [/col]>
A <row> aligns its views horizontally, a <col> vertically. The size depends on the content,
you can specify a minimum width/height optionally. The distance between the views corresponds to the default margin specified in the
scheme section.
Rows and columns are not visible at runtime.
Attributes:
width |
minimum width in pixels
|
height |
minimum height in pixels
|
margin |
outer margin in pixels
If not specified, the default margin of the scheme is used.
Be carefull, the margin attribute doesn't influence the distance between views!
|
Changing view fonts
<font
name="..."
face="..."
size="integer"
style="..."
mode="..."
color="#color">
<!-- place views here -->
</font>
The <font> tag changes the font for all views described inside.
Note that currently only labels and text displays support font changes!
Attributes:
name |
Can be the name of a scheme font.
Either the name or the face attribute have to be specified.
|
face |
font face
You can specify several alternatives separated by colons (e.g. "Verdana, Arial, Helvetica")
Standard fonts (platform-independent):
"System"
"Geneva"
"Helvetica"
"Courier"
"Times"
"Symbol"
|
size |
font heigt in pixels
|
style |
Can be a combination of "bold", "italic", "underline"
(e.g. "bold|underline").
Windows specific: |
"strikeout"
|
MAC specific: |
"condense",
"extend",
"shadow",
"outline"
|
|
mode |
text drawing mode, can be set to "opaque"
|
color |
text color
HOWTO describe colors
|
Last Modified: