From: wman@ztivax.zfe.siemens.de (Dr. Andreas Wnuk)
Newsgroups: fj.mail-lists.x-window
Subject: Wcl 2.03 is Now Available
Date: 9 Nov 92 18:06:10 GMT
Distribution: fj
Organization: Siemens AG, Munich, W-Germany

Date: Mon, 9 Nov 92 11:38:59 -0500
Message-Id: <9211091638.AA06986@expo.lcs.mit.edu>


Wcl 2.03 is Now Available
*************************

A new update of Wcl is now available.  A few enhancements have been
made, and the never-ending-effort to make Wcl easier to build on a
wider range of platforms has resulted in a couple more minor tweaks.

Changes and New Capabilities:
-----------------------------

    o   Greatly improved mechanism for finding and loading resource files.

    o   Bug fixes to XmpTable to handle Gadgets correctly (for those of
        you who still use those stupid Gadgets).  The bug caused core dumps
        in certain situations.

    o   Table widget geometry management tweaks to avoid redundant resizing
        of widgets: those with XmScrolledWindows in there interfaces may
        notice an improvement.

    o   Experimental external interface to the LateBinder mechanism, which
        is intended to support people using Wcl to provide interfaces to
        interpretive environments (like perl).

    o   Man pages which can be installed on SCO machines.

    o   For the benefit of C++ users, `extern "C" {' is now in all includes.

Here are excerpts from the README:

SccsID: @(#) README 1.12 92/11/02 08:43:42

Widget Creation Library Version 2.03 Distribution
------------------------------------------------

The distribution contains files which make up the Widget Creation
Library (Wcl or libWc.a), and resource interpreters and utility
libraries (which include Table widgets) for each of the following
widget sets: Athena, Cornell, Motif, and OpenLook.

Wcl is completely widget set independent.  It provides mechanisms to
allow an entire user interface to be specified in resource files.
Basically, this amounts to providing new resources for specifying the
types of the widgets and the widget heirarchy.  In addition, Wcl
provides several callbacks and action functions which many programs
need.

New Features of Wcl 2.03
------------------------

Resource File Loading   - Resource files named on the command line and
                          with wclResFiles resources are now loaded using
                          a more useful file search algorithm.  See below.
Late Binding            - All callbacks bound with Wcl are now late-bound.
                          This means the application can change the string
                          to callback mapping at any time, and from then
                          on, the new callback procedure will be called.
                          This also means that callbacks do NOT need to
                          be registered before widgets which will invoke the
                          callback are created.  The callback should still
                          be registered before being invoked, of course.
WcAddLateBinderHook,
WcRemoveLateBinderHook  - **Experimental External Interfaces to WcLateBinder**
                          is now provided, intended for use by people building
                          interpretive environments which use Wcl for the UI,
                          and some interpretor (like perl) for the callbacks.
                          See WcCreateP.h and WcLateBind.c for information.
WcInitialSizeIsMinimum  - a creation time callback, very useful for shells.
WcFullNameToWidget      - Enhanced to find direct descendents of the reference
                          widget, and optionally uses slower but tighter name
                          scoping algorithm of Xaw string-to-widget converter.
                          New relative naming operator `/' which means "the
                          nearest shell ancestor which is known to the window
                          manager."  The operator `~' remains "the nearest
                          shell ancestor."  Therefore, it is now easy to find
                          the top level shell from nested menus by using `/'.
WcCvtStringToWidgetList - A useful converter.

Bug Fixes
---------
MapAg.c                 - Free method now set properly for dynamically created
                          mapping agents.
MapAg.h, WcCreate*h     - now wrapped by #ifdef __cplusplus { }
XtVa...                 - no longer used, so everything ports to X11R3
#ifdef sun              - why don't they just use X from mit!?!
WcHomeDirectory         - Now can handle case where user has no home dir.
WcGetResourceType       - no longer dumps core if no parent widget.
-rf on command line     - There is now no problem with loading additional
                          resource files when -rf was used to load the
                          initial file.
Wcl Lib Resources       - These resources are now ALWAYS fetched after all
                          resource files have been loaded.

Seemingly Unfixable Bug
-----------------------

realizeCallback, destroyCallback, popupCallback, and popdownCallback
MUST NOT be specified using resource values for shell widgets derived
from Motif Vendor Shell in most releases of Motif.  Sorry, there is no
way I can see for Wcl to work around this bug in the list of resources
fetched by the Motif Vendor Shell Extension VendorExtInitialize()
procedure.

If you want to specify these resources, specifiy a wcCallback resource
and add the callbacks using WcAddCallbacks().

Explanation for Xt and Motif gurus with source code: Xt has fetched
these resources for the shell, and compiled the XtCallbackRec array
generated by WcCvtStringToCallback into the
InternalCallbackRec/XtCallbackRec "thang."  This happens in
Xt'Create.c'_XtCreate in R5.  _XtCreate then allows the widget to
initialize itself, calling CallInitialize().  This eventually invokes
the Motif Vendor Shell initialization, which invokes the Motif Vendor
Shell Extension initialization.  Here, Motif incorrectly fetches again
the above callback resources, applying the resources straight into the
"new" widget with its already compiled callback lists.  This causes the
compiled callback list storage to be overwritten with the original,
uncompiled form previously generated by WcCvtStringToCallback.  The
next XtAddCallback or XtCallAllCallbacks or XtSetValues on these
resources will (or should!) fail due to mis-interpreting the callback
list (the first element will again be an XtCallbackRec instead of an
InternalCallbackRec).  The fix is messy:  somehow treat the callback
resources as uniquely as Xt does everywhere else: fetch into a
different (local) Widget instead of new, and then traverse the list of
callbacks, invoking XtAddCallback( new, <callbackName>, cb->callback,
cb->closure ), and then free up that locally allocated dummy widget.
Yuck!

New Resources Used by Wcl 2.03
------------------------------

Wcl fetches three different groups of resources from the Xrm resource
database:  Library Wide resources, Pre-Creation widget instance
resources, and Post-Creation widget instance resources.


Library Wide Resources
----------------------

These resources are fetched once when the Wcl library is initialized
(before any widgets are created by Wcl).  They provide attributes for
Wcl, and control some of the behavior of Wcl.

   wclInitResFile:              This is a resource which is ONLY set
                                by the command line switch "-rf".  You
                                should never need to use this resource
                                in any direct fashion.  It simply allows
                                the "-rf" option to never collide with
                                wcResFiles specifications in resource files.

   wclTraceResFiles:            Traces to stderr the files loaded by Wcl.
                                This does NOT trace files loaded by Xt or
                                Xrm during XtInitialize.  By default, this
                                is False.  Can be set True by the new command
                                line flag `-trrf'


   wclSlowTightNames:           Boolean, "True" or "False".
                                Default is "False".


Table Widget
------------

Major changes to the geometry management algorithm have been made to
eliminate a "shudder" which one would see when children requested
resizing, especially with nested XmpTables.  Resizing is faster as well
as being better.  Widgets now shrink keeping their relative sizes, instead
of having the same amount of space removed from each Widget.

---------------------------------------------------------------------------
David E. Smyth                  David.Smyth@ap.mchp.sni.de
Object/X Researcher             AP 154, Carl-Wery-Str 22, Munich 83 Germany
        Research Grant provided by Esprit Investments Ltd, 
        major sponsor Siemens Nixdorf Informationssysteme AG