Creating UNIX Macros
You can modify the contents of the Macros menu and macros toolbar, either using the Edit Macros dialog (displayed by selecting Edit... from the Macros menu) or by manually editing the user resource (.idlde) file.
Using the Edit Macros Dialog
The Edit Macros dialog allows you to add, remove, or modify macros that appear either in the Macros menu or the Macros toolbar.
To add a new macro, do the following:
- Enter a name for your macro in the Name field. The Name appears only in the Edit Macros dialog.
- Enter a label for your macro in the Label field. The label will be used in the Macros menu (if selected).
- Enter the name of the bitmap (
.xbm or .xpm) file associated with the macro in the Bitmap field. The bitmap will be used on the Macros toolbar (if selected). See Bitmaps for Control Panel Buttons for details.
- Enter text to be displayed on the IDLDE status bar in the Status bar text field.
- Enter text to be displayed as a tooltip when the mouse cursor is positioned over the toolbar button in the Tip text field.
- Enter the IDL command to be executed in the IDL Command field. See Command Stream Substitutions for information on the types of dynamic information that can be included in the command.
In addition to IDL-language commands, you can attach IDL Motif Action Routines to a macro. See Action Routines for details.
- Select the Menu checkbox if you want the macro to appear on the Macros menu.
- Select the Toolbar checkbox if you want the macro to appear on the Macros toolbar.
- Click Add to add the new macro, then click OK.
To Remove an existing macro, select it from the list and click Remove. To rearrange macros in the list, use the up- and down-arrow buttons.
Bitmaps for Control Panel Buttons
It is recommended that bitmaps for control panel buttons:
- Be in either XBM (X11 bitmap file) or XPM (X11 system pixmap file) format, with the file extension
.xbm or .xpm.
- Supply the full path name to the bitmap file. Alternatively, if the bitmap is located in one of the following directories, you can supply only the base file name:
$IDL_DIR/resource/X11/lib/app_defaults
$IDL_DIR/resource/X11/lib/app_defaults/bitmaps
$HOME
$HOME/bitmaps
The above directories show the default search path for a bitmap file if nothing other than the root file name is specified in the .idlde file.
Manually Editing the Resource File
Although there is little advantage in doing so, you can also modify the Macros menu or toolbar by manually editing either your own local IDL resource file or the system-wide resource file. For details, see Modifying the Control Panel.