Chapter 26. Extending Storyboard Functionality

Table of Contents

User Defined Action Templates
User Defined Render Extension Templates

Storyboard Suite, in its default configuration, provides enough standard functionality to satisfy most application development requirements. When additional functionality is required, there are several ways in which users can choose to extend the behavior of both Storyboard Designer and Engine.

User Defined Action Templates

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

NAME

This is the name of the action as it appears in the Storyboard Engine runtime (gapp) file.

ARG_NAME

This is the name of an argument option as it appears in the Storyboard Engine runtime (gapp) file.

ARG_TYPE

This is the type of the argument and can be one of the following:

boolean

A boolean true/false value. An optional attribute, 'default' can be used to specify the default value.

color

A color value. An optional attribute, 'default' can be used to specify the default value as a hexadecimal value (0xRRGGBB).

file

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"

float

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

integer

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

string

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.