Most Motif widgets supply action routines which can be bound to events (such as keypress events). Action routines provided by IDL can be used to define commands for Control Panel buttons or menu items by using the idlAction resource.
The following action routines can be used in the same manner as the IDL commands specified in an idlCommand resource. The syntax to add an action routine to a control panel button is:
Idl*idlde*control*buttonName*idlAction: Action
or
Idl*idlde*control*buttonName*idlAction: Action(Arguments)
where buttonName is the name of the button and Action is the name of the action routine. Arguments to the action routine, if require, are enclosed in parentheses.
Use IdlBreakpoint to control the placement of breakpoints. If no parameter is specified, the breakpoint is set on the current line. At least one of the arguments from the following table must be set:
For example, to use this action routine to clear a breakpoint, the Action specified would be:
IdlBreakpoint(CLEAR)
Use IdlClearLog to erase the contents of the Output Log.
Use IdlClearView to clear the contents of the currently-active file in the Multiple Document Panel.
Use IdlCommandHide to hide or expose the Command Area, which includes the Command Input Line and the Output Log. One of the following arguments must be set: Show, Hide, or Toggle.
Use IdlCompile to compile the file in the currently-active editor window. One of the arguments from the following table must be set:
|
Argument
|
Action
|
|---|---|
|
FILE
|
Compiles the currently-active file.
|
|
TEMPORARY
|
Compiles the currently-active file into a temporary file
|
|
RESOLVE
|
Resolves all referenced and uncompiled IDL routines
|
Use IdlControlHide to hide or expose the Control Panel. One of the following arguments must be set: Show, Hide, or Toggle.
Use IdlEdit to manipulate the contents of the currently-selected editor window. One of the arguments from the following table must be set:
Use IdlEditMacros to display the Edit Macros dialog.
Use IdlExit to cause IDLDE to act as though the EXIT command has been entered. Note that this is usually tied to a menu accelerator (Ctrl-Q in this case), so this routine is rarely called directly.
Use IdlFile to manipulate the currently-selected editor window. One of the arguments in the following table must be set:
Use IdlFileReadOnly to specify the read/write status of the currently-active editor window. One of the arguments from the following table must be set:
|
Argument
|
Action
|
|---|---|
|
READONLY
|
Disable editing of the currently-selected editor window.
|
|
READWRITE
|
Enables editing of the currently-selected window.
|
Use IdlFunctionKey to allow entry of an IDL command into the input command stream. It is typically used to tie IDL commands to function keys. For example:
<Key>F5:IdlFunctionKey("print, 'F5 pressed'")\n
Use IdlInterrupt to cause IDLDE to receive an interrupt. Note that this is usually tied to Ctrl-C as a menu accelerator.
Use IdlListStack to display the current nesting of procedures and functions (calling stack).
Use IdlLogHide to hide or expose the Output Log. One of the following arguments must be set: Show, Hide, or Toggle.
Use IdlRecallCommand to recalls previously entered commands into the command widget. Either the BACK or the FORWARD argument must be specified to indicate the direction of the recall. For example:
<Key>osfUp:IdlRecallCommand(BACK)\n
Use IdlReset to reset the IDL environment.
Use IdlRun to execute the currently-active file.
Use IdlSearch to call the Find dialog for a search of the current Multiple Document Panel. One of the optional arguments from the following table may be used:
Use IdlStatusHide to hide or expose the Status Bar. One of the following arguments must be set: Show, Hide, or Toggle.
Use IdlStep to control statement execution for debugging. At least one of the arguments from the following table must be set.
Use IdlTrace to display a dialog box to control program tracing.
Use IdlViewHide to hide or expose the Multiple Document Panel. One of the following arguments must be set: Show, Hide, or Toggle.
Use IdlWindows to manipulate the state of the Editor windows. One of the arguments from the following table must be set: