Note: The procedure for adding new resource type editors is similar to the procedure for adding widgets.
On most systems, Builder Xcessory dynamically loads the shared library containing the callbacks. If the function AddUserDefinedEditors is in the callback library, that function is called. In the AddUserDefinedEditors function, you can make calls to other functions to register the callbacks with Builder Xcessory on all systems.
Building the library
Systems running SunOS 4
On systems running SunOS 4 (or other systems where shared libraries are not feasible), you must modify your interface file (
addWidgets.c in our example), and add to the AddUserDefinedEditors functions defined in the file. Then, re-link Builder Xcessory with
addWidgets.c and with a new file containing the callbacks, as described in
Chapter 2--Adding Widgets.
Adding extended editors
Builder Xcessory understands and provides editors for a large number of resource types. From time to time, you will add a widget or class component to Builder Xcessory that defines a new resource type. In order to more easily work with the new resource type, you might decide to add a new resource type editor (an extended editor) to Builder Xcessory.
For example, the XmDumbLabel defines a new resource type named "justify". We will add both a simple type editor (the editor that appears in the Resource Editor) and an extended editor (the editor that appears when you click on the "..." button next to the simple editor).
Modifying the WML file
Changing the resource definition
The next time you run Builder Xcessory, the XmNjustify resource for the XmDumbLabel widget will use the editors specified for the justify datatype. For a more detailed description of the options available in the WML file, refer toChapter 8--Modifying the WML File.
- Two creation functions (one for the simple editor and one for the extended editor)
- Two update functions
- Two fetch functions