## 28.2 Tickle Objects

Rather than programming with tickles directly, all graphical entities are provided as classes. To these classes we refer to as tickle classes and to their instances as tickle objects. Applying a tickle object to a message translates it in a straightforward way into a tickle.

Tickle objects themselves enjoy an translation into strings, each tickle object carries a unique identifier that is its translation. Creation of a tickle object creates a new unique identifier, where the exact identifier depends on the tickle class the object is created from. The translation of a tickle object application of course uses the tickle object's identifier.

Figure 28.4: Hierarchy of tickle objects.

The available tickle classes are shown in Figure 28.4, where the classes that are shadowed gray are classes provided by the `Tk` module, the others are just conceptual. The rest of the document will be concerned with giving a short overview on the tickle object interfaces.

Messages to tickle objects are translated in a straightforward way to tickles, for examples see Section 3.2 of ``Window Programming in Mozart''.

In the following we will present values other than tickles that are used in messages to tickle objects.

### 28.2.1 Action Values

An action value is either

A procedure `P`.

  The action is invoked by creating a new thread that applies `P` to action or event arguments.

A listener object method pair `ListenerO``#``M`

  The action is invoked by letting the `ListenerO` serve the message `M1` (see Section 28.11). The message `M1` is obtained by appending action or event arguments to `M`.

An object method pair `O``#``M`

  Here of course, `O` must not be an instance of a listener. The action is invoked by creating a new thread that executes the object application `{``O``` `M1``}`. The message `M1` is obtained by appending action or event arguments to `M`.

### 28.2.2 Action Argument Values

When an action is executed, it possibly has some arguments attached to it. Action argument values describe the number and types of arguments that are used with the invoked action value. For an example see Section 5.8 of ``Window Programming in Mozart''.

Legal action argument values are lists whose elements are drawn from the following set:

`string` | `atom` | `int` | `float`
`list(string)` | `list(atom)` | `list(int)` | `list(float)`

The length of the list defines the number of action arguments and the elements define in the obvious way the type of the arguments.

### 28.2.3 Event Argument Values

When an event is executed, it possibly has some arguments attached to it. Event argument values describe the number, types, and substitutions of arguments that are used with the invoked action value. For an example see Section 6.3 of ``Window Programming in Mozart''. For reference information on substitutions see `bind`.

Legal action argument values are lists whose elements are drawn from the following set:

`string(``V``)` | `atom(``V``)` | `int(``V``)` | `float(``V``)`
`list(string(``V``))` | `list(atom(``V``))` | `list(int(``V``))` | `list(float(``V``))`

The length of the list defines the number of action arguments and the elements define the type of the arguments, where `V` gives the substitution to be performed. For example, the value `[int(x)]` describes, that the action handler value takes a single argument. The single argument will be `x`-coordinate as an integer associated with the event.