Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

Modifying the Control Panel


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
If you wish to add, modify, or remove the buttons on the Macros toolbar or menu, you can do so via the IDLDE interface using the Edit Macros dialog. See Creating UNIX Macros for details. Whether you modify your macros using the dialog or by editing a resource file manually, the results are the same. There is little advantage to adding macros to the .idlde file manually.

Adding Macros Toolbar Buttons

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:

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 

Adding Macros Menu Entries

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.

Examples

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 

Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]