-->
Page 124
Command Area | This area contains several command buttons, described in the following list: |
The Set Save File button allows the user to modify file that the resources will be saved to. This button will bring up a dialog box that will ask you for a filename; after the filename has been entered, either hit carriage-return or click on the Okay button. To pop down the dialog box without changing the save file, click the Cancel button. | |
The Save button will append the resource line already described to the end of the current save file. If no save file has been set, the Set Save File dialog box will be popped up to prompt the user for a filename. | |
The Apply button attempts to perform a XtSetValues call on all widgets that match the resource line described earlier. The value specified is applied directly to all matching widgets. This behavior is an attempt to give a dynamic feel to the resource editor. Since this feature allows users to put an application in states it may not be willing to handle, a hook has been provided to allow specific applications to block these SetValues requests. (See "Blocking editres Requests," following). | |
Unfortunately, due to design constraints imposed on the widgets by the X Toolkit and the Resource Manager, trying to coerce an inherently static system into dynamic behavior can cause strange results. There is no guarantee that the results of an apply will be the same as what will happen when you save the value and restart the application. This functionality is provided to try to give you a rough feel for what your changes will accomplish, and the results obtained should be considered suspect at best. Having said that, this is one of the neatest features of editres, and I strongly suggest that you play with it, and see what it can do. | |
The Save and Apply button combines the Save and Apply actions described earlier into one button. | |
The Popdown Resource Box button will remove the resource box from the display. |
BLOCKING editres REQUESTS
The editres protocol has been built into the Athena Widget set. This allows all applications that are linked against Xaw to be able to speak to the resource editor. Although this provides great flexibility, and is a useful tool, it can quite easily be abused. It is therefore possible for any Xaw application to specify a value for the editresBlock resource to keep editres from divulging information about its internals, or to disable the SetValues part of the protocol.
editresBlock (Class Editresblock) specifies which type of blocking this application wishes to impose on the editres protocol.
The accepted values are as follows:
all | Block all requests. |
setValues | Block all SetValues requests. As this is the only editres request that actually modifies the application, this is in effect stating that the application is read-only. |
none | Allow all editres requests. |
Remember that these resources are set on any Xaw application, not editres. They allow individual applications to keep all or some of the requests editres makes from ever succeeding. Of course, editres is also an Xaw application, so it may also be viewed and modified by editres (rather recursive, I know); these commands can be blocked by setting the editresBlock resource on editres itself.
RESOURCES
For editres, the available application resources are as follows:
numFlashes (Class NumFlashes) specifies the number of times the widgets in the application will be flashed when the Show Active Widgets command in invoked.
Page 125
flashTime (Class FlashTime) specifies the mount of time between the flashes described in the preceding entry. flashColor (Class flashColor) specifies the color used to flash application widgets. A bright color should be used that will immediately draw your attention to the area being flashed, such as red or yellow. saveResourcesFile (Class SaveResourcesFile) is the file the resource line will be append to when the Save button activated in the resource box.
WIDGETS
In order to specify resources, it is useful to know the hierarchy of the widgets that compose editres. In the following notation, indentation indicates hierarchical structure. The widget class name is given first, followed by the widget instance name.
Editres editres Paned paned Box box MenuButton commands SimpleMenu menu SmeBSB sendTree SmeBSB refreshTree SmeBSB dumpTreeToFile SmeLine line SmeBSB getResourceList SmeLine line SmeBSB quit MenuButton treeCommands SimpleMenuumenu SmeBSB showClientWidget SmeBSB selectAll SmeBSB unselectAll SmeBSB invertAll SmeLine line SmeBSB selectChildren SmeBSB selectParent SmeBSB selectDescendants SmeBSB selectAncestors SmeLine line SmeBSB showWidgetNames SmeBSB showClassNames SmeBSB showWidgetIDs SmeBSB showWidgetWindows SmeLine line SmeBSB flashActiveWidgets Paned hPane Panner panner Label userMessage Grip grip Porthole porthole Tree tree Toggle <name of widget in application> . . . TransientShell resourceBox Paned pane Label resourceLabel Form namesAndClasses Toggle dot Toggle star Toggle any Toggle name