@begin(header)
author: ackerman@ics.uci.edu
show_author: ShowNone
author_organization: MIT
expiration_date: 07/03/93
last_modifier: ackerman@ics.uci.edu
last_mod_date: 07/03/91
mod_num: 1
@end(header)
@begin(M)
From: Ralph R. Swick 


> static void Realize( w, valueMask, attributes )
>      Widget w;
>      Mask *valueMask;
>      XSetWindowAttributes *attributes;
> {
> 	TestWidget c = (TestWidget)w;
> 	XtRealizeWidget(c->test.label);
> }


The realize procedure has to actually create the window for
the widget.  In this case, it also has to make sure to create
the window _before_ attempting to realize the child (since the
child will be a subwindow).  The most-frequently-correct action
is to call your superclass realize from within your own
realize;

	TestWidget c = (TestWidget)w;
	*(testWidgetClass->core_class.superclass->
	    core_class.realize) ( w, valueMask, attributes )
	XtRealizeWidget(c->test.label);

[Note that you can't use XtSuperclass(w), as things will get
fouled up if someone ever tries to subclass TestWidget.  I have
gotten into the habit of defining a macro, "superclass", for
thisWidgetClass->core_class.superclass so that the 3 or 4
typical references in the widget.c file are uniform.]
@end(M)


@begin(Q)
Why use XtDefaultForeground and XtDefaultBackground in my widget's
resources list?
@end(Q)

@begin(A)
As of X11R3, XtDefaultForeground and XtDefaultBackground were added.
Depending upon the state of the reverse video flag these strings are
converted to BlackPixel() or WhitePixel().  When the user specifies
reverse video (-rv), these take the correct values.

See the Xt Intrinsics manual for details.
@end(A)
