The Control Panel, with the resource name control, is located below the IDL Development Environment Menu bar. The Control Panel bar is a RowColumn widget containing buttons which serve as shortcuts for common commands.
You can modify the existing Control Panel settings by editing the idlde*control values in the system-wide Idl resource file or overriding those settings in your local .idlde file. In addition, you can add buttons to the Macros toolbar or menu by adding resources to your .idlde file.
| Note |
.idlde file manually.
The idlButtonsUser resource defines the resource name for each button on the Macros toolbar in the Control Panel. The resource name details button attributes, such as its label or pixmap, its associated IDL command, and its status bar message.
To add a button to the Macros toolbar, make the following modifications to the .idlde file:
idlde*control*idlButtonsUser list. The buttons are created in the order specified.idlde*control*<new button>*labelString or labelPixmap resources (or both). These resources define the button text or image. If you choose to use a pixmap label, be sure the file you specify abides by the restrictions described in Bitmaps for Control Panel Buttons.idlde*control*<new button>*idlCommand resource. This is the text of the IDL command to execute. You can also include command stream substitutions; see Command Stream Substitutions for details.Alternatively, you can add an idlAction resource. See Action Routines for details.
idlde*control*<new button>*hint resource. This is the text that appears in the Status Bar when the cursor is positioned over the new button.idlde*control*<new button>*tip resource. This is the text that appears as a "tooltip" when the cursor is positioned over the new button.
If you want your changes to be available to all users on the system, you can also modify the system-wide Idl resource file, located in the following directory:
$IDL_DIR/resource/X11/lib/app-defaults
To add entries into the Macros menu, follow the same steps outlined above, modifying the idlde*menubar*macrosMenu*macrosListUser resource and substituting idlde*menubar*macrosMenu*<new menu item> for idlde*control*<new button> in the above steps.
To add a button called Reset All to the Control Panel with a color pixmap stored in the file resetall.xpm located in your home directory, add the following resources to the .idlde file in your $HOME directory:
idlde*control*idlButtonsUser: <exiting buttons> resetall idlde*control*resetall*labelPixmap: resetall.xpm idlde*control*resetall*labelString: Reset All idlde*control*resetall*idlCommand:\ RETALL & WIDGET_CONTROL,/RESET idlde*control*resetall*statusString:\ Stop execution of the current code and return to\ the main programming level
Note that in this example the new button is added at the end of the list of existing buttons. You can locate the new button anywhere in the list.
To specify a pixmap located in particular directory, specify the full file path of the pixmap file, for example:
idlde*control*resetall*labelPixmap:\ /home/user/bitmaps/resetall.xpm
To create two rows of the Control Panel from the default of one row, set the numColumns resource to 2:
idlde*control*numColumns: 2
To use label (text) buttons in the Control Panel set labelType to XmSTRING. To use icon (graphics) buttons set labelType to XmPIXMAP.
idlde*control*labelType: XmSTRING or idlde*control*labelType: XmPIXMAP