When the Storyboard SDK is used to contribute new actions, it is desirable to have those actions available within the Storyboard Designer environment so that application designers can invoke the actions and configure their properties. To do this, an action template file describing the name and properties of the action can be created.
Action template files are added to individual projects and should be placed
in the templates
directory of the project and should use
the file extension sbat
(Storyboard Action Template)
The format of an action template file (sbat
) file is as follows:
<actiontemplates>
<template name="NAME">
<arguments>
<element name="ARG_NAME" type="ARG_TYPE" />
... as many elements as there are arguments ...
</arguments>
</template>
... as many templates as there are actions ...
</actiontemplates>
Where the fields NAME, ARG_NAME and ARG_TYPE are defined as
This is the name of the action as it appears in the Storyboard Engine runtime (gapp) file.
This is the name of an argument option as it appears in the Storyboard Engine runtime (gapp) file.
This is the type of the argument and can be one of the following:
A boolean true/false value. An optional attribute, 'default' can be used to specify the default value.
A color value. An optional attribute, 'default' can be used to specify the default value as a hexadecimal value (0xRRGGBB).
A file string. An optional 'extensions' argument list contains a list
of comma separated filter file extensions, without leading dots for example
extensions="gif;png;bmp"
A numeric floating point value. An optional attribute, 'default', can be used to specify the default value. The range of the number can also be limited using the optional 'min' and 'max' attributes
A numeric integer value. An optional attribute, 'default', can be used to specify the default value. The range of the number can also be limited using the optional 'min' and 'max' attributes
A text string value. An optional attribute, 'default' can be used to specify the default string value.
When the template file is placed in the templates
directory, the new
actions will be automatically loaded into Designer the next time the project is opened.