The XmManager widget maintains the values of its resources inside the manager structure. Each resource value is stored in a different field of manager. For example, the value of the XmNshadowThickness resource is stored in the manager.shadow_thickness field. Your manager widget can access any of these fields; for example:
/* Add 2 pixels to the current shadow thickness */ my_manager->my_manager.shadow_thickness += 2;
In addition to all the resource values, the manager structure also holds several fields not tied to resources. Widget writers should become familiar with the fields shown in the following subsections.
The accelerator_widget field is declared as follows:
Widget accelerator_widget;
The manager.accelerator_widget field holds the name of a widget whose accelerators will be automatically propagated to all new children of this manager.
Your own manager widget may modify this field.
Suppose your own manager widget contains accelerators to be installed on all its descendants. In this case, your manager's initialize method should set the manager.accelerator_widget field to the widget ID of your manager widget. Motif will install these accelerators in all the descendants of your manager widget. Furthermore, Motif will copy the value of the manager.accelerator_widget field in your widget to all manager children of your widget.
The active_child field is declared as follows:
Widget active_child;
The manager.active_child field holds the widget ID of the gadget that has keyboard traversal focus. A value of NULL indicates that none of this manager's gadgets currently have keyboard traversal focus.
Your own manager widget should not modify the value of this field.
The background_GC field is declared as follows:
GC background_GC;
XmManager creates the starting GC, which is stored in the manager.background_GC field. Your widget cannot modify the fields in this GC; however, your widget can deallocate this GC and create a new GC more to your liking. The values in this GC are the default values generated by XtGetGC, except those noted in the following list:
If the widget user specifies a valid pixmap for the XmNbackgroundPixmap resource of Core, then
On the other hand, a widget user might not specify a value for the XmNbackgroundPixmap resource, or might specify a bad value for the resource. In either case, the values of tile and fill_style are the defaults generated by XtGetGC.
The bottom_shadow_GC field is declared as follows:
GC bottom_shadow_GC;
XmManager creates the starting GC stored in the manager.bottom_shadow_GC field. Your widget cannot modify the fields in this GC; however, your widget can deallocate this GC and create a new GC more to your liking. The values in this GC are the default values generated by XtGetGC, except those noted in the following list:
If the widget user specifies a valid pixmap for the XmNbottomShadowPixmap resource of XmManager, then
On the other hand, a widget user might not specify a value for the XmNbottomShadowPixmap resource, or might specify a bad value for the resource. In either case, the values of tile and fill_style are the defaults generated by XtGetGC.
The eligible_for_multi_button_event field is declared as follows:
XmGadget eligible_for_multi_button_event;
Motif uses this field to implement multiclick events on gadgets.
Your widget should not alter the value in this field.
The event_handler_added field is declared as follows:
Boolean event_handler_added;
The event_handler_added field is a flag whose initial value is False. The initialize method in the ConstraintClassPart of XmManager sets this flag to True when it installs a gadget event handler.
Your own manager widget should not modify the value of this field.
The has_focus field is declared as follows:
Boolean has_focus;
XmManager sets this field to True when the manager widget has focus and sets this field to False when the manager widget does not. Note that, if a child widget has focus, then XmManager sets this field to False. However, if a child gadget has focus, then XmManager sets this field to True.
Your own manager widget should not modify the value of this field.
The highlight_GC field is declared as follows:
GC highlight_GC;
XmManager creates the starting GC, which is stored in the manager.highlight_GC field. Your widget can not modify the fields in this GC; however, your widget can deallocate this GC and create a new GC more to your liking.
The values in this GC are the default values generated by XtGetGC, except those noted in the following list:
If the widget user specifies a valid pixmap for the XmNhighlightPixmap resource of XmManager, then
On the other hand, a widget user might not specify a value for the XmNhighlightPixmap resource, or might specify a bad value for the resource. In either case, the values of tile and fill_style are the defaults generated by XtGetGC.
The highlighted_widget field is declared as follows:
Widget highlighted_widget;
The highlight_widget fields holds the name of the gadget currently pointed to by the pointer (typically, a mouse). If the pointer does not point to a gadget, then the value of this field will be NULL.
Your own manager widget should not modify the value of this field.
The keyboard_list field is declared as follows:
XmKeyboardData *keyboard_list;
Motif no longer uses this field.
The num_keyboard_entries field is declared as follows:
short num_keyboard_entries;
Motif does not currently use this field.
The selected_gadget field is declared as follows:
XmGadget selected_gadget;
Motif initializes the selected_gadget field to NULL. When a user selects a gadget (typically, by pressing a mouse button), Motif arms the gadget and sets selected_gadget to the ID of the selected gadget. When the user releases the mouse button, Motif disarms the gadget and sets selected_gadget to NULL.
Your widget should not alter the value in this field.
The size_keyboard_list field is declared as follows:
short size_keyboard_list;
Motif does not currently use this field.
The top_shadow_GC field is declared as follows:
GC top_shadow_GC;
XmManager creates the starting GC stored in the top_shadow_GC field. Your widget can not modify the fields in this GC; however, your widget can deallocate this GC and create a new GC more to your liking.
The values in this GC are the default values generated by XtGetGC, except those noted in the following list:
If the widget user specifies a valid pixmap for the XmNtopShadowPixmap resource of XmManager, then
On the other hand, a widget user might not specify a value for the XmNtopShadowPixmap resource, or might specify a bad value for the resource. In either case, the values of tile and fill_style are the defaults generated by XtGetGC.