next up previous contents index
Next: Item Up: Classes and Methods Previous: Input

Interactive

  (subclass of 9.1.3.15 Item)

The class interactive is the abstract superclass for all items, which must react on user events like mouse actions or keyboard input.

If the interactive reacts on a user action, this means that the action is really finished, it calls its action-method.

As a difference to an Item every Interactive has side-effect list of all Items which depend on the Interactive in any way. All these items get an "update" if necessary.

typedef enum {
  rfOff,
  rfDisplist,
  rfOn
} REDRAW_FLAG;
   GRAPE(interactive, "add-layers")()
INTERACTIVE *interactive
Show all layers, which are in the interactive's layer list. See also 9.1.3.14.

   GRAPE(interactive, "add-side-effect")(effect)
INTERACTIVE *interactive
INTERACTIVE *effect
Add effect as a side-effect interactive of the interactive. All side-effect interactives get an update method if the action method is executed. This is useful to keep several interactives up to date, which all control the same variable.
   GRAPE(interactive, "default-action")()
INTERACTIVE *interactive
The default action for all Interactives. Sends the method to the instance.
   (int * ) GRAPE(interactive, "is-active")()
INTERACTIVE *interactive
The method will return a value different to NULL, if the interactive is active. This means, that not only the interactive itself is active, but all groups and the layer the interactive is part of are active.
   GRAPE(interactive, "layer-list-add")(layer)
INTERACTIVE *interactive
LAYER *layer
Add the layer to the layer list of an Item 9.1.3.15. Together with the methods "add-layers" and "remove-layers" as add- and remove-inter-actions the layers in the list could be dependent upon the interactive and be only visible is the item is visible.
   (LAYER * ) GRAPE(interactive, "layer-list-contains")(member)
INTERACTIVE *interactive
LAYER *member
Will return member, if this layer is contained in the layer list. Otherwise it will return NULL.
   GRAPE(interactive, "layer-list-remove")(layer)
INTERACTIVE *interactive
LAYER *layer
Remove the layer from the layer list of an interactive.
   GRAPE(interactive, "mark-side-effect")()
INTERACTIVE *interactive
Update all instances which are in the side-effect list of the interactive. To avoid problem with recursive calls of the method "update" an update method should never call "mark-side-effect".
   GRAPE(interactive, "remove-layers")()
INTERACTIVE *interactive
Will hide all layers, which are in the layer list of the item. If you change the add-action of an item to "add-layers" as the add action and "remove-layers" as the remove action, all layers of the layer list are always removed and added together with the interactive.
   GRAPE(interactive, "remove-layer-action")()
INTERACTIVE * interactive
Remove all layers contained in the layer list of interactive. This is done by calling "remove" on them, i.e. they are deleted, not only hidden.
   GRAPE(interactive, "remove-side-effect")(effect)
INTERACTIVE *interactive
INTERACTIVE *effect
Remove a side effect notifier.
   GRAPE(interactive, "send-to-layers")(method)
INTERACTIVE * interactive
char * method
Send "method" to all entries of the layer list of interactive.
   GRAPE(interactive, "set")(active)
INTERACTIVE *interactive
int active
Set active state. The possible values for active are ACTIVE and active == INACTIVE.

Inactive Interactives are grayed out to prevent usage.

When a Group is inactive all contained Items will behave inactive even if their active flag is set to active.

   GRAPE(interactive, "set-action")(name)
INTERACTIVE *interactive
char *name
Set the action method to of an name interactive. This action will be sent to the item, if the user has touched it, for example pressed a button or finished input typein. Pay attention, that a Function_Bar1d could change its value without being changed by the user. To handle this the Function_Bar1d will send its value-changed-method, which is called every time the value of its variable has changed.
   GRAPE(interactive, "set-instance")(inst)
INTERACTIVE *interactive
INSTANCE *inst
Set the instance. This is the instance the action method sends the method to.
   GRAPE(interactive, "set-label")(label)
INTERACTIVE *interactive
char * label
Set the label of interactive, i.e. the string that is drawn. An example for a label is the text on a Button or the title of a Group. Do not mix up the label and the instance name of an Interactive.
   GRAPE(interactive, "set-method")(name)
INTERACTIVE *interactive
char *name
Set the method, which should be sent from the action method, to method.
   GRAPE(interactive, "set-redraw-flag")(redraw_flag)
INTERACTIVE *interactive
REDRAW_FLAG redraw_flag
Change the kind of graphic redraw an item generates when used. This function is used for item which shouldn't generate a graphic redraw, for example a scrollbar in a list. Interactives inherit the redraw flag of containing Groups.
   GRAPE(interactive, "spread-redraw-flag")(redraw_flag)
INTERACTIVE *interactive
REDRAW_FLAG redraw_flag
Set the redraw flag of interactive. If interactive is a Group, set the redraw flag of all contained Interactivess as well.
   GRAPE(interactive, "switch")()
INTERACTIVE *interactive
Toggle between active and inactive state. Inactive Interactives are grayed out to prevent usage.


next up previous contents index
Next: Item Up: Classes and Methods Previous: Input

SFB 256 Universität Bonn and IAM Universität Freiburg

Copyright © by the Sonderforschungsbereich 256 at the Institut für Angewandte Mathematik, Universität Bonn.