[comp.sources.x] v11i041: wcl - Widget Creation Library, Part29/35

david@devvax.Jpl.Nasa.Gov (David E. Smyth) (02/09/91)

Submitted-by: david@devvax.Jpl.Nasa.Gov (David E. Smyth)
Posting-number: Volume 11, Issue 41
Archive-name: wcl/part29

#! /bin/sh

# Make a new directory for the wc sources, cd to it, and run kits 1
# thru 35 through sh.  When all 35 kits have been run, read README.

echo "This is wc 1.05 kit 29 (of 35).  If kit 29 is complete, the line"
echo '"'"End of kit 29 (of 35)"'" will echo at the end.'
echo ""
export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
mkdir DemosAthena Doc Wc 2>/dev/null
echo Extracting Wc/WcActions.c
sed >Wc/WcActions.c <<'!STUFFY!FUNK!' -e 's/X//'
X/*
X** Copyright (c) 1990 Rodney J. Whitby
X**
X** This file was derived from work performed by David E. Smyth under the
X** following copyright:
X**
X*******************************************************************************
X** Copyright (c) 1990 David E. Smyth
X**
X** This file was derived from work performed by Martin Brunecky at
X** Auto-trol Technology Corporation, Denver, Colorado, under the
X** following copyright:
X**
X*******************************************************************************
X* Copyright 1990 by Auto-trol Technology Corporation, Denver, Colorado.
X*
X*                        All Rights Reserved
X*
X* Permission to use, copy, modify, and distribute this software and its
X* documentation for any purpose and without fee is hereby granted, provided
X* that the above copyright notice appears on all copies and that both the
X* copyright and this permission notice appear in supporting documentation
X* and that the name of Auto-trol not be used in advertising or publicity
X* pertaining to distribution of the software without specific, prior written
X* permission.
X*
X* Auto-trol disclaims all warranties with regard to this software, including
X* all implied warranties of merchantability and fitness, in no event shall
X* Auto-trol be liable for any special, indirect or consequential damages or
X* any damages whatsoever resulting from loss of use, data or profits, whether
X* in an action of contract, negligence or other tortious action, arising out
X* of or in connection with the use or performance of this software.
X*******************************************************************************
X**
X** Redistribution and use in source and binary forms are permitted
X** provided that the above copyright notice and this paragraph are
X** duplicated in all such forms and that any documentation, advertising
X** materials, and other materials related to such distribution and use
X** acknowledge that the software was developed by David E. Smyth.  The
X** name of David E. Smyth may not be used to endorse or promote products
X** derived from this software without specific prior written permission.
X** THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
X** WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
X** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
X**
X*/
X
X/*
X* SCCS_data: @(#)WcActions.c 1.1 ( 19 Nov 90 )
X*
X* Subsystem_group:
X*
X*     Widget Creation Library
X*
X* Module_description:
X*
X*     This module contains the convenience actions used to create and 
X*     manage a widget tree using the Xrm databse.
X*
X*     Several convenience actions are provided with the package, allowing 
X*     deferred widget creation, control (manage/unmanage) and other utility
X*     functions.
X*
X* Module_interface_summary: 
X*
X*     Convenience Actions:
X*
X* Module_history:
X*                                                  
X*   All actions and the action registration routine were made by
X*   Rod Whitby following about 30 June 1990.
X*
X* Design_notes:
X*
X*******************************************************************************
X*/
X/*
X*******************************************************************************
X* Include_files.
X*******************************************************************************
X*/
X
X#include <X11/Intrinsic.h>
X#include "WcCreate.h"
X#include "WcCreateP.h"
X
X/*
X*******************************************************************************
X* Private_type_declarations.
X*******************************************************************************
X*/
X
X/*
X*******************************************************************************
X* Private_macro_definitions.
X*******************************************************************************
X*/
X
X/*
X*******************************************************************************
X* Private_data_definitions.
X*******************************************************************************
X*/
X
Xstatic char msg[1024];
X
X/*
X*******************************************************************************
X* Private_function_declarations.
X*******************************************************************************
X*/
X
X#define COMMAS 1
X#define NO_COMMAS 0
X
Xstatic char* AllocAndBuildString( params, num_params, commas )
X    char *params[];
X    int  *num_params;
X    int   commas;
X{
X    char *data;
X    int   len, i;
X
X    for ( len = 0, i = 0; i < *num_params; i++ )
X        len += strlen( params[i] ) + 1;
X
X    data = XtMalloc(len + 1);
X
X    (void)strcpy(data, params[0]);
X    for ( i = 1; i < *num_params; i++ )
X    {
X	if (commas)
X	    strcat(data, ",");
X	else
X	    strcat(data, " ");
X        (void)strcat(data, params[i]);
X    }
X    return data;
X}
X
Xstatic void SendToCallback( callback, w, params, num_params, min_reqd, commas )
X    XtCallbackProc callback;
X    Widget         w;
X    char          *params[];
X    int           *num_params;
X    int            min_reqd;
X    int            commas;
X{
X    char* data;
X
X    if ( *num_params < min_reqd )
X    {
X	callback( w, "", NULL );
X	return;
X    }
X
X    data = AllocAndBuildString( params, num_params, commas );
X
X    callback( w, data, NULL );
X    XtFree(data);
X}
X
X/*
X*******************************************************************************
X* Public_action_function_declarations.
X*******************************************************************************
X*/
X
X/*
X    -- Create Dynamic Children from Xrm Database
X*******************************************************************************
X    WcCreateChildrenACT( parent, child [, child ... ] )
X*/
Xvoid    WcCreateChildrenACT( w, event, params, num_params )
X    Widget      w;
X    XEvent     *event;
X    String     *params;
X    Cardinal   *num_params;
X{
X    SendToCallback( WcCreateChildrenCB, w, params, num_params, 2, COMMAS );
X}
X
X/*
X    -- Create Dynamic Popup Children from Xrm Database
X*******************************************************************************
X    WcCreatePopupsACT( parent, child [, child ... ] )
X*/
Xvoid    WcCreatePopupsACT( w, event, params, num_params )
X    Widget      w;
X    XEvent     *event;
X    String     *params;
X    Cardinal   *num_params;
X{
X    SendToCallback( WcCreatePopupsCB, w, params, num_params, 2, COMMAS );
X}
X
X/*
X    -- Manage or Unmanage named widget(s)
X*******************************************************************************
X    WcManageACT  ( widget_path [, widget_path ... ] )
X    WcUnmanageACT( widget_path [, widget_path ... ] )
X*/
Xvoid	WcManageACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcManageCB, w, params, num_params, 1, COMMAS );
X}
X
Xvoid	WcUnmanageACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcUnmanageCB, w, params, num_params, 1, COMMAS );
X}
X
X/*
X    -- Manage or unamange named children action
X*******************************************************************************
X    WcManageChildrenACT  ( parent, child [, child ... ] )
X    WcUnmanageChildrenACT( parent, child [, child ... ] )
X*/
Xvoid	WcManageChildrenACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcManageChildrenCB, w, params, num_params, 2, COMMAS );
X}
X
Xvoid	WcUnmanageChildrenACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcUnmanageChildrenCB, w, params, num_params, 2, COMMAS );
X}
X
X/*
X    -- Destroy named children action
X*******************************************************************************
X    WcDestroyACT( widget_path [, widget_path ... ] )
X*/
Xvoid	WcDestroyACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcDestroyCB, w, params, num_params, 1, COMMAS );
X}
X
X/*
X    -- Set Resource Value on Widget
X*******************************************************************************
X    WcSetValueACT( widget_path.res_name: res_val )
X*/
Xvoid	WcSetValueACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    /* note: blanks are optional, so we really don't know how many params 
X    ** we get from the translation manager: anything from 1 to 3. 
X    */
X    SendToCallback( WcSetValueCB, w, params, num_params, 1, NO_COMMAS );
X}
X
X/*
X    -- Set Resource Value on Widget
X*******************************************************************************
X    WcSetTypeValueACT( widget_path.res_name: type, res_val )
X*/
Xvoid	WcSetTypeValueACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcSetTypeValueCB, w, params, num_params, 1, NO_COMMAS );
X}
X
X/*
X    -- Change sensitivity of widgets.
X*******************************************************************************
X    WcSetSensitiveACT  ( widget_path [, widget_path ... ] )
X    WcSetInsensitiveACT( widget_path [, widget_path ... ] )
X*/
Xvoid	WcSetSensitiveACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcSetSensitiveCB, w, params, num_params, 1, COMMAS );
X}
X
Xvoid	WcSetInsensitiveACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcSetInsensitiveCB, w, params, num_params, 1, COMMAS );
X}
X
X/*
X    -- Load Resource File
X*******************************************************************************
X    WcLoadResourceFileACT( file_name )
X*/
Xvoid	WcLoadResourceFileACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcLoadResourceFileCB, w, params, num_params, 1, COMMAS );
X}
X
X/*
X    -- WcTraceAction
X*******************************************************************************
X    WcTraceACT( [ annotation ] )
X*/
Xvoid	WcTraceACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcTraceCB, w, params, num_params, 1, COMMAS );
X}
X
X/*
X  -- Popup and Popdown named widget
X*******************************************************************************
X    WcPopupACT    ( widget_path )
X    WcPopupGrabACT( widget_path )
X    WcPopdownACT  ( widget_path )
X*/
Xvoid    WcPopupACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcPopupCB, w, params, num_params, 1, COMMAS );
X}
X
Xvoid    WcPopupGrabACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcPopupGrabCB, w, params, num_params, 1, COMMAS );
X}
X
Xvoid    WcPopdownACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcPopdownCB, w, params, num_params, 1, COMMAS );
X}
X
X/*
X  -- Map and Unmap named widget
X*******************************************************************************
X    WcMapACT  ( widget_path )
X    WcUnmapACT( widget_path )
X*/
Xvoid	WcMapACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcMapCB, w, params, num_params, 1, COMMAS );
X}
X
Xvoid	WcUnmapACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcUnmapCB, w, params, num_params, 1, COMMAS );
X}
X
X/*
X    -- Invoke shell command
X*******************************************************************************
X    WcSystemACT( any shell command line )
X*/
Xvoid	WcSystemACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcSystemCB, w, params, num_params, 1, NO_COMMAS );
X}
X
X/*
X    -- Exit the application
X*******************************************************************************
X    WcExitACT( [ integer_exit_code ] )
X*/
Xvoid	WcExitACT( w, event, params, num_params )
X    Widget    w;
X    XEvent   *event;
X    String   *params;
X    Cardinal *num_params;
X{
X    SendToCallback( WcExitCB, w, params, num_params, 1, COMMAS );
X}
X
X/*
X  -- WcRegisterWcActions
X*******************************************************************************
X   Convenience routine, registering all standard actions in one application
X   call.   Called from WcWidgetCreation(), so application usually never needs
X   to call this.
X*/
X
Xvoid WcRegisterWcActions ( app )
XXtAppContext app;
X{
X    static XtActionsRec WcActions[] = {
X      {"WcCreateChildrenACT",	WcCreateChildrenACT	},
X      {"WcCreatePopupsACT",	WcCreatePopupsACT	},
X      {"WcManageACT",		WcManageACT		},
X      {"WcUnmanageACT",		WcUnmanageACT		},
X      {"WcManageChildrenACT",	WcManageChildrenACT	},
X      {"WcUnmanageChildrenACT",	WcUnmanageChildrenACT	},
X      {"WcDestroyACT",		WcDestroyACT		},
X      {"WcSetValueACT",		WcSetValueACT		},
X      {"WcSetTypeValueACT",	WcSetTypeValueACT	},
X      {"WcSetSensitiveACT",	WcSetSensitiveACT	},
X      {"WcSetInsensitiveACT",	WcSetInsensitiveACT	},
X      {"WcLoadResourceFileACT",	WcLoadResourceFileACT	},
X      {"WcTraceACT",		WcTraceACT		},
X      {"WcPopupACT",		WcPopupACT		},
X      {"WcPopupGrabACT",	WcPopupGrabACT		},
X      {"WcPopdownACT",		WcPopdownACT		},
X      {"WcMapACT",		WcMapACT		},
X      {"WcUnmapACT",		WcUnmapACT		},
X      {"WcSystemACT",		WcSystemACT		},
X      {"WcExitACT",		WcExitACT		},
X    };
X
X    ONCE_PER_XtAppContext( app );
X
X    XtAppAddActions(app, WcActions, XtNumber(WcActions));
X}
!STUFFY!FUNK!
echo Extracting Doc/History
sed >Doc/History <<'!STUFFY!FUNK!' -e 's/X//'
XWidget Creation Library Release 1.05 (Patch Level 5)
X====================================================
X
Xo  Major re-organization of the distribution, with a total
X   re-write of the Imakefiles.
X
Xo  Major re-write of some of the library source files, especially
X   WcCreate.c.
X
Xo  Wc resources now fetched after widget is created, so resource
X   values, including Wc resources, can apply to a class of widget.
X   Obviously, WcClass, WcClannName, and WcConstructor resources must
X   still apply to a specific instance.
X
Xo  WcPopups resource for specifying static pop-up children.
X
Xo  WcCreatePopupsCB and WcCreatePopupsACT for creating
X   dynamic pop-up children.
X
Xo  Leading and trailing whitespace is now stribbed from the strings
X   passed to callback functions.  Embedded whitespace is not modified
X   in any way.
X
Xo  All widget set specific stuff migrated out of the Wcl library
X   and into widget set specific libraries Xp and Xmp.  These two new
X   libraries also contain the Table widget.  I plan to provide additional
X   free-to-the-public widgets and handy functions in these libraries.
X   For example, libXp (for Athena and probably most any widget set)
X   contains AriRegisterAthena (also called XpRegisterAll()), and a useful
X   function for appending text to an Athena text widget (AriTextAppend()).
X   Similarly, libXmp (for Motif widgets) contains MriRegisterMotif() (now
X   also called XmpRegisterAll()), the CvtStringToMenuWidget converter,
X   and a new action called MriPopupACT.
X
Xo  New widget set specific code: XawCreateSimpleMenu constructor,
X   AriTextAppend, (in libXp) and MriPopupACT (in libXmp).
X
Xo  The Table widget is still provided in pure Xt and Motif versions,
X   but now the binaries go into libraries libXp and libXmp 
X   respectively.  The Motif version has a bug fix which makes it
X   re-size properly.
X
Xo  WcLoadResourceFileCB enhanced to remember which resource files have
X   been loaded (by resource file name, not complete path name).  It now
X   handles absolute pathnames starting at root or tilda, or uses the
X   same search path algorithm used bu GetAppDefaults in X11R4 Xt.  
X   I.e., it uses XUSERFILESEARCHPATH, the user's home directory, and 
X   XAPPLRESDIR in the same way that XtR4 does when it gets user's 
X   application defaults.  This code basically mimics 
X   GetAppUserDefaults() in mit/lib/Xt/Initialize.c
X
X
XWidget Creation Library Release 1.04 (Patch Level 4)
X====================================================
X
XThis release still has NOT been extensively tested with Motif 1.1.1
XI did not want to wait any longer...  There are a few bugs:  If you
Xrun the Periodic example, and resize the window using your window
Xmanager, you will see one bug.  If you run the multi-display demo
Xusing Motif widgets, you'll see another (SEGV deep in Xt after
Xa display connection has been closed and another is being opened).
X
XSince these bugs are seemingly completely unrelated to the Widget
XCreation Library itself, I figured this release could go out.  There
Xare many things which are fixed and made alot better.
X
XEnhancements:
X-------------
X
Xo  Imakefile and makefile seem to be alot better now. There will be 
X   some edits required to support Motif 1.1, these are indicated in 
X   comments.  It is quite easy now.
X
Xo  Added WcMapACT, WcMapCB, WcUnmapACT, and WcUnmapCB.
X
Xo  CvtStringToCallback() now uses the default client data which can
X   be registered with WcRegisterCallback().  In previous versions, this
X   data was registered, but thereafter always ignored.  
X
X   In this version, the client data is returned when no argument is 
X   specified and client data is not NULL.  If client data is NULL (by 
X   far the most common case) then a NULL string ("") is returned when 
X   no arguments are given in the resource file.  
X
X   NOTE that this means the client data is exactly the same as earlier 
X   versions if the callback was registered with NULL client data.  The 
X   behavior is different (correct) when default client data has been 
X   registered with the callback - now the callback gets the client data 
X   if the resource database DOES NOT specify any client data.  If the
X   resource database DOES specify client data, then that client data
X   gets passed to the callback as a null terminated string.
X
Xo  Richard Hesketh (rlh2@ukc.ac.uk) found something missing in 
X   WcFullNameToWidget:  The function will now resolve the following
X   as expected:  w = WcFullNameToWidget(ref_w, ".aChild");
X
Xo  Andrew Peebles (peebles@mips.com) also found something missing
X   in WcFullNameToWidget:  The function will now resolve widget
X   names when the name starts in a completely different widget tree.
X   While providing this capability, the function was also optimized
X   for speed at the expense of a few additional lines of code.
X
Xo  Also, Peeb noticed that WcPopupCB did not do what was intended,
X   (non-modal popups) so the grab kind has been changed from
X   XtGrabNonexclusive to XtGrabNone.
X
Xo  A minor optimization was made in the recursive creation loop:
X   The parent's name is now only determined when a warning
X   message is to be generated, rather than every time.  A typical
X   space-time tradeoff, changed to improve performance at a minor
X   increase in line count.
X
Xo  The conditional compilation flags for old versions of Xt
X   used by Motif 1.0 has been changed from `#ifdef MOTIF' to 
X   a more precise scheme where both major and minor version of
X   Motif is used. 
X
Xo  The conditional compilation flag MOTIF is still used in
X   special cases: 
X   - the example program MD.c uses it to determine which widget 
X     set gets registered, 
X   - WcConvert.c provides a Motif specific converter 
X     `CvtStringToMenuWidget'
X   - and WcCreateP.h uses it in concert with the DEBUG compilation
X     flag to include all Motif include files so that a debugger can 
X     print the members of the Motif widgets.  Not necessary, just a 
X     programmer convenience.
X
XFixes:
X------
X
Xo  Carl Witty (cwitty@cs.stanford.edu) discovered an obscure
X   bug in the XtIsShell macro definition which was causing grief.
X
Xo  Some memory leaks were found and corrected: XtTblParseLayout(),
X   WcSetValuesCB() which was also made faster.
X
Xo  A non-initialized return value in MatchWildChildren was fixed
X   (this fixes a bug which was in code borrowed from Xt).
X
Xo  An implementation of strstr is provided for systems which do not
X   have ANSI C libraries.
X
Xo  Gadgets are now detected using standard Xt functions rather
X   than Motif specific functions.
X
X
XWidget Creation Library Release 1.03 (Patch Level 3)
X====================================================
X
XFixes:
X------
X
Xo  Some memory leaks were found and corrected.
X
Xo  Some unnessesary variables were removed.
X
Xo  Root widgets are now deleted properly.
X
Xo  Documented WcSystemCB() in the *README files.
X
Xo  Trailing whitespace is now stripped in WcSetValueCB.
X
Xo  WcSetValueCB now correctly checks to see the required type
X   of the resource being set, and performs conversions accordingly.
X   In previous versions, any time the value was `this' it would
X   be converted to the widget getting the callback.
X
Xo  CvtStringToCallback was fixed so it handles multiple callback
X   functions correctly.  Callback specifications which ended with two
X   consecutive closed parenthesis were mishandled.
X
Xo  CvtStringToMenuWidget could cause core dumps in previous versions.
X   It now gives warning messages in such situations, and provides
X   a message for other misuses.
X
Xo  WcCreateDatabaseChild now does a more accurate job of tracing names.
X
X@  Now, children created by Motif Constructors are handled MUCH better.
X   You will no longer get those stupid warnings from Xt saying:
X	"Not all widgets in XtManageChildren have the same parent"
X
Xo  The message "No children defined in Xrm database" now provides
X   a useful suggestion as to what is probably wrong.
X
Xo  Both constraint and widget resources can now be set via
X   WcSetValueFromString.
X
Xo  An obscure bug in Table was fixed which caused divide-by-zero
X   errors with incorrect resource specifications.
X
XEnhancements:
X-------------
X
Xo  More and better examples.
X
Xo  An additional Wc resource which allows the description of a widget and
X   its children to be in another resource file.  My resource files were
X   getting too darn big.  This allows separate resource files to describe
X   parts of the widget heirarchy.  Of course, since everything is loaded
X   into the same Xrm database, you can reference widgets in other resource
X   files.  In a sense, all widgets are "global."
X
Xo  WcLoadResourceFileCB no longer messes with its incoming arguments,
X   and it keeps track of the resource files which have been loaded
X   so they are not loaded multiple times.
X
Xo  Widget names passed to callback functions now support relative naming.
X   The special name `this' meaning the widget getting the callback is
X   still supported.  Additional special characters `^' which means
X   the parent, and `~' which means the shell ancestor are now also
X   provided.
X
Xo  A new registration routine has been added: WcRegisterAction.  This 
X   is basically a wrapper around XtAppAddActions(), which should still 
X   be used if you are registering several actions.
X
Xo  WcRegisterWcActions now uses the XtAppContext argument which is 
X   passed to all the WcRegister* routines.  In all others, the 
X   XtAppContext argument continues to be ignored.
X
Xo  All Xt widgets are now registered: Object, RectObject, Core, Composite,
X   Constraint, ApplicationShell, OverrideShell, Shell, TopLevelShell,
X   TransientShell, VendorShell, and WmShell.
X
Xo  In order to facilitate using the Widget Creation Library within an
X   interactive and possibly interpretive user interface builder, it is now
X   possible to override the registrations of class pointers, class names,
X   constructors, and (probably most importantly) callbacks.  By default,
X   the registration routines WcRegisterClassPtr, WcRegisterCallback, etc.,
X   ignore attempts at re-registration.  If WcAllowDuplicateRegistration
X   is called, then all the routines will allow re-registration.
X
X   Re-registration over-writes existing registrations of the same name.
X   For completeness, the following new routines are provided:
X   WcAllowDuplicateRegistration(), WcAllowDuplicateClassPtrReg(),
X   WcAllowDuplicateClassNameReg(), WcAllowDuplicateConstructorReg(),
X   WcAllowDuplicateCallbackReg(), so the client may choose which
X   registration routines honor duplicate registration requests.
X
XWhat was NOT Done
X-----------------
X
Xo  The version of Table provided with this distribution is NOT
X   the same as that provided by Nazgul@alphalpha.com (Kee Hinckley).
X   Why?  His is fully Motif-ized, including changing it so it is
X   a subclass of a Motif manager widget, has specific behaviors
X   to make up for obscure Motif widget mis-behaviors, and it uses
X   Motif specific functions.
X   
X   Kee has done good work: if you want a more Motif-ized version of 
X   Table, send him mail, he will send it to you.  The version of 
X   Table provided herein refuses to work with Gadgets, and does not 
X   work properly with XmText widgets due to an apparent bug in 
X   XmText geometry handshaking.
X
Xo  The libraries built do NOT include the MriRegAll.o nor AriRegAll.o
X   object files.  I am considering including them next time.  SEND
X   ME YOUR VOTES on if you think this is a good idea.  
X
X   The problem is that including them into the library would mean the 
X   library could not be built _consistently_ unless BOTH widget sets are
X   available.  This sometimes is not the case.  I would rather keep
X   Wc strictly Xt Intrinsics dependent, and not widget set dependent.
X
X   Also, I think that over time more and more widgets will be available
X   over the net, and so a given user, team, or site may want to register
X   more or different widgets.
X
Xo  The resource file loading due to wcResFile resources and due to
X   invocations of the WcLoadResourceFileCB standard callback still
X   do not perform file name searches which conform to the X11R4 Xt
X   manual.  This will be fixed in a release of Wc which follows the
X   wide availability of Motif 1.1, probably in about October 1990.
X
X
XWidget Creation Library Release 1.02 (Patch Level 2)
X====================================================
X
XFixes:
X------
X
Xo  A missing argument in a missing argument error message 8-}
X
Xo  Extra tokens after #endif's are removed.
X
Xo  File names shortened, and fixed in comments to match perfectly the file
X   names.
X
XEnhancements:
X-------------
X
XWidget Creation Library Release 1.01 (Patch Level 1)
X====================================================
X
XFixes:
X------
X
Xo  This version is reported to work with Motif 1.1
X
Xo  The Table widget has been fixed so it does not grow when column spacing
X   is non-zero and the table or the table's children are resized.
X
Xo  A couple of bugs were discovered and fixed.
X
XEnhancements:
X-------------
X
Xo  There is an Imakefile.  The makefile builds a Makefile using this
X   Imakefile.
X
Xo  There are action functions provided for all the Wc standard callbacks.
X   Actions are more powerful than callbacks in the ways they can be
X   attached to widgets.  
X
Xo  There is another example program with resource file which demonstrates
X   the use of actions.
X
Xo  The example resource files were changed so all have mechanisms to quit,
X   usually a quit button.
X
Xo  There is a test program which executes all the programs within the
X   standard distribution, using all of the resource files.
!STUFFY!FUNK!
echo Extracting Makefile
sed >Makefile <<'!STUFFY!FUNK!' -e 's/X//'
X# Makefile generated by imake - do not edit!
X# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
X#
X# The cpp used on this machine replaces all newlines and multiple tabs and
X# spaces in a macro expansion with a single space.  Imake tries to compensate
X# for this, but is not always successful.
X#
X
X###########################################################################
X# Makefile generated from "Imake.tmpl" and <Imakefile>
X# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
X#
X# Platform-specific parameters may be set in the appropriate .cf
X# configuration files.  Site-wide parameters may be set in the file
X# site.def.  Full rebuilds are recommended if any parameters are changed.
X#
X# If your C preprocessor doesn't define any unique symbols, you'll need
X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
X# "make Makefile", "make Makefiles", or "make World").
X#
X# If you absolutely can't get imake to work, you'll need to set the
X# variables at the top of each Makefile as well as the dependencies at the
X# bottom (makedepend will do this automatically).
X#
X
X###########################################################################
X# platform-specific configuration parameters - edit sun.cf to change
X
XSYSLIBS=-lXt -lX11
XMWM_DEFINES=-DLARGECURSORS -DSHAPE -DOPAQUE
X
X# platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
X# operating system:  SunOS 4.1
X
X###########################################################################
X# site-specific configuration parameters - edit site.def to change
X
X# site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
X
X            SHELL = /bin/sh
X
X              TOP = .
X      CURRENT_DIR = .
X
X               AR = ar cq
X  BOOTSTRAPCFLAGS =
X               CC = cc
X
X         COMPRESS = compress
X              CPP = /lib/cpp $(STD_CPP_DEFINES)
X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
X          INSTALL = install
X               LD = ld
X             LINT = lint
X      LINTLIBFLAG = -C
X         LINTOPTS = -axz
X               LN = ln -s
X             MAKE = make
X               MV = mv
X               CP = cp
X           RANLIB = ranlib
X  RANLIBINSTFLAGS =
X               RM = rm -f
X     STD_INCLUDES =
X  STD_CPP_DEFINES =
X      STD_DEFINES =
X EXTRA_LOAD_FLAGS =
X  EXTRA_LIBRARIES =
X             TAGS = ctags
X
X    SHAREDCODEDEF = -DSHAREDCODE
X         SHLIBDEF = -DSUNSHLIB
X
X    PROTO_DEFINES =
X
X     INSTPGMFLAGS =
X
X     INSTBINFLAGS = -m 0755
X     INSTUIDFLAGS = -m 4755
X     INSTLIBFLAGS = -m 0664
X     INSTINCFLAGS = -m 0444
X     INSTMANFLAGS = -m 0444
X     INSTDATFLAGS = -m 0444
X    INSTKMEMFLAGS = -m 4755
X
X          DESTDIR =
X
X     TOP_INCLUDES = -I$(INCROOT)
X
X      CDEBUGFLAGS = -O
X        CCOPTIONS = -D_NO_PROTO -DSTRINGS_ALIGNED -DNO_REGEX
X      COMPATFLAGS =
X
X      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
X   LDCOMBINEFLAGS = -X -r
X
X        MACROFILE = sun.cf
X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
X
X    IMAKE_DEFINES =
X
X         IRULESRC = $(CONFIGDIR)
X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
X
X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
X			$(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
X			$(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
X
X###########################################################################
X# X Window System Build Parameters
X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
X
X###########################################################################
X# X Window System make variables; this need to be coordinated with rules
X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
X
X          PATHSEP = /
X        USRLIBDIR = $(DESTDIR)/usr/lib
X           BINDIR = $(DESTDIR)/usr/bin/X11
X          INCROOT = $(DESTDIR)/usr/include
X     BUILDINCROOT = $(TOP)
X      BUILDINCDIR = $(BUILDINCROOT)/X11
X      BUILDINCTOP = ..
X           INCDIR = $(INCROOT)/X11
X           ADMDIR = $(DESTDIR)/usr/adm
X           LIBDIR = $(USRLIBDIR)/X11
X        CONFIGDIR = $(LIBDIR)/config
X       LINTLIBDIR = $(USRLIBDIR)/lint
X
X          FONTDIR = $(LIBDIR)/fonts
X         XINITDIR = $(LIBDIR)/xinit
X           XDMDIR = $(LIBDIR)/xdm
X           AWMDIR = $(LIBDIR)/awm
X           TWMDIR = $(LIBDIR)/twm
X           GWMDIR = $(LIBDIR)/gwm
X          MANPATH = $(DESTDIR)/usr/man
X    MANSOURCEPATH = $(MANPATH)/man
X           MANDIR = $(MANSOURCEPATH)n
X        LIBMANDIR = $(MANSOURCEPATH)3
X      XAPPLOADDIR = $(LIBDIR)/app-defaults
X
X        SOXLIBREV = 4.2
X          SOXTREV = 4.0
X         SOXAWREV = 4.0
X        SOOLDXREV = 4.0
X         SOXMUREV = 4.0
X        SOXEXTREV = 4.0
X
X       FONTCFLAGS = -t
X
X     INSTAPPFLAGS = $(INSTDATFLAGS)
X
X            IMAKE = imake
X           DEPEND = makedepend
X              RGB = rgb
X            FONTC = bdftosnf
X        MKFONTDIR = mkfontdir
X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
X
X        CONFIGSRC = $(TOP)/config
X        CLIENTSRC = $(TOP)/clients
X          DEMOSRC = $(TOP)/demos
X           LIBSRC = $(TOP)/lib
X          FONTSRC = $(TOP)/fonts
X       INCLUDESRC = $(TOP)/X11
X        SERVERSRC = $(TOP)/server
X          UTILSRC = $(TOP)/util
X        SCRIPTSRC = $(UTILSRC)/scripts
X       EXAMPLESRC = $(TOP)/examples
X       CONTRIBSRC = $(TOP)/../contrib
X           DOCSRC = $(TOP)/doc
X           RGBSRC = $(TOP)/rgb
X        DEPENDSRC = $(UTILSRC)/makedepend
X         IMAKESRC = $(CONFIGSRC)
X         XAUTHSRC = $(LIBSRC)/Xau
X          XLIBSRC = $(LIBSRC)/X
X           XMUSRC = $(LIBSRC)/Xmu
X       TOOLKITSRC = $(LIBSRC)/Xt
X       AWIDGETSRC = $(LIBSRC)/Xaw
X       OLDXLIBSRC = $(LIBSRC)/oldX
X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
X     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
X     EXTENSIONSRC = /cdb2/X11R4/mit/extensions
X
X  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
X     EXTENSIONLIB =  -lXext
X
X          DEPXLIB = $(DEPEXTENSIONLIB)
X             XLIB = $(EXTENSIONLIB) -lX11
X
X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
X         XAUTHLIB =  -lXau
X
X        DEPXMULIB =
X           XMULIB = -lXmu
X
X       DEPOLDXLIB =
X          OLDXLIB = -loldX
X
X      DEPXTOOLLIB =
X         XTOOLLIB = -lXt
X
X        DEPXAWLIB =
X           XAWLIB = -lXaw
X
X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
X         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
X          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
X        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
X          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
X
X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
X
X         DEPLIBS1 = $(DEPLIBS)
X         DEPLIBS2 = $(DEPLIBS)
X         DEPLIBS3 = $(DEPLIBS)
X
X###########################################################################
X# Imake rules for building libraries, programs, scripts, and data files
X# rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
X
X###########################################################################
X# start of Imakefile
X
X###########################################################################
X# Imake rules for building and installing libraries, programs,
X# apps-defaults, and other data files.  Unlike Imake.rules, these
X# rules allow files to be installed anywhere.
X#
X# These rules *override* rules of the same name defined in Imake.rules!!
X#
X# New variables:
X#	INSTBIN		default to $BINDIR - programs installed here
X#	INSTMAN		default to $MANDIR - man pages installed here
X#	INSTAPP		default to $XAPPLOADDIR - apps-defaults files go here
X#
X# David E. Smyth: Install.rules Wed Jan  2 07:12:10 PST 1991
X
X###########################################################################
X# Makefile defines for Widget Creation Library distribution.
X# David E. Smyth: Wc.tmpl Wed Jan  2 07:44:04 PST 1991
X
X# What I use for pre-release testing
X
X      INSTLIB = /u/tds/david/tmp/lib
X      INSTLIN = /u/tds/david/tmp/lib/lint
X      INSTINC = /u/tds/david/tmp/include
X      INSTBIN = /u/tds/david/tmp/bin
X      INSTMAN = /u/tds/david/tmp/man/man1
X      INSTAPP = /u/tds/david/tmp/app-defaults
X
X      MKDIRHIER = /bin/sh /u/tds/david/bin/mkdirhier.sh
X
X   WCTOPDIR = .
X
X      WCLIB = -L$(INSTLIB) -lWc
X      XPLIB = -L$(INSTLIB) -lXp
X     XMPLIB = -L$(INSTLIB) -lXmp
X
X    SoWcRev = 1.05
X
X  ATHENA_DIRS = Xp Ari DemosAthena
X
X   MOTIF_DIRS = Xmp Mri DemosMotif
X
X SUBDIRS = Wc $(ATHENA_DIRS) $(MOTIF_DIRS)
X
X# "make all" builds the library and the applications without
X# installing anything.  If you are using shared libraries, these
X# applications will not work anywhere else!
X#
X
Xall::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "making" "in $(CURRENT_DIR)/$$i..."; \
X	$(MAKE) $(MFLAGS) 'CDEBUGFLAGS=-I.. -L../Wc -L../Xp -L../Xmp $(CDEBUGFLAGS)' all); \
X	done
X
X# "make install" first builds the library, then installs the library
X# and includes, then builds all the applications.  We must do it
X# like this so the applications point to the installed library
X# when shared libs are used.
X
X###########################################################################
X# common rules for all Makefiles - do not edit
X
Xemptyrule::
X
Xclean::
X	$(RM_CMD) \#*
X
XMakefile::
X	-@if [ -f Makefile ]; then \
X	echo "	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
X	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
X	else exit 0; fi
X	$(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
X
Xtags::
X	$(TAGS) -w *.[ch]
X	$(TAGS) -xw *.[ch] > TAGS
X
X###########################################################################
X# rules for building in SUBDIRS - do not edit
X
Xinstall::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
X	$(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \
X	done
X
Xinstall.man::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "installing man pages" "in $(CURRENT_DIR)/$$i..."; \
X	$(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install.man); \
X	done
X
Xclean::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "cleaning" "in $(CURRENT_DIR)/$$i..."; \
X	$(MAKE) $(MFLAGS) RM_CMD='$(RM_CMD)' clean); \
X	done
X
Xtags::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo "tagging" "in $(CURRENT_DIR)/$$i..."; \
X	$(MAKE) $(MFLAGS) TAGS='$(TAGS)' tags); \
X	done
X
XMakefiles::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	echo "making Makefiles in $(CURRENT_DIR)/$$i..."; \
X	case "$$i" in \
X	./?*/?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \
X	./?*/?*/?*) newtop=../../../ sub=subsubsub;; \
X	./?*/?*) newtop=../../ sub=subsub;; \
X	./?*) newtop=../ sub=sub;; \
X	*/?*/?*/?*) newtop=../../../../ sub=subsubsubsub;; \
X	*/?*/?*) newtop=../../../ sub=subsubsub;; \
X	*/?*) newtop=../../ sub=subsub;; \
X	*) newtop=../ sub=sub;; \
X	esac; \
X	case "$(TOP)" in \
X	/?*) newtop= upprefix= ;; \
X	*) upprefix=../ ;; \
X	esac; \
X	$(MAKE) $${sub}dirMakefiles UPPREFIX=$$upprefix NEWTOP=$$newtop \
X	MAKEFILE_SUBDIR=$$i NEW_CURRENT_DIR=$(CURRENT_DIR)/$$i;\
X	done
X
XsubdirMakefiles:
X	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
X	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
X	echo "	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
X	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
X	else exit 0; fi
X	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
X	$(MAKE) $(MFLAGS) Makefiles
X
XsubsubdirMakefiles:
X	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
X	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
X	echo "	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
X	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
X	else exit 0; fi
X	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
X	$(MAKE) $(MFLAGS) Makefiles
X
XsubsubsubdirMakefiles:
X	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
X	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
X	echo "	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
X	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
X	else exit 0; fi
X	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
X	$(MAKE) $(MFLAGS) Makefiles
X
XsubsubsubsubdirMakefiles:
X	$(RM) $(MAKEFILE_SUBDIR)/Makefile.bak
X	-@if [ -f $(MAKEFILE_SUBDIR)/Makefile ]; then \
X	echo "	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak"; \
X	$(MV) $(MAKEFILE_SUBDIR)/Makefile $(MAKEFILE_SUBDIR)/Makefile.bak; \
X	else exit 0; fi
X	cd $(MAKEFILE_SUBDIR); $(IMAKE_CMD) -DTOPDIR=$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(UPPREFIX)$(TOP) -DCURDIR=$(NEW_CURRENT_DIR); \
X	$(MAKE) $(MFLAGS) Makefiles
X
Xincludes::
X	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
X	for i in $(SUBDIRS) ;\
X	do \
X	(cd $$i ; echo including "in $(CURRENT_DIR)/$$i..."; \
X	$(MAKE) $(MFLAGS)   includes); \
X	done
X
X###########################################################################
X# dependencies generated by makedepend
X
!STUFFY!FUNK!
echo Extracting DemosAthena/App1.All
sed >DemosAthena/App1.All <<'!STUFFY!FUNK!' -e 's/X//'
X#ifdef Xrm_COMMENT
X----------------------------------------------------------------------
X
XThis demos is intended to show something about every single
XAthena widget.  At least one of each is instantiated.  This
Xexample is derived from xwidgets.c in X11R4/examples/Xaw
X
XNote that we do not bind the destroy callback to the application
Xshell.  This is because the Wc converters are not registered yet
Xwhen the application shell is created by XtInitialize.  We get
Xfunctionally identical results by binding the destroyCallback of
Xthe application shell's only child.
X
XThere is nothing which prevents the Wc converters from being
Xregistered early, except that most programmers would rather take
Xadvantage of XtInitialize() rather than programming an equivalent
Xsequence of Xt... calls themselves.
X
X----------------------------------------------------------------------
X#endif
X
X# Think of these as fallback resources
X#
X
X*input:                  True
X
XApp.wcChildren:		paned
XApp.title:		App using App1.All
X
XApp*label.destroyCallback: MyDestroyedCB(Gone)
XApp.paned.quit.destroyCallback: MyDestroyedCB()
XApp.paned.dialog.destroyCallback: MyDestroyedCB
X#
X# Most of the widgets are children of the paned window.
X#
X
X*paned.wcClass:		panedWidgetClass
X*paned.wcChildren:	quit, label, dialog, viewport, form, \
X			box, stripChart, text, box2, textFile
X*Paned.width:           350
X
X*quit.wcClass:		commandWidgetClass
X*quit.callback:		MyQuitCB( App )
X*quit.font:		-*-courier-bold-r-*-240-*
X
X*label.wcClass:		labelWidgetClass
X*label.label:           At least one of each Athena Widget.
X*label.font:		*lucida-bold-i-*-240-*
X
X#
X# A Dialog with an Ok button which changes the list
X# contents when pressed via the MyOkayCB() callback.
X#
X
X*dialog.wcClass:	dialogWidgetClass
X*dialog.wcChildren:	command
X*Dialog*Font:		*times-bold-i-*-180-*
X*Dialog.label:          I am a Dialog widget.
X*Dialog.label.font:	*new century schoolbook-bold-r-*-180-*
X*Dialog.value:          Enter new value here.
X*Dialog*resizable:      True
X
X*Dialog.command.wcClass:	commandWidgetClass
X*Dialog*command*label:		ok
X*Dialog*command*callback:	MyOkayCB( *list )
X
X#
X# A Viewport with a List child
X#
X
X*viewport.wcClass:	viewportWidgetClass
X*viewport.wcChildren:	list
X*Viewport*allowVert:	True
X
X*list.wcClass:		listWidgetClass
X*list*Font:		*new century schoolbook-bold-i-*-140-*
X
X#
X# Create a Form with Buttons Including a MenuButton with Menu
X#
X
X#*form*wcTrace:		True
X
X*form.wcClass:		formWidgetClass
X*form.wcChildren:	formLabel, command, toggle, menuButton, menu
X*Form*resizable:	True
X*form*Font:		*lucidabright-demibold-*-180-*
X
X*form.formLabel.wcClass:	labelWidgetClass
X*form.formLabel.wcPopups:	popup1, popup2, popup3
X*Form*formLabel.label:		popup menus here
X*formLabel.translations: \
X	<Btn1Down>:	XawPositionSimpleMenu(popup1) MenuPopup(popup1)	\n\
X	<Btn2Down>:	XawPositionSimpleMenu(popup2) MenuPopup(popup2)	\n\
X	<Btn3Down>:	XawPositionSimpleMenu(popup3) MenuPopup(popup3)
X
X*popup1.wcClassName:     SimpleMenu
X*popup1.wcChildren:      menulabel, foo, bar, glorp, nerp
X*popup2.wcClassName:     SimpleMenu
X*popup2.wcChildren:      menulabel, foo, bar, glorp, nerp
X*popup3.wcClassName:     SimpleMenu
X*popup3.wcChildren:      menulabel, foo, bar, glorp, nerp
X
X*menulabel.wcClassName:	SmeBSB
X*popup1.menulabel.label:	popup1
X*popup2.menulabel.label:	popup2
X*popup3.menulabel.label:	popup3
X*foo.wcClassName:       SmeBSB
X*bar.wcClassName:       SmeBSB
X*glorp.wcClassName:     SmeBSB
X*nerp.wcClassName:      SmeBSB
X
X*form.command.wcClass:		commandWidgetClass
X*form.command.fromHoriz:	*formLabel
X*form.command.callback:		MyCountCB( *formLabel )
X
X*form.toggle.wcClass:		toggleWidgetClass
X*form.toggle.fromHoriz:		*form.command
X*form.toggle.callback:		MyCountCB( *formLabel )
X
X*form.menuButton.wcClass:	menuButtonWidgetClass
X*form.menuButton.fromHoriz:	*form.toggle
X
X*menu.wcClass:			simpleMenuWidgetClass
X*menu.wcManaged:		False
X*menu.wcChildren:		menuEntry1, menuEntry2, menuLine, \
X				menuEntry3, menuEntry4, menuEntry5
X
X*menuEntry1.wcClass:	smeBSBObjectClass
X*menuEntry2.wcClass:	smeBSBObjectClass
X*menuEntry3.wcClass:	smeBSBObjectClass
X*menuEntry4.wcClass:	smeBSBObjectClass
X*menuEntry5.wcClass:	smeBSBObjectClass
X*menuLine.wcClass:	smeLineObjectClass
X
X#
X# Create a box with a clock and a logo.
X#
X
X*Box*allowResize:        True
X*box.wcClass:		boxWidgetClass
X*box.wcChildren:	clock, logo
X
X*clock.wcClass:		clockWidgetClass
X*logo.wcClass:		logoWidgetClass
X
X#
X# Create a Box widget with a label and a scrollbar.
X#
X
X*box2.wcClass:		boxWidgetClass
X*box2.wcChildren:	scrollbar, scroll_label
X
X*scrollbar.wcClass:	scrollbarWidgetClass
X*scrollbar.jumpProc:	MyThumbedCB(*scroll_label)
X*scrollbar.scrollProc:	MyScrolledCB(*scroll_label)
X*scrollbar*orientation:  horizontal
X*scrollbar*length:       100
X
X*scroll_label.wcClass:	labelWidgetClass
X*scroll_label.Font:	*-charter-bold-i-*-180-*
X
X#
X# Create a strip chart  Note that we
X# need to exit, not destroy, with SriptCharts,
X# because there is a bug in StripChart`DestroyGC.
X#
X
X*stripChart.wcClass:	stripChartWidgetClass
X*stripChart.getValue:	MyTimeSinceTouchedCB
X*StripChart*update:      1
X*StripChart*jumpScroll:  1
X*StripChart.destroyCallback: WcExitCB
X
X#
X# Text widget
X#
X
X*text.wcClass:		asciiTextWidgetClass
X*text*height:            75
X*text*string:            Look ma, a text widget!
X*text*editType:          edit
X*text*scrollVertical:    whenNeeded
X*text*scrollHorizonal:   whenNeeded
X*text*Font:		 *-lucidatypewriter-bold-r-*-190-*
X
X#
X# Text widget tied to a file
X#
X
X*textFile.wcClass:	asciiTextWidgetClass
X*textFile*type:          file
X*textFile*string:        /etc/motd
X*textFile*scrollVertical:    whenNeeded
X*textFile*scrollHorizonal:   whenNeeded
X*textFile*height:        75
X*textFile*Font:          *clean-medium-r-*-150-*
!STUFFY!FUNK!
echo " "
echo "End of kit 29 (of 35)"
cat /dev/null >kit29isdone
run=''
config=''
for iskit in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35; do
    if test -f kit${iskit}isdone; then
	run="$run $iskit"
    else
	todo="$todo $iskit"
    fi
done
case $todo in
    '')
	echo "You have run all your kits.  Please read README."
	for combo in `find . -name '*:AA' -print`; do
	    if test -f "$combo"; then
		realfile=`echo $combo | sed 's/:AA$//'`
		cat $realfile:[A-Z][A-Z] >$realfile
		rm -rf $realfile:[A-Z][A-Z]
	    fi
	done
	rm -rf kit*isdone
	chmod ugo+x test*
	;;
    *)  echo "You have run$run."
	echo "You still need to run$todo."
	;;
esac
: Someone might mail this, so...
exit

--
dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.