[Contents] [Index] [Help] [Browse <] [Browse >]
 -- Command: callhook ID/K, COMMAND/K, PORT/K, PRESS/S, APP/S, DROP/S,
          INCLUDE/K, EXCLUDE/K, TRIG=ATTRS/K/M
     This command is used to define callback notification methods for
     objects. Trigger actions can be defined for object selection, drop
     and app operations, as well as object specific actions.

        * ID - an id of an existing gadget.

        * COMMAND - if given, the command will be executed whenever the
          gadget is pressed (PRESS switch specified or default for no
          switch), an icon is dropped (APP switch), or another object
          is dropped (DROP switch) on the gadget.  For a complete
          description of this option see Command-Port Options.  Note
          that the object label (for PRESS actions), or an icon name
          (for APP actions), or a dropped object label (for DROP
          actions) will be used to replace a `%s' contained in the
          command string, as appropriate.

        * PORT [I..] - a specific host port may be specified by this
          argument. For a complete description of this option see
          Command-Port Options.

        * PRESS - if this flag is given then the specified command
          (given in the COMMAND option) will will issued if the object
          is pressed. (same as the default action given with the
          object's COMMAND option).

        * APP - if this flag is given then the specified command (given
          in the COMMAND option) will will issued if an icon is dropped
          on the object from the Workbench.

        * DROP - if this flag is given then the specified command (given
          in the COMMAND option) will will issued if another object is
          dropped on the object through a drag and drop operation. 
          Using the INCLUDE or EXCLUDE options drag and drop operations
          can be restricted to specific objects.

        * INCLUDE - Limits drag and drop operations to a list of
          objects.  The list consists of object ids separated with
          commas.  The specified objects do not have to actually exist
          (i.e. the listed objects can be created after the 'callhook'
          is defined).

        * EXCLUDE - Limits drag and drop operations by excluding a list
          of objects.  The list consists of object ids separated with
          commas.  The specified objects do not have to actually exist
          (i.e.  the listed objects can be created after the 'callhook'
          is defined).

        * TRIG - A TAG pair consisting of a trigger attribute and
          value.  Used to create arbitrary callback hook triggers.  Do
          not use if PRESS, APP or DROP options are specified.

     Example use of this command:

          /* the following defines a command that will be triggered everytime
             a list entry becomes active */
          callhook ID DIR1 COMMAND """string ID STR1 CONTENT %s""" PORT DIRUTIL,
              TRIG MUIA_List_Active MUIV_EveryTime
          
          /* the following defines a command triggered by a drop action, but will
             only accept drop querys from the 'BLST' object */
          callhook ID VLST DROP COMMAND """build:attrs VADD %s""" INCLUDE 'BLST'