|
Packit |
b099d7 |
'\" t
|
|
Packit |
b099d7 |
...\" WML.sgm /main/10 1996/09/08 21:23:22 rws $
|
|
Packit |
b099d7 |
.de P!
|
|
Packit |
b099d7 |
.fl
|
|
Packit |
b099d7 |
\!!1 setgray
|
|
Packit |
b099d7 |
.fl
|
|
Packit |
b099d7 |
\\&.\"
|
|
Packit |
b099d7 |
.fl
|
|
Packit |
b099d7 |
\!!0 setgray
|
|
Packit |
b099d7 |
.fl \" force out current output buffer
|
|
Packit |
b099d7 |
\!!save /psv exch def currentpoint translate 0 0 moveto
|
|
Packit |
b099d7 |
\!!/showpage{}def
|
|
Packit |
b099d7 |
.fl \" prolog
|
|
Packit |
b099d7 |
.sy sed -e 's/^/!/' \\$1\" bring in postscript file
|
|
Packit |
b099d7 |
\!!psv restore
|
|
Packit |
b099d7 |
.
|
|
Packit |
b099d7 |
.de pF
|
|
Packit |
b099d7 |
.ie ?\\*(f1?? .ds f1 \\n(.f
|
|
Packit |
b099d7 |
.el .ie ?\\*(f2?? .ds f2 \\n(.f
|
|
Packit |
b099d7 |
.el .ie ?\\*(f3?? .ds f3 \\n(.f
|
|
Packit |
b099d7 |
.el .ie ?\\*(f4?? .ds f4 \\n(.f
|
|
Packit |
b099d7 |
.el .tm ? font overflow
|
|
Packit |
b099d7 |
.ft \\$1
|
|
Packit |
b099d7 |
..
|
|
Packit |
b099d7 |
.de fP
|
|
Packit |
b099d7 |
.ie !?\\*(f4?? \{\
|
|
Packit |
b099d7 |
. ft \\*(f4
|
|
Packit |
b099d7 |
. ds f4\"
|
|
Packit |
b099d7 |
' br \}
|
|
Packit |
b099d7 |
.el .ie !?\\*(f3?? \{\
|
|
Packit |
b099d7 |
. ft \\*(f3
|
|
Packit |
b099d7 |
. ds f3\"
|
|
Packit |
b099d7 |
' br \}
|
|
Packit |
b099d7 |
.el .ie !?\\*(f2?? \{\
|
|
Packit |
b099d7 |
. ft \\*(f2
|
|
Packit |
b099d7 |
. ds f2\"
|
|
Packit |
b099d7 |
' br \}
|
|
Packit |
b099d7 |
.el .ie !?\\*(f1?? \{\
|
|
Packit |
b099d7 |
. ft \\*(f1
|
|
Packit |
b099d7 |
. ds f1\"
|
|
Packit |
b099d7 |
' br \}
|
|
Packit |
b099d7 |
.el .tm ? font underflow
|
|
Packit |
b099d7 |
..
|
|
Packit |
b099d7 |
.ds f1\"
|
|
Packit |
b099d7 |
.ds f2\"
|
|
Packit |
b099d7 |
.ds f3\"
|
|
Packit |
b099d7 |
.ds f4\"
|
|
Packit |
b099d7 |
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n
|
|
Packit |
b099d7 |
.TH "WML" "file formats"
|
|
Packit |
b099d7 |
.SH "NAME"
|
|
Packit |
b099d7 |
\fBWML\fP \(em The widget meta-language file format for creating uil compilers
|
|
Packit |
b099d7 |
.iX "widget meta-language"
|
|
Packit |
b099d7 |
.iX "WML"
|
|
Packit |
b099d7 |
.SH "DESCRIPTION"
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
The widget meta-language facility (WML) is used to generate the
|
|
Packit |
b099d7 |
components of the user interface language (UIL) compiler that
|
|
Packit |
b099d7 |
can change depending on the widget set\&. Using WML you can add support
|
|
Packit |
b099d7 |
in UIL for
|
|
Packit |
b099d7 |
new widgets to the Motif widget set or for a totally new widget set\&.
|
|
Packit |
b099d7 |
.SS "File"
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
WML files are ASCII files that you can modify with any standard
|
|
Packit |
b099d7 |
text editor\&. They are accessed in the
|
|
Packit |
b099d7 |
\fBtools/wml\fP directory by WML\&.
|
|
Packit |
b099d7 |
By convention WML files have the suffix \fB\&.wml\fP\&.
|
|
Packit |
b099d7 |
The Motif widget set is described in the
|
|
Packit |
b099d7 |
\fBmotif\&.wml\fP file\&.
|
|
Packit |
b099d7 |
This is also the default WML file when using the WML facility\&.
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
When adding new widgets or changing widget characteristics, you should
|
|
Packit |
b099d7 |
start with a copy of the
|
|
Packit |
b099d7 |
\fBmotif\&.wml\fP file\&.
|
|
Packit |
b099d7 |
If you are creating a new widget set for use with UIL, you should
|
|
Packit |
b099d7 |
start from scratch\&.
|
|
Packit |
b099d7 |
In either case the
|
|
Packit |
b099d7 |
\fBmotif\&.wml\fP
|
|
Packit |
b099d7 |
file is a good example of WML syntax, and you should familiarize
|
|
Packit |
b099d7 |
yourself with it before writing your own WML file\&.
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
WML files have a simple syntax, similar in structure to UIL\&.
|
|
Packit |
b099d7 |
It is made up of the following elements:
|
|
Packit |
b099d7 |
.IP " \(bu" 6
|
|
Packit |
b099d7 |
Comments
|
|
Packit |
b099d7 |
.IP " \(bu" 6
|
|
Packit |
b099d7 |
Data Type Definitions
|
|
Packit |
b099d7 |
.IP " \(bu" 6
|
|
Packit |
b099d7 |
Character Set Definitions
|
|
Packit |
b099d7 |
.IP " \(bu" 6
|
|
Packit |
b099d7 |
Enumeration Set Definitions
|
|
Packit |
b099d7 |
.IP " \(bu" 6
|
|
Packit |
b099d7 |
Control List Definitions
|
|
Packit |
b099d7 |
.IP " \(bu" 6
|
|
Packit |
b099d7 |
Class Definitions
|
|
Packit |
b099d7 |
.IP " \(bu" 6
|
|
Packit |
b099d7 |
Child Definitions
|
|
Packit |
b099d7 |
.IP " \(bu" 6
|
|
Packit |
b099d7 |
Resource Definitions
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
You can use space, tabs, or newlines anywhere in the syntax,
|
|
Packit |
b099d7 |
as long as you do not split up keywords or strings, except that
|
|
Packit |
b099d7 |
comments end at a newline\&.
|
|
Packit |
b099d7 |
The order of elements is not important to the syntax\&.
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
This description uses the following additional conventions
|
|
Packit |
b099d7 |
to describe the syntax of the widget meta-language:
|
|
Packit |
b099d7 |
.IP "[\ \ ]" 10
|
|
Packit |
b099d7 |
Indicates optional elements\&.
|
|
Packit |
b099d7 |
.IP "\&.\&.\&." 10
|
|
Packit |
b099d7 |
Indicates where an element of syntax can be repeated\&.
|
|
Packit |
b099d7 |
.IP "|" 10
|
|
Packit |
b099d7 |
Indicates a choice among multiple items\&.
|
|
Packit |
b099d7 |
.SS "Comments"
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
You can include comments in the WML file\&.
|
|
Packit |
b099d7 |
Comments have the following syntax:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
[any\&.element]!any\&.comment
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Comments begin with an exclamation point and extend to the
|
|
Packit |
b099d7 |
end of the line\&. A comment can begin on a line by itself or
|
|
Packit |
b099d7 |
follow any part of another element\&. A comment does not change
|
|
Packit |
b099d7 |
the meaning of any other element\&.
|
|
Packit |
b099d7 |
For example:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
\f(CW!This is a comment
|
|
Packit |
b099d7 |
! that spans two lines\&.
|
|
Packit |
b099d7 |
DataType !This is a comment following code\&.\fR
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.SS "Data Type Definitions"
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Data type definitions register all the resource data
|
|
Packit |
b099d7 |
types used in the file\&. You must register all the data types used
|
|
Packit |
b099d7 |
in your WML file\&.
|
|
Packit |
b099d7 |
Data type definitions have the following syntax:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
DataType
|
|
Packit |
b099d7 |
any\&.datatype [{ InternalLiteral = internal\&.name |
|
|
Packit |
b099d7 |
DocName = "\fIstring\fP"; [\&.\&.\&.]}];
|
|
Packit |
b099d7 |
[\&.\&.\&.]
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
A data type definition begins with the keyword \fBDataType\fP\&. Following
|
|
Packit |
b099d7 |
the
|
|
Packit |
b099d7 |
\fBDataType\fP keyword is a list of data types that can be further modified with
|
|
Packit |
b099d7 |
.IP "\fBInternalLiteral\fP" 10
|
|
Packit |
b099d7 |
This forces the value of the internal symbol table literal definition
|
|
Packit |
b099d7 |
of the data type name\&. This modifier is only used to get around
|
|
Packit |
b099d7 |
symbol table definitions hard coded into the UIL compiler\&.
|
|
Packit |
b099d7 |
It should rarely be used\&.
|
|
Packit |
b099d7 |
.IP "\fBDocName\fP" 10
|
|
Packit |
b099d7 |
This gives an arbitrary string for use in the documentation\&.
|
|
Packit |
b099d7 |
This string is meant to supply a different name for the data type for
|
|
Packit |
b099d7 |
use in the documentation, or a single name for the data type if the
|
|
Packit |
b099d7 |
data type has aliases\&.
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
For example:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
\f(CWDataType OddNumber {DocName="OddNumber";};
|
|
Packit |
b099d7 |
NewString;\fR
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.SS "Character Set Definitions"
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Character set definitions register the Motif Toolkit name and other
|
|
Packit |
b099d7 |
information for the character set names used in UIL\&.
|
|
Packit |
b099d7 |
Character set definitions have the following syntax:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
CharacterSet
|
|
Packit |
b099d7 |
any\&.character\&.set
|
|
Packit |
b099d7 |
{ [ FontListElementTag | XmStringCharsetName ] = "\fIstring\fP";
|
|
Packit |
b099d7 |
[ Alias = "\fIstring\fP" \&.\&.\&.; |
|
|
Packit |
b099d7 |
Direction = [ LeftToRight | RightToLeft ]; |
|
|
Packit |
b099d7 |
ParseDirection = [ LeftToRight | RightToLeft ]; |
|
|
Packit |
b099d7 |
CharacterSize = [ OneByte | TwoByte ]; ]
|
|
Packit |
b099d7 |
[ \&.\&.\&. ] };
|
|
Packit |
b099d7 |
[ \&.\&.\&. ]
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
A character set definition begins with the keyword \fBCharacterSet\fP\&.
|
|
Packit |
b099d7 |
Following the \fBCharacterSet\fP keyword is a list of character sets
|
|
Packit |
b099d7 |
that can be further modified with
|
|
Packit |
b099d7 |
.IP "\fBFontListElementTag\fP\ |\ \fBXmStringCharsetName\fP" 10
|
|
Packit |
b099d7 |
Specifies the name of the character set, which will become the character
|
|
Packit |
b099d7 |
set component of a compound string segment created using this
|
|
Packit |
b099d7 |
character set\&.
|
|
Packit |
b099d7 |
This modifier is required\&.
|
|
Packit |
b099d7 |
.IP "\fBAlias\fP" 10
|
|
Packit |
b099d7 |
Specifies one or more aliases for the character set name\&.
|
|
Packit |
b099d7 |
Each alias can be used within UIL to refer to the same character set\&.
|
|
Packit |
b099d7 |
.IP "\fBDirection\fP" 10
|
|
Packit |
b099d7 |
Specifies the direction of a compound string segment created using
|
|
Packit |
b099d7 |
this character set\&.
|
|
Packit |
b099d7 |
The default is \fBLeftToRight\fP\&.
|
|
Packit |
b099d7 |
.IP "\fBParseDirection\fP" 10
|
|
Packit |
b099d7 |
Specifies the direction in which an input string is parsed when a
|
|
Packit |
b099d7 |
compound string segment is created using this character set\&.
|
|
Packit |
b099d7 |
The default is whatever \fBDirection\fP is specified\&.
|
|
Packit |
b099d7 |
.IP "\fBCharacterSize\fP" 10
|
|
Packit |
b099d7 |
Specifies the number of bytes in each character of a compound string
|
|
Packit |
b099d7 |
segment created using this character set\&.
|
|
Packit |
b099d7 |
The default is \fBOneByte\fP\&.
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
For example:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
\f(CWCharacterSet
|
|
Packit |
b099d7 |
iso_latin1
|
|
Packit |
b099d7 |
{ XmStringCharsetName = "ISO8859-1";
|
|
Packit |
b099d7 |
Alias = "ISOLatin1"; };
|
|
Packit |
b099d7 |
iso_hebrew_lr
|
|
Packit |
b099d7 |
{ XmStringCharsetName = "ISO8859-8";
|
|
Packit |
b099d7 |
Alias = "iso_latin8_lr";
|
|
Packit |
b099d7 |
Direction = RightToLeft;
|
|
Packit |
b099d7 |
ParseDirection = LeftToRight; };
|
|
Packit |
b099d7 |
ksc_korean
|
|
Packit |
b099d7 |
{ XmStringCharsetName = "KSC5601\&.1987-0";
|
|
Packit |
b099d7 |
CharacterSize = TwoByte; };\fR
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.SS "Enumeration Set Definitions"
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Enumeration set definitions register the named constants used in the
|
|
Packit |
b099d7 |
Motif Toolkit to specify some resource values\&.
|
|
Packit |
b099d7 |
Enumeration set definitions have the following syntax:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
EnumerationSet
|
|
Packit |
b099d7 |
resource\&.name: resource\&.type
|
|
Packit |
b099d7 |
{ enum\&.value\&.name; [ \&.\&.\&. ] };
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
An enumeration set definition begins with the keyword
|
|
Packit |
b099d7 |
\fBEnumerationSet\fP\&.
|
|
Packit |
b099d7 |
For each enumeration set defined, the name and type of the resource are
|
|
Packit |
b099d7 |
listed\&.
|
|
Packit |
b099d7 |
The resource name is the Motif Toolkit resource name, with the beginning
|
|
Packit |
b099d7 |
\fBXmN\fP removed and with the initial letter capitalized\&.
|
|
Packit |
b099d7 |
For example, the name of the Motif Toolkit resource
|
|
Packit |
b099d7 |
\fBXmNrowColumnType\fP is \fBRowColumnType\fP\&.
|
|
Packit |
b099d7 |
The resource type is the data type for the resource; for most resources,
|
|
Packit |
b099d7 |
this is \fIinteger\fP\&.
|
|
Packit |
b099d7 |
Following the resource name and type is a list of names of enumeration
|
|
Packit |
b099d7 |
values that can be used as settings for the resource\&.
|
|
Packit |
b099d7 |
These names are the same as those in the Motif Toolkit\&.
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
For example:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
\f(CWEnumerationSet
|
|
Packit |
b099d7 |
RowColumnType: integer
|
|
Packit |
b099d7 |
{ XmWORK_AREA; XmMENU_BAR; XmMENU_POPUP;
|
|
Packit |
b099d7 |
XmMENU_PULLDOWN; XmMENU_OPTION; };\fR
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Enumeration sets also support Boolean values\&.
|
|
Packit |
b099d7 |
.SS "Control List Definitions"
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Control list definitions assign a name to groups of controls\&.
|
|
Packit |
b099d7 |
You can use these control lists later in class definitions to simplify
|
|
Packit |
b099d7 |
the structure of your WML file\&.
|
|
Packit |
b099d7 |
Control list definitions have the following syntax:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
ControlList
|
|
Packit |
b099d7 |
any\&.control\&.list [{ any\&.control; [\&.\&.\&.]}];
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
A control list definition starts with the
|
|
Packit |
b099d7 |
\fBControlList\fP keyword\&.
|
|
Packit |
b099d7 |
Following the
|
|
Packit |
b099d7 |
\fBControlList\fP keyword are any number of control list definitions\&. Control list
|
|
Packit |
b099d7 |
definitions are made up of a control list name followed by the
|
|
Packit |
b099d7 |
set of controls it represents\&. For example:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
\f(CWControlList
|
|
Packit |
b099d7 |
Buttons {PushButton;
|
|
Packit |
b099d7 |
RadioButton;
|
|
Packit |
b099d7 |
CascadeButton;
|
|
Packit |
b099d7 |
NewCascadebutton;};\fR
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Each control specified in the control list must be defined as
|
|
Packit |
b099d7 |
a class in the file\&.
|
|
Packit |
b099d7 |
.SS "Class Definitions"
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Class definitions describe a particular widget class including
|
|
Packit |
b099d7 |
its position in the class hierarchy, toolkit convenience function,
|
|
Packit |
b099d7 |
resources, and controls\&. There should be one class definition for
|
|
Packit |
b099d7 |
each widget or gadget in the widget set you want to support in UIL\&.
|
|
Packit |
b099d7 |
Class definitions have the following syntax:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
Class class\&.name: MetaClass | Widget | Gadget
|
|
Packit |
b099d7 |
[{[
|
|
Packit |
b099d7 |
SuperClass = class\&.name; |
|
|
Packit |
b099d7 |
ParentClass = parent\&.class\&.name; |
|
|
Packit |
b099d7 |
InternalLiteral = internal\&.name; |
|
|
Packit |
b099d7 |
Alias = \fIalias\fP; |
|
|
Packit |
b099d7 |
ConvenienceFunction = convenience\&.function; |
|
|
Packit |
b099d7 |
WidgetClass = widget\&.class; |
|
|
Packit |
b099d7 |
DocName = "\fIstring\fP"; |
|
|
Packit |
b099d7 |
DialogClass = True | False; |
|
|
Packit |
b099d7 |
Resources { any\&.resource\&.name [{
|
|
Packit |
b099d7 |
Default = new\&.default\&.value; |
|
|
Packit |
b099d7 |
Exclude = True |
|
|
Packit |
b099d7 |
False;
|
|
Packit |
b099d7 |
[\&.\&.\&.]} ];
|
|
Packit |
b099d7 |
[\&.\&.\&.]}; |
|
|
Packit |
b099d7 |
Controls { any\&.control\&.name; [\&.\&.\&.]};
|
|
Packit |
b099d7 |
Children { any\&.child\&.name; [\&.\&.\&.] };
|
|
Packit |
b099d7 |
[\&.\&.\&.]
|
|
Packit |
b099d7 |
]}];
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Class definitions start with the
|
|
Packit |
b099d7 |
\fBClass\fP keyword\&.
|
|
Packit |
b099d7 |
For each class defined, the name of the class and whether the
|
|
Packit |
b099d7 |
class is a metaclass, widget, or gadget is listed\&.
|
|
Packit |
b099d7 |
Each class definition can be further modified with the
|
|
Packit |
b099d7 |
keywords described in the following list\&.
|
|
Packit |
b099d7 |
.IP "\fBSuperClass\fP" 10
|
|
Packit |
b099d7 |
This indicates the name of the parent class\&.
|
|
Packit |
b099d7 |
Only the root of the hierarchy does not specify a SuperClass\&.
|
|
Packit |
b099d7 |
.IP "\fBParentClass\fP" 10
|
|
Packit |
b099d7 |
This indicates the name of the widget\&'s automatically created
|
|
Packit |
b099d7 |
parent class if one exists\&. This allows resources for that
|
|
Packit |
b099d7 |
automatically created class to be used in instances of this class\&.
|
|
Packit |
b099d7 |
For example, \fBXmBulletinBoardDialog\fP creates both an
|
|
Packit |
b099d7 |
\fBXmBulletinBoard\fP and an \fBXmDialogShell\fP\&. To access the
|
|
Packit |
b099d7 |
resources of the \fBXmDialogShell\fP parent class it must be
|
|
Packit |
b099d7 |
specified here\&.
|
|
Packit |
b099d7 |
.IP "\fBInternalLiteral\fP" 10
|
|
Packit |
b099d7 |
This forces the value of the internal symbol table literal definition
|
|
Packit |
b099d7 |
of the class name\&. This modifier is only used to get around
|
|
Packit |
b099d7 |
symbol table definitions hard coded into the UIL compiler\&.
|
|
Packit |
b099d7 |
It should rarely be used\&.
|
|
Packit |
b099d7 |
.IP "\fBAlias\fP" 10
|
|
Packit |
b099d7 |
This indicates alternate names for the class
|
|
Packit |
b099d7 |
for use in a UIL specification\&.
|
|
Packit |
b099d7 |
.IP "\fBConvenienceFunction\fP" 10
|
|
Packit |
b099d7 |
This indicates the name of the creation convenience function
|
|
Packit |
b099d7 |
for this class\&. All widget and gadget classes must have a
|
|
Packit |
b099d7 |
\fBConvenienceFunction\&.\fP
|
|
Packit |
b099d7 |
.IP "\fBWidgetClass\fP" 10
|
|
Packit |
b099d7 |
This indicates the associated widget class of gadget type classes\&.
|
|
Packit |
b099d7 |
Presently, nothing is done with this value\&.
|
|
Packit |
b099d7 |
.IP "\fBDocName\fP" 10
|
|
Packit |
b099d7 |
This defines an arbitrary string for use in the documentation\&.
|
|
Packit |
b099d7 |
Presently, nothing is done with this value\&.
|
|
Packit |
b099d7 |
.IP "\fBDialogClass\fP" 10
|
|
Packit |
b099d7 |
This indicates whether the class is a dialog class\&.
|
|
Packit |
b099d7 |
Presently, nothing is done with this value\&.
|
|
Packit |
b099d7 |
.IP "\fBResources\fP" 10
|
|
Packit |
b099d7 |
This lists the resources of the widget class\&. This keyword
|
|
Packit |
b099d7 |
can be further modified with
|
|
Packit |
b099d7 |
.RS
|
|
Packit |
b099d7 |
.IP "\fBDefault\fP" 10
|
|
Packit |
b099d7 |
This specifies a new default value for this resource\&. Resource
|
|
Packit |
b099d7 |
default values are usually set in the resource definition\&. If
|
|
Packit |
b099d7 |
an inherited resource\&'s default value is changed by the class,
|
|
Packit |
b099d7 |
the new default value should be noted here\&.
|
|
Packit |
b099d7 |
.IP "\fBExclude\fP" 10
|
|
Packit |
b099d7 |
This specifies whether an inherited resource should be excluded from the
|
|
Packit |
b099d7 |
resource list of the class\&. \fBExclude\fP is False by default\&.
|
|
Packit |
b099d7 |
.RE
|
|
Packit |
b099d7 |
.IP "\fBChildren\fP" 10
|
|
Packit |
b099d7 |
This lists the names of the automatically created children of this
|
|
Packit |
b099d7 |
class, so that those children can be accessed in the UIL file\&.
|
|
Packit |
b099d7 |
.IP "\fBControls\fP" 10
|
|
Packit |
b099d7 |
This lists the controls that the widget class allows\&. The controls can
|
|
Packit |
b099d7 |
be other classes or a control list from the control list definition\&.
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
The following example uses the examples from the data type definitions and
|
|
Packit |
b099d7 |
control list definitions above\&.
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
\f(CWClass
|
|
Packit |
b099d7 |
TopLevelWidget: MetaClass
|
|
Packit |
b099d7 |
{
|
|
Packit |
b099d7 |
Resources
|
|
Packit |
b099d7 |
{
|
|
Packit |
b099d7 |
XtbNfirstResource;
|
|
Packit |
b099d7 |
XtbNsecondResource;
|
|
Packit |
b099d7 |
};
|
|
Packit |
b099d7 |
};
|
|
Packit |
b099d7 |
NewWidget: Widget
|
|
Packit |
b099d7 |
{
|
|
Packit |
b099d7 |
SuperClass = TopLevelWidget;
|
|
Packit |
b099d7 |
ConvenienceFunction =
|
|
Packit |
b099d7 |
XtbCreateNewWidget;
|
|
Packit |
b099d7 |
Resources
|
|
Packit |
b099d7 |
{
|
|
Packit |
b099d7 |
XtbNnewResource;
|
|
Packit |
b099d7 |
XtbNfirstResource
|
|
Packit |
b099d7 |
{Default="XtbNEW_VALUE";};
|
|
Packit |
b099d7 |
XtbNsecondResource
|
|
Packit |
b099d7 |
{Exclude=True;};
|
|
Packit |
b099d7 |
};
|
|
Packit |
b099d7 |
Controls
|
|
Packit |
b099d7 |
{
|
|
Packit |
b099d7 |
NewWidget;
|
|
Packit |
b099d7 |
Buttons;
|
|
Packit |
b099d7 |
};
|
|
Packit |
b099d7 |
};\fR
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.SS "Child Definitions"
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Child definitions register the classes of automatically created
|
|
Packit |
b099d7 |
children\&. Automatically created children are referenced elsewhere in
|
|
Packit |
b099d7 |
a \fBuil\fP file using the \fBChildren\fP keyword within a class definition\&.
|
|
Packit |
b099d7 |
Child definitions have the following syntax:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
\fBChild\fP
|
|
Packit |
b099d7 |
\fBchild\&.name\fR \fB:\fP \fBclass\&.name\fR\fB;\fP
|
|
Packit |
b099d7 |
[\&.\&.\&.]
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Where \fBchild\&.name\fR is the name of the automatically created child
|
|
Packit |
b099d7 |
and \fBclass\&.name\fR is the name of the class of that child\&.
|
|
Packit |
b099d7 |
.SS "Resource Definitions"
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Resource definitions describe a particular resource including
|
|
Packit |
b099d7 |
its type, and default value\&.
|
|
Packit |
b099d7 |
There should be a resource definition for
|
|
Packit |
b099d7 |
each new resource referenced in the class definitions\&.
|
|
Packit |
b099d7 |
Resource definitions have the following syntax:
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
Resource
|
|
Packit |
b099d7 |
resource\&.name: Argument | Reason | Constraint | SubResource
|
|
Packit |
b099d7 |
[{[
|
|
Packit |
b099d7 |
Type = \fItype\fP;
|
|
Packit |
b099d7 |
[ResourceLiteral = resource\&.literal; ]
|
|
Packit |
b099d7 |
[InternalLiteral = internal\&.name; ]
|
|
Packit |
b099d7 |
[Alias = \fIalias\fP; ]
|
|
Packit |
b099d7 |
[Related = \fIrelated\fP; ]
|
|
Packit |
b099d7 |
[Default = \fIdefault\fP; ]
|
|
Packit |
b099d7 |
[DocName = doc\&.name; ]
|
|
Packit |
b099d7 |
[\&.\&.\&.]}]
|
|
Packit |
b099d7 |
[\&.\&.\&.]
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
Resource definitions start with the
|
|
Packit |
b099d7 |
\fBResource\fP keyword\&.
|
|
Packit |
b099d7 |
For each resource definition,
|
|
Packit |
b099d7 |
the name of the resource and whether the resource is an argument, reason,
|
|
Packit |
b099d7 |
constraint or subresource is listed\&.
|
|
Packit |
b099d7 |
.IP "\fBArgument\fP" 10
|
|
Packit |
b099d7 |
Indicates a standard resource
|
|
Packit |
b099d7 |
.IP "\fBReason\fP" 10
|
|
Packit |
b099d7 |
Indicates a callback resource
|
|
Packit |
b099d7 |
.IP "\fBConstraint\fP" 10
|
|
Packit |
b099d7 |
Indicates a constraint resource
|
|
Packit |
b099d7 |
.IP "\fBSubResource\fP" 10
|
|
Packit |
b099d7 |
Presently, nothing is done with this value
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
The resource definition can be further modified with the following
|
|
Packit |
b099d7 |
keywords:
|
|
Packit |
b099d7 |
.IP "\fBType\fP" 10
|
|
Packit |
b099d7 |
This indicates the data type of the resource\&. It must be listed
|
|
Packit |
b099d7 |
in the data type definition\&.
|
|
Packit |
b099d7 |
.IP "\fBResourceLiteral\fP" 10
|
|
Packit |
b099d7 |
This indicates the keyword used in the UIL file to reference the
|
|
Packit |
b099d7 |
resource\&. In Motif, the resource name is the same as the
|
|
Packit |
b099d7 |
\fBResourceLiteral\fP\&.
|
|
Packit |
b099d7 |
.IP "\fBInternalLiteral\fP" 10
|
|
Packit |
b099d7 |
This forces the value of the internal symbol table literal definition
|
|
Packit |
b099d7 |
of the resource name\&. This modifier is only used to get around
|
|
Packit |
b099d7 |
symbol table definitions hard coded into the UIL compiler\&.
|
|
Packit |
b099d7 |
It should rarely be used\&.
|
|
Packit |
b099d7 |
.IP "\fBAlias\fP" 10
|
|
Packit |
b099d7 |
This indicates alternate names for the resource
|
|
Packit |
b099d7 |
for use in a UIL specification\&.
|
|
Packit |
b099d7 |
.IP "\fBRelated\fP" 10
|
|
Packit |
b099d7 |
This is a special purpose field that allows resources that
|
|
Packit |
b099d7 |
act as a counter for the current resources to be related to the resource\&.
|
|
Packit |
b099d7 |
UIL automatically sets the value of this related resource to the number of items
|
|
Packit |
b099d7 |
in the compiled instance of type \fBresource\&.name\fR\&.
|
|
Packit |
b099d7 |
.IP "\fBDefault\fP" 10
|
|
Packit |
b099d7 |
This indicates the default value of the resource\&.
|
|
Packit |
b099d7 |
.IP "\fBDocName\fP" 10
|
|
Packit |
b099d7 |
This defines an arbitrary string for use in the documentation\&.
|
|
Packit |
b099d7 |
Presently, nothing is done with this value\&.
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
The following example uses the examples from the data type definitions,
|
|
Packit |
b099d7 |
control list definitions and class definitions above\&.
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
.nf
|
|
Packit |
b099d7 |
\f(CWResource
|
|
Packit |
b099d7 |
XtbNfirstResource: Argument
|
|
Packit |
b099d7 |
{ Type = OddNumber;
|
|
Packit |
b099d7 |
Default = "XtbOLD_VALUE";};
|
|
Packit |
b099d7 |
XtbNsecondResource: Argument
|
|
Packit |
b099d7 |
{ Type = NewString;
|
|
Packit |
b099d7 |
Default = "XtbNEW_STRING"; };
|
|
Packit |
b099d7 |
XtbNnewResource: Argument
|
|
Packit |
b099d7 |
{ Type = OddNumber;
|
|
Packit |
b099d7 |
Default = "XtbODD_NUMBER"; };\fR
|
|
Packit |
b099d7 |
.fi
|
|
Packit |
b099d7 |
.PP
|
|
Packit |
b099d7 |
...\" created by instant / docbook-to-man, Sun 22 Dec 1996, 20:37
|