![]() UJML Language Reference |
UJML provides XML tags that provide the structural and declarative elements of the language.
The UJML language consists of a mix of XML tags and a procedural scripting language. See Layout of UJML Files. Some of these XML tags provide the structural elements of the language. See Types of UJML Files. Others allow you to define the declarative aspects of the language, such as variables, state variables, state transitions, visual/audio elements, and events. See Variables, State Variables, State Transitions, Visual Elements, Audio Elements, Handling Events.
Procedural scripting in UJML is provided using either XML scripting tags or the script block scripting language. See Scripting.
The syntax of each UJML tag is described using a simple notation. See Syntax Notes.
The UJML tags exist in a well-defined hierarchical structure where some tags may contain certain other tags. At the top level is the ujml tag itself. See ujml. This is the root of a UJML file, and which tags it contains and which tags its child tags contain define the structure and type of UJML file it is. See Types of UJML Files.
This documentation describes, for each UJML tag, which tags may contain it and which tags it may contain. If appropriate, the default values for a contained tag are documented and/or whether the contained tag is required.
|
Topic |
Description |
|
The add element yields the sum of the child elements. | |
|
The and element yields true if all the child elements evaluate to true, otherwise it is false. | |
|
This element contains the UJML code for an application file. | |
|
The bg element specifies the background color of a visual element. | |
|
The box element draws a rectangle on the device screen. | |
|
The call element calls a function and yields the result. | |
|
The caption element specifies the caption of an edit or multi-edit box in full-screen mode. This tag is deprecated. | |
|
The clear-state element causes a state variable to transition out without changing its value. | |
|
Provides a text description of the containing element. | |
|
This element contains a UJML component. | |
|
The condition element yields a boolean value for a conditional statement. | |
|
The delay element specifies a delay time in a transition element. | |
|
The discard element removes a resource from device memory. | |
|
This element contains visual elements which display when the containing element is active. | |
|
This element draws a self-painting component on the device screen. | |
|
The div element yields the quotient of the child elements. | |
|
The edit element allows the user to edit a string variable containing a single line of text. | |
|
The eq element yields true if the first child element is equal to the second, otherwise it yields false. | |
|
The eval element evaluates a scripting expression. | |
|
The events element contains multiple event elements scoped to the containing element. | |
|
The execute element contains XML scripting elements. | |
|
This element expands a visual element template on to the device screen. | |
|
The face element specifies the font face of a visual element that displays a string. | |
|
The fg element specifies the foreground color of a visual element. | |
|
The fn element defines a function key with a label and an event. | |
|
This element defines a function. | |
|
This element contains function definitions scoped to the containing element. | |
|
The gt element yields true if the first child element is greater than the second, otherwise it yields false. | |
|
The gte element yields true if the first child element is greater than or equal to the second, otherwise it yields false. | |
|
The height element specifies the height of a visual element. | |
|
The if element is a conditional 'if' statement. | |
|
The image element draws a picture on the device screen. | |
|
The image-url element yields the the string value of the passed image file reference with the extension of the device's preferred file format appended. | |
|
This element includes a state machine or an interface into a UJML file. | |
|
This element specifies a component reference value for the containing element. | |
|
This element contains interface elements that declare interfaces for UJML Components. | |
|
The label element draws text with an optional background on the device screen. | |
|
The line element draws a line on the device screen. | |
|
The lt element yields true if the first child element is less than the second, otherwise it yields false. | |
|
The lte element yields true if the first child element is less than or equal to the second, otherwise it yields false. | |
|
The max element yields the greater of two or more int values. | |
|
The min element yields the lesser of two or more int values. | |
|
The mod element yields the modulus of the child elements. | |
|
The mult element yields the product of the child elements. | |
|
The multi-edit element allows the user to edit a string variable containing multiple lines of text. | |
|
The multi-label element draws multi-line text with an optional background on the device screen. | |
|
The multi-text-height element yields an int height value, in pixels, for the passed text given the passed width, font size, font style, and font face. | |
|
This element specifies a component name. | |
|
The ne element yields true if the first child element is not equal to the second, otherwise it yields false. | |
|
The not element yields true if the child element evaluates to false, otherwise it yields false. | |
|
The or element yields true if any of the child elements evaluate to true, otherwise it yields false. | |
|
The oval element draws an ellipse on the device screen. This element has been deprecated in favor of x-oval. | |
|
The parameters element contains the the arguments for the containing function or event element. | |
|
This element contains the UJML code for a partition file. | |
|
The play element declares one or more sounds. | |
|
The polygon element draws an arbitrary polygon on the device screen. | |
|
This element draws a multi-segmented line on the device screen. | |
|
The prefetch element fetches a resource across the network, but does not load it into device memory. | |
|
The ref element yields the value of a variable. | |
|
The resource element declares a resource to load into the device's memory. | |
|
This element declares one or more resources to load into the device's memory. | |
|
This element yields the return value of a function. | |
|
The round-box element draws a rectangle with rounded corners on the device screen. | |
|
Contains a script block. | |
|
The set element assigns a value to a variable. | |
|
Assigns a value to a state variable. | |
|
The size element specifies the font size of a Visual Element that displays a string. | |
|
The sound element specifies a sound file to play. This has been deprecated in favor of x-sound element. | |
|
The sound-url element yields the the string value of the passed audio file reference with the extension of the device's preferred file format appended. | |
|
The src-x element specifies the horizontal position (in pixels) of a source region in an image element. | |
|
The src-y element specifies the vertical position (in pixels) of a source region in an image element. | |
|
The state element contains transition elements specifying state transitions for a single state variable. | |
|
The state-index element yields the int value of the current index for the requested dimension of an array state variable. | |
|
A state-machine element contains the code for a UJML state machine. | |
|
A state-machines element contains one or more state-machine elements, each defining one state machine. | |
|
The state-var element a state variable. | |
|
The state-variables element contains state variables scoped to the containing element. | |
|
The strcat element yields a string containing all the arguments, concatenated. | |
|
The streq element yields true if both of the arguments have the same value, otherwise it yields false. | |
|
The strlen element yields an int value giving the count of characters in the contained string. | |
|
The string-to-int element yields an int value of the contained string or 0 if the string contains non-numeric characters. | |
|
The style element specifies the font style of a visual element that displays a string. | |
|
The sub element yields the difference of the child elements. | |
|
The substring element yields a sub-part of a string. | |
|
This element declares a visual element template. | |
|
This element contains template elements declaring visual element templates. | |
|
The text element specifies the text of a visual element that displays a string. | |
|
The text-height element yields an int height, in pixels, for the passed font size, font style, and font face. | |
|
The text-width element yields an int width, in pixels, for the passed text given the passed font size, font style, and font face. | |
|
The trace element sends a message to the trace pane of the UJML debugger. | |
|
This element contains the actual code of a UJML file. | |
|
The url element specifies a file reference for an external resource. | |
|
The val element yields a literal value. | |
|
The variables element contains variables scoped to the containing element. | |
|
The while element is a conditional looping statement which repeats contained scripting statements while a value is true. | |
|
The width element specifies the width of a visual element. | |
|
The x element specifies the horizontal position of a visual element. | |
|
The x1 element specifies the horizontal position of the beginning point of a line. | |
|
The x2 element specifies the horizontal position of the ending point of a line. | |
|
The x-alpha element specifies the alpha opacity of an image element. | |
|
Specifies the height of the ellipse used to draw the rounded corners of a round-box. | |
|
Specifies the width of the ellipse used to draw the rounded corners of a round-box. | |
|
The x-bg element specifies the background color of a visual element where background color support varies from device to device. | |
|
The x-clip element specifies if child visual elements are clipped to the region of the parent element. | |
|
The x-oval element draws an ellipse on the device screen. | |
|
The x-sound element specifies a sound file to play. | |
|
The x-src-height element specifies the height (in pixels) of a source region in an image element. | |
|
The x-src-width element specifies the width (in pixels) of a source region in an image element. | |
|
The y element specifies the vertical position of a visual element. | |
|
The y1 element specifies the vertical position of the beginning point of a line. | |
|
The y2 element specifies the vertical position of the ending point of a line. |
|
Copyright (c) 2000-2007 UIEvolution, Inc. All rights reserved.
|
|
What do you think about this topic? Send feedback!
|