A child widget holding this trait wants to be notified whenever its parent's visual state changes
Format
#include <Xm/CareVisualT.h> typedef struct { int version; XmCareVisualRedrawProc redraw; } XmCareVisualTraitRec, *XmCareVisualTrait; Boolean (*XmCareVisualRedrawProc)WidgetWidgetWidgetMask
DESCRIPTION
The appearance of many primitive widgets depends on the colors and pixmaps of their parents. For example, Motif button widgets use the background color and background pixmap of their parents in order to unhighlight themselves. Therefore, Motif primitive widgets that depend on their parent's appearance need to be alerted whenever their parent's appearance changes. The alerting mechanism is the XmQTcareParentVisual trait. A child widget holding this trait wants to be notified whenever there is a change in its parent's visual appearance that may affect it.
All Manager widgets must notify their children whenever the Manager's visual appearance changes. The setValues method of the XmManager widget takes care of this notification for all of its subclasses. Therefore, if you are writing a subclass of Manager, you ordinarily do not have to provide any code to notify children of these visual changes. However, Manager does not notify its children of changes to SelectColor. Therefore, if you are writing a subclass of Manager that needs to notify its children about changes to SelectColor, then your subclass of Manager will need to call its children's redraw trait method.
The XmPrimitive widget and all its subclasses hold this trait. Therefore, if you are writing a subclass of Primitive, the XmQTcareParentVisual trait will automatically be installed on it.
Boolean redrawWidget childWidgetWidget currentParentWidgetWidget newParentWidgetMask visualChangeMask
The redraw trait method of XmPrimitive examines the visualChangeMask argument to see what has changed in the visual appearance of its parent. If the parent's background pixmap or background color has changed, then the redraw trait method invokes the primitive.border_unhighlight method (if unhighlighting is necessary).
If you are writing a primitive widget, you do not have to provide a redraw trait method unless your primitive widget depends on its parent's appearance in a non-default way. In this case, your redraw trait method should probably envelop the redraw trait method of XmPrimitive.
The NoVisualChange constant symbolizes that nothing has changed.
This method returns a Boolean value. A returned value of True means that the child needs to be redrawn. A returned value of False means that the child does not need to be redrawn.
RELATED