XmQTcareParentVisual(3X) UNIX System V XmQTcareParentVisual(3X)
NAME
XmQTcareParentVisual - A child widget holding this trait
wants to be notified whenever its parent's visual state
changes
SYNOPSIS
#include <Xm/CareVisualT.h>
typedef struct {
int version;
XmCareVisualRedrawProc redraw;
} XmCareVisualTraitRec, *XmCareVisualTrait;
Boolean (*XmCareVisualRedrawProc)(
Widget,
Widget,
Widget,
Mask);
VERSION
This page documents Motif 2.1.
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 XmManagerwidget 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.
The redraw Trait Method
Boolean redraw(
Page 1 (printed 7/20/06)
XmQTcareParentVisual(3X) UNIX System V XmQTcareParentVisual(3X)
Widget childWidget,
Widget currentParentWidget,
Widget newParentWidget,
Mask 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 redrawtrait
method invokes the primitive.border_unhighlightmethod (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.
childWidget
Specifies the child widget that is affected by
visual changes in its parent.
currentParentWidget
Specifies the current parent widget.
newParentWidget
Specifies the new parent widget.
visualChangeMask
Specifies a bit mask. Each bit in the mask
represents a different visual attribute of the
parent. If the bit is set, then that visual
attribute has changed. The bit mask may consist of
any combination of the following constants:
VisualForeground
Specifies a visual change in the
parent's foreground color.
VisualHighlightPixmap
Specifies a visual change in the
parent's highlight pixmap.
VisualHighlightColor
Specifies a visual change in the
parent's highlight color.
VisualBottomShadowPixmap
Specifies a visual change in the
parent's bottom shadow pixmap.
VisualBottomShadowColor
Page 2 (printed 7/20/06)
XmQTcareParentVisual(3X) UNIX System V XmQTcareParentVisual(3X)
Specifies a visual change in the
parent's bottom shadow color.
VisualSelectColor
Specifies a visual change in the
parent's select color. (This is the only
visual change that XmManager does not
process.)
VisualTopShadowPixmap
Specifies a visual change in the
parent's top shadow pixmap.
VisualTopShadowColor
Specifies a visual change in the
parent's top shadow color.
VisualBackgroundPixel
Specifies a visual change in the
parent's background color.
VisualBackgroundPixmap
Specifies a visual change in the
parent's background pixmap.
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
XmManager(3) and XmPrimitive(3).
Page 3 (printed 7/20/06)