ACTION

Description

This element enables the designer to create behaviors that can be executed by the end user (see the action buttons widgets).

Common Attributes

See common elements attributes.

Specific Attributes
Name Value Type Default Value Description Comment V. Exp.

type

type of the action

Empty.

The type of action to execute.

Each action type may use specific attributes. See the available action types for more information.

1.9.1

No

name

string

Empty.

Displayed named of the action.


1.9.1

No

comment

string

Empty.

Comment about the action.


1.9.1

No

enabled

boolean

Empty.

activation status of the action.

If disabled, the action will not execute.

1.9.1

1.9.1

Actions Types

The following table summarizes all stock action types available with their attributes. Manufacturers may register additionnal custom action types to this list. Please refer to the plug-in's documentation for more information about the custom action used.

OpenUrl

Asks the system shell to open the corresponding url (may be a local file path or a web url).

Name Value Type Default Value Description Comment V.

url

file path or url

Empty.

The location of the resource to open.

The result may depend on the end user's system and the applications registered to open the file.

1.9.1

DisplayFileOpenDialog (beta)

Opens a standard system open dialog box.

Name Value Type Default Value Description Comment V.

file_path_string_id

string id

Empty.

The identifier of the string object where the chosen file path should be stored.

1.9.1

file_types

string

*.*

wildcards list (semi-column separated) for file types accepted by the open dialog.

Example: "*.txt;*.html"

1.9.1

DisplayMessageBox

Opens a standard system message box.

title

string

Empty.

Title of the message box.

1.9.1

message

string

Empty

message to be displayed in the message box.

Example: "*.txt;*.html"

1.9.1

style

info, warning, error, none

none

type of the system message box.

1.9.1

timeout

integer

-1

The timeout specifies the number of milliseconds before the message box disappears.

If no timeout is specified, the messagebox will not disappear until clicked.

1.9.1

button0

string

Ok

Name of the first button.

By default, message boxes have a single button named "Ok"

1.9.1

button1

string

Empty

Name of the second button.

(optional)

1.9.1

button2

string

Empty

Name of the third button.

(optional)

1.9.1

button3

string

Empty

Name of the fourth button.

(optional)

1.9.1

buttonX_action_id

action id

Empty

Action to be executed when the user clicks on button X

By default, no action is executed, except closing the message box. X ranges from 0 to 3.

1.9.1

close_button

button0, button1, button3, button4

Empty

action of the window close button

Windows only

1.9.1

result_param_id

param id

Empty

identifier of a parameter where the result (Clicked button number) should be stored

Parameter range should be [-1;3] as the dialog may return -1 in case of timeout, or window close on windows.

1.9.1

Examples

The following example creates a button that displays a message box saying "Hello World!":

<?xml version="1.0" encoding="utf-8" ?>
<SKIN>
    <ACTION id="my_action" type="DisplayMessageBox" message="Hello World!" />
    <IMAGE_ACTION_BUTTON action_id="my_action" image="my_image" />
</SKIN>