[comp.windows.x] Does OpenLook have a "broadcast" mechanism

mls@cbnewsm.att.com (mike.siemon) (03/20/91)

> I remember reading somewhere about a "broadcast" mechanism  for OpenLook
> which allows global preferences and resource settings to be modified and
> sent to all currently executing applications.   I have checked the
> only articles I have on OpenLook (the Autumn'88 edition of SunTechnology)
> but couldn't find any references to this mechanism.
>
> Does this mechanism exist in OpenLook and if so where and are there
> any papers that mention its concept/design/use ??
> 
> Is this the way Property Windows work?

The OPEN LOOK Intrinsics Toolkit has a ``dynamic resource''
feature built into most of the widgets. This is not a general
resource broadcast means, rather one limited to those resources
likely to need dynamic, widespread changes. Currently, this means
colors:

	resource	resource class

	background	Background, TextBackground
	foreground	Foreground
	fontColor	FontColor, TextFontColor
	borderColor	BorderColor
	inputFocusColor	InputFocusColor

The design includes setting an event handler on the widgetized
root window, to catch a change in the RESOURCE_MANAGER property.
The design also includes having each widget ``register'' (through
a widget class field) the list of resources of ``dynamic
interest''. Right now these resources are the ones listed above,
but in theory any resource could be so registered.

When a change in RESOURCE_MANAGER occurs, the toolkit marches
through the widget tree changing the values of the registered
resources. To allow the application to maintain final control
over widget coloration, the design keeps track of values set
explicitly through initialize or set_values, and avoids resetting
their values when the RESOURCE_MANAGER property changes.

Thus, a user could affect a global change in coloration by
setting a combination of the above resources using, say,
xrdb. The USL workspace manager provides a property sheet
that gives the user a convenient method of setting colors,
and it announces these colors through the RESOURCE_MANAGER
property.

Steve Humphrey
UNIX System Laboratories