TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
ActionMap Class Reference

Inherits SimObject.

## Public Member Functions
void | bind (device, action, [modifier, mod...], command)
void | bindCmd (device, action, makeCmd, breakCmd)
void | bindObj (device, action, [modifier spec, mod...], command, object)
String | getBinding (command)
String | getCommand (device, action)
String | getDeadZone (device, action)
Float | getScale (device, action)
Boolean | isInverted (device, action)
void | pop ()
void | push ()
void | save ([fileName][, append])
void | unbind (device, action)
void | unbindObj (device, action, object)
Public Member Functions inherited from SimObject
Integer | clone ([copyDynamicFields=false]?)
void | delete ()
Integer | getId ()
void | setName (newName)
String | getName ()
String | getClassNamespace ()
String | getSuperClassNamespace ()
void | setClassNamespace (nameSpace)
void | setSuperClassNamespace ()
Boolean | isMethod (string methodName)
String | call (methodName, [args]*)
void | dumpClassHierarchy ()
void | dump ()
Boolean | isMemberOfClass (string classname)
String | getClassName ()
String | getFieldValue (fieldName)
Boolean | setFieldValue (fieldName, value)
Integer | getDynamicFieldCount ()
String | getDynamicField (index)
Integer | getFieldCount ()
String | getField (int index)
void | setProgenitorFile (file)
String | getProgenitorFile ()
Integer | getType ()
String | getFieldType (fieldName)
void | setInternalName (string InternalName)
String | getInternalName ()
Boolean | isChildOfGroup (groupID)
Integer | getGroup ()
Boolean | startTimer (callbackFunction, float timePeriod, [repeat]?)
void | stopTimer ()
Boolean | isTimerActive ()
Integer | schedule (time, command, [arg]*)
Boolean | save (fileName, [selectedOnly]?)
void | addFieldFilter (fieldName)
void | removeFieldFilter (fieldName)

## Member Function Documentation

void bind | ( | device | ,
|  | action | ,
|  | command |
| ) |  |

Use the bind method to associate a function to a keystroke or other device input. The command bound via the bind function must be specified as a flat name with no elipses or semi-colon termination and will be called on make and break events (i.e. key press and release for a mapped key). Args: Warning: When a function is bound to a keystroke or other device input, and no other versions of the binding are provided, the function will be called even if a modifier key like CTRL, ALT, or SHIFT is also pressed.

Parameters

  device | Name of the device to bind the command to.
  action | Name of the action to watch for.
  modifier | Special modifiers (mouse only), such as dead spot, etc.
  command | The function to be called on make and break.

Returns
  No return value.

See also
  bindCmd, getBinding, unbind

void bindCmd | ( | device | ,
|  | action | ,
|  | makeCmd | ,
|  | breakCmd |
| ) |  |

Use the bindCmd method to associate up to two functions to a keystroke or other device input. The makeCmd is bound to the make event and the breakCmd is bound to the break event and in both cases, the commands are specified as complete scripts, with all arguments, elipses, and the terminating semi-colon. Either of these commands may be non-specified (NULL strings). For clarification, see 'Bind Sample' example below.

Parameters

  device | Name of the device to bind the command to (see 'Device Table' below).
  action | Name of the action to watch for(see 'Action Table' below).
  makeCmd | The function to be called on make event.
  breakCmd | The function to be called on break event.

Returns
  No return value.

See also
  bind, getBinding, unbind

void bindObj | ( | device | ,
|  | action | ,
|  | command | ,
|  | object |
| ) |  |

Use the bindObj method to associate a function to a keystroke or other device input. The command bound via the bind function must be specified as a flat name with no elipses or semi-colon termination and will be called on make and break events (i.e. key press and release for a mapped key). Args: Warning: When a function is bound to a keystroke or other device input, and no other versions of the binding are provided, the function will be called even if a modifier key like CTRL, ALT, or SHIFT is also pressed.

Parameters

  device | Name of the device to bind the command to.
  action | Name of the action to watch for.
  modifier | Special modifiers (mouse only), such as dead spot, etc.
  command | The function to be called on make and break.
  object | The explicit object (it defaults to NULL when you call bind() )

Returns
  No return value.

See also
  bindCmd, getBinding, unbind

String getBinding | ( | command |  | ) |

Use the getBinding method to get the binding for a specified command.

Parameters

  command | The function to seek a binding for.

Returns
  Returns a string containing the binding as a field (TAB separated string), or a NULL string meaning 'no binding found'.

See also
  bind, bindCmd

String getCommand | ( | device | ,
|  | action |
| ) |  |

Use the getCommand method to get the function associated with a specific device + action pair.

Parameters

  device | Name of the device to bound to a command (see 'Device Table' below).
  action | Name of the action to watch for (see 'Action Table' below).

Returns
  Returns the function name or specification associated with the specified device + action pair, or a NULL-string meaning 'no binding found'.

See also
  bind, bindCmd, getBinding

String getDeadZone | ( | device | ,
|  | action |
| ) |  |

Use the getDeadZone method to get the dead-zone associated with a specific device + action pair.

Parameters

  device | Name of the device to bound to a command (see 'Device Table' below).
  action | Name of the action to watch for (see 'Action Table' below).

Returns
  Returns a dead-zone specification, or \0 0\ meaning that there is no dead-zone, or a NULL string meaning the mapping was not found.

See also
  bind, bindCmd

Float getScale | ( | device | ,
|  | action |
| ) |  |

Use the getScale method to get the scale associated with a specific device + action pair.

Parameters

  device | Name of the device to bound to a command (see 'Device Table' below).
  action | Name of the action to watch for (see 'Action Table' below).

Returns
  Returns 1 if no scale is associated with the specified device + action pair, or the mapping was not found.

See also
  bind, bindCmd

Boolean isInverted | ( | device | ,
|  | action |
| ) |  |

Use the Purpose method to determine if a specific device + action pair in inverted. This only applies to scrolling devices.

Parameters

  device | Name of the device to bound to a command (see 'Device Table' below).
  action | Name of the action to watch for (see 'Action Table' below).

Returns
  Returns 1 if the mouse (or other scrolling device) is inverted, 0 otherwise.

See also
  bind, bindCmd

void pop | ( |  | ) |

Use the pop method to de-activate an ActionMap and remove it from non-global ActionMap stack.

Returns
  No return value.

See also
  push

void push | ( |  | ) |

Use the push method to activate an ActionMap and place it at the top of the non-global ActionMap stack.

Returns
  No return value.

See also
  pop

void save | ( |  | ) |

Use the save method to save an entire action map specification to a file. If append is not specified, or specified as false, fileName will be overwritten, otherwise the action map will be appended to the file.

Parameters

  fileName | Full path to file in which to store action map definition.
  append | If true, do not overwrite the file, else start from scratch.

Returns
  No return value

void unbind | ( | device | ,
|  | action |
| ) |  |

Use the unbind method to remove a previosly specified device + action pair from the action map.

Parameters

  device | Name of the device to bound to a command (see 'Device Table' below).
  action | Name of the action to watch for (see 'Action Table' below).

Returns
  No return value.

See also
  bind, bindCmd

void unbindObj | ( | device | ,
|  | action | ,
|  | object |
| ) |  |

Use the unbind method to remove a previosly specified device + action pair from the action map.

Parameters

  device | Name of the device to bound to a command (see 'Device Table' below).
  action | Name of the action to watch for (see 'Action Table' below).
  object | Explicit object (it defaults to NULL when you call unbind() ).

Returns
  No return value.

See also
  bind, bindCmd