When you add components to the interface, you can build on this base style. The following fragment shows how you
might handle defining a ToggleButton−specific style:
list toggle_btn_style : arguments {
arguments base_style;
XmNindicatorSize = 10;
XmNindicatorType = XmN_OF_MANY;
XmNselectColor = color ('yellow');
};
Unfortunately, it turns out that most of the resource settings that work well in these situations are best left to resource
files, as we discussed in the previous section. This use of lists can still be useful, however, when you are prototyping
an application and don't feel like using an X resource file. When you are done prototyping, be sure to move the
resource settings that affect appearance to a resource file, so that they can be modified by the user.
You can also use a hierarchy of lists to specify callback resources. If you are developing an application that supports
context sensitive help, the root of your callback hierarchy might be specified as in the following list:
list help_cbs : callbacks {
XmNhelpCallback = procedure help();
};
You can include this list in each widget that supports help. For a group of ToggleButtons, you can augment the list as
follows:
list toggle_cbs : callbacks {
callbacks help_cbs;
XmNvalueChangedCallback = procedure toggle_changed();
};
The following widget definition illustrates how both the style and callback lists might be used:
object hot_fudge : XmToggleButton {
arguments {
arguments attach_args;
arguments toggle_args;
XmNlabelString ...