[comp.sources.x] v11i040: wcl - Widget Creation Library, Part28/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 40
Archive-name: wcl/part28

#! /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 28 (of 35).  If kit 28 is complete, the line"
echo '"'"End of kit 28 (of 35)"'" will echo at the end.'
echo ""
export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
mkdir DemosMotif Wc 2>/dev/null
echo Extracting Wc/WcConvert.c
sed >Wc/WcConvert.c <<'!STUFFY!FUNK!' -e 's/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: @(#)WcConvert.c 1.1 ( 19 Nov 90 )
X*
X* Subsystem_group:
X*
X*     Widget Creation Library
X*
X* Module_description:
X*
X*     This module contains Xt converter functions which convert strings,
X*     as found in the Xrm database, into useful types.  
X*
X*     It also contains the routine which registers all Wc converters.
X*
X*     The CvtStringToWidget converter takes a pathname which starts 
X*     from the application shell an proceeds to a specific widget.  The
X*     widget must already have been created.   Note that this converter
X*     needs to be used INSTEAD of the XmuCvtStringToWidget which gets
X*     registered by the Athena widgets.  The Xmu converter is not so
X*     user friendly.  This means this file also declares an external
X*     function XmuCvtStringToWidget() which is really CvtStringToWidget,
X*     and this needs to be linked before Xmu.
X*
X*     The CvtStringToCallback converter parses the resource string in 
X*     the format:
X*
X*       ...path:   name[(args)][,name[(args)]]...
X*
X*     where:  name:   specifies the registered callback function name
X*             args:   specifies the string passed to a callback as
X*		      "client data".
X*
X*     Multiple callbacks can be specified for a single callback list
X*     resource.  Any callbacks must be "registered" by the application
X*     prior converter invocation (.i.e.prior widget creation).
X*     If no "args" string is provided, the default "client data" 
X*     specified at callback registration are used.
X*
X*     The CvtStringToConstructor converter searches the Constructor
X*     cache for a registered constructor.  
X*
X*     The CvtStringToClass converter searches the Class cache for a 
X*     registered object (widget) class pointer name.
X*
X*     The CvtStringToClassName converter searches the ClassName cache
X*     for a registered object (widget) class name.
X
X*
X* Module_interface_summary: 
X*
X*     Resource converter is invoked indirectly by the toolkit. The
X*     converter is added to the toolkit by widgets calling
X*     WcAddConverters() in the Wc intialization code.
X*
X* Module_history:
X*                                                  
X*   mm/dd/yy  initials  function  action
X*   --------  --------  --------  ---------------------------------------------
X*   06/08/90  D.Smyth   Class, ClassName, and Constructor converters.
X*   05/24/90  D.Smyth   WcAddConverters created from something similar
X*   04/03/90  MarBru    CvtStr..  Fixed argument termination with a NUL char
X*   02/26/90  MarBru    All       Created
X*
X* Design_notes:
X*
X*   For VMS, we could have used LIB$FIND_IMAGE_SYMBOL and use dynamic
X*   (runtime) binding. But since most UNIX systems lack such capability,
X*   we stick to the concept of "registration" routines.
X*
X*   One time, I considered applying conversion to callback argument, which
X*   would take the burden of conversion from the callback code (runtime)
X*   to the callback  conversion (one time initialization). The problem is
X*   that some conversions are widget context specific (color to pixel needs
X*   display connection), and at the time of callback conversion I do not
X*   have a widget. I could require the widget argument, but this would kill
X*   caching of the conversion result.
X*
X*   The sequential search of the callback cache is far from optimal. I should
X*   use binary search, or the R4 conversion cache.  I can't use the R4 cache
X*   until Motif 1.1 is released which will (supposedly) run on R4 Intrinsics.
X*   
X*******************************************************************************
X*/
X/*
X*******************************************************************************
X* Include_files.
X*******************************************************************************
X*/
X
X#include <ctype.h>	/* isupper() and tolower macros */
X#include <stdio.h>
X
X/*  -- X Window System includes */
X#include <X11/Intrinsic.h>
X#include <X11/StringDefs.h> 
X
X/*  -- Widget Creation Library includes */
X#include "WcCreate.h"
X#include "WcCreateP.h"
X
X/*
X*******************************************************************************
X* Private_constant_declarations.
X*******************************************************************************
X*/
X
X/*
X*******************************************************************************
X* Private_type_declarations.
X*******************************************************************************
X*/
X
X/*
X*******************************************************************************
X* Private_macro_definitions.
X*******************************************************************************
X*/
X
X#define done( type, value ) 			\
X{						\
X    if ( toVal->addr != NULL )			\
X    {						\
X	if ( toVal->size < sizeof( type ) )	\
X	{					\
X	    toVal->size = sizeof( type );	\
X	    return;				\
X	}					\
X	*(type*)(toVal->addr) = (value);	\
X    }						\
X    else					\
X    {						\
X	static type static_val;			\
X	static_val = (value);			\
X	toVal->addr = (caddr_t)&static_val;	\
X    }						\
X    toVal->size = sizeof(type);			\
X    return;					\
X}
X
X/*
X*******************************************************************************
X* Private_data_definitions.
X*******************************************************************************
X*/
X
X/*
X*******************************************************************************
X* Private_function_declarations.
X*******************************************************************************
X*/
X
X/*
X    -- Convert String To ClassPtr
X*******************************************************************************
X    This conversion searches the Object Class cache for the appropriate
X    Cache record.  The resource database string is simply the name
X    of the class pointer, case insensitive.  The value provided is the
X    widget class pointer, as passed to XtCreateWidget().
X*/
X
Xvoid CvtStringToClassPtr (args, num_args, fromVal, toVal )
X    XrmValue  *args;
X    Cardinal  *num_args;
X    XrmValue  *fromVal;
X    XrmValue  *toVal;
X{
X    char*       string = (char *) fromVal->addr;
X    char        cleanName[MAX_XRMSTRING];
X    char*       lowerCase;
X    XrmQuark    quark;
X    int         i;
X
X    (void)WcCleanName ( string, cleanName );
X    lowerCase = WcLowerCaseCopy ( cleanName );
X    quark = XrmStringToQuark ( lowerCase );
X    XtFree ( lowerCase );
X
X    for (i=0; i<classes_num; i++)
X    {
X        if ( classes_ptr[i].quark == quark )
X        {
X            done( WidgetClass, classes_ptr[i].class );
X        }
X    }
X    XtStringConversionWarning (cleanName, "Object Class, not registered.");
X}
X
X/*
X    -- Convert String To ClassName
X*******************************************************************************
X    This conversion searches the Class Name cache for the appropriate
X    Cache record.  The resource database string is simply the name
X    of the class, case insensitive.  The value provided is the widget 
X    class pointer, as passed to XtCreateWidget().
X*/
X
Xvoid CvtStringToClassName (args, num_args, fromVal, toVal )
X    XrmValue  *args;
X    Cardinal  *num_args;
X    XrmValue  *fromVal;
X    XrmValue  *toVal;
X{
X    char*	string = (char *) fromVal->addr;
X    char	cleanName[MAX_XRMSTRING];
X    char* 	lowerCase;
X    XrmQuark	quark;
X    int		i;
X
X    (void)WcCleanName ( string, cleanName );
X    lowerCase = WcLowerCaseCopy ( cleanName );
X    quark = XrmStringToQuark ( lowerCase );
X    XtFree ( lowerCase );
X
X    for (i=0; i<cl_nm_num; i++)
X    {
X        if ( cl_nm_ptr[i].quark == quark )
X        {
X	    done( WidgetClass, cl_nm_ptr[i].class );
X        }
X    }
X    XtStringConversionWarning (cleanName, "Class Name, not registered.");
X}
X
X/*
X    -- Convert String To Constructor
X*******************************************************************************
X    This conversion searches the Constructor Cache for the appropriate
X    Cache record.  The resource database string is simply the name
X    of the constructor, case insensitive.  The value provided is a
X    Contrstructor Cache Record.  The constructor (func ptr) itself is
X    not provided, as the user of this value (generally WcCreateDatabaseChild)
X    also likes to have the constructor name as registered for error messages.
X*/
X
Xvoid CvtStringToConstructor (args, num_args, fromVal, toVal)
X    XrmValue *args;
X    Cardinal *num_args;
X    XrmValue *fromVal;
X    XrmValue *toVal;
X{
X    char*       string = (char *) fromVal->addr;
X    char        cleanName[MAX_XRMSTRING];
X    char*       lowerCase;
X    XrmQuark    quark;
X    int         i;
X
X    (void)WcCleanName ( string, cleanName );
X    lowerCase = WcLowerCaseCopy ( cleanName );
X    quark = XrmStringToQuark ( lowerCase );
X    XtFree ( lowerCase );
X
X    for (i=0; i<constrs_num; i++)
X    {
X	if ( constrs_ptr[i].quark == quark )
X	{
X	    done( ConCacheRec*, &(constrs_ptr[i]) );
X	}
X    }
X    XtStringConversionWarning (cleanName, "Constructor, not registered.");
X}
X
X/*
X    -- Convert String To Callback
X*******************************************************************************
X    This conversion creates a callback list structure from the X resource
X    database string in format:
X
X    name(arg),name(arg).....
X
X    Note "name" is not case sensitive, while "arg" may be - it is passed to
X    a callback as client data as a null terminated string (first level
X    parenthesis stripped off).  Even if nothing is specified e.g.,
X    SomeCallback() there is a null terminated string passed as client
X    data to the callback.  If it is empty, then it is the null string.
X
X    Note also that the argument CANNOT be converted at this point: frequently,
X    the argument refers to a widget which has not yet been created, or
X    uses the context of the callback (i.e., WcUnmanageCB( this ) uses the
X    widget which invoked the callback).  
X*/
X
Xtypedef struct
X{
X    char *name_start, *name_end;    /* callback name start, end */
X    char *arg_start,  *arg_end;     /* argument string start, end */
X} Segment;
X
X#ifdef FUNCTION_PROTOTYPES
Xstatic int ParseCallbackString( char*, Segment*, int );
Xstatic XtCallbackRec* BuildCallbackList( Segment* );
Xstatic int GetCallbackAddrFromCache(char*, char*, XtCallbackRec* );
Xstatic void CopyArgsToCallbackClosure( char*, char*, XtCallbackRec* );
X#else
Xstatic int ParseCallbackString();
Xstatic XtCallbackRec* BuildCallbackList();
Xstatic int GetCallbackAddrFromCache();
Xstatic void CopyArgsToCallbackClosure();
X#endif
X
X/*
X    -- Convert String To Callback
X*******************************************************************************
X*/
X
Xvoid CvtStringToCallback (args, num_args, fromVal, toVal)
X    XrmValue *args;
X    Cardinal *num_args;
X    XrmValue *fromVal;
X    XrmValue *toVal;
X{
X    static XtCallbackRec* retval;	/* return value MUST be static */
X
X    Segment	name_arg_segments[MAX_CALLBACKS];	
X    char*	string = (char *) fromVal->addr;
X
X/*  -- assume error or undefined input argument */
X    toVal->size = 0;
X    toVal->addr = (caddr_t) NULL;
X
X    if (ParseCallbackString( string, name_arg_segments, MAX_CALLBACKS ))
X	return;
X
X    /* name_arg_segments[MAX_CALLBACKS-1].name_start MUST be NULL 
X    */
X    retval = BuildCallbackList( name_arg_segments );
X
X    toVal->size = sizeof(XtCallbackRec*);
X    toVal->addr = (caddr_t)&retval;
X}
X
X/*
X    -- Parse string into name+argument segments: returns 1 if failed
X*******************************************************************************
X*/
X
Xstatic int ParseCallbackString( string, seg, num_segs )
X    char*	string;
X    Segment*	seg;
X    int		num_segs;
X{
X    register char* 	cp = string;
X    register char* 	ws;
X    register int	in_parens = 0;
X
X/*  -- Don't need to do anything if there is nothing interesting in string */
X    if ( cp == NULL) return 1;
X    if (*cp == NULL) return 1;
X
X    /* skip leading whitespace */
X    while( *cp <= ' ' )
X	if (*++cp == NULL) return 1;
X
X/*  -- Always end the parse on a null to make life easier */
X#define NEXT_CHAR if (*++cp == NULL) goto end_of_parse;
X#define BARF(str) { XtStringConversionWarning( string, str ); return 1; }
X
X    while (1)		/* parsing loop */
X    {
X	/* start new segment: we've got the start of the callback name,
X	** and nothing else.
X	*/
X	seg->name_start = cp;	
X        seg->name_end = seg->arg_start = seg->arg_end = (char*)NULL;
X
X
X	/* take care of possible error - barf if *cp is left paren or comma */
X	if ( *cp == '(' || *cp == ',' )
X	    BARF( "Callback, name cannot start with `(' or `,'" )
X
X	/* name is everything up to whitespace, a left paren, or comma */
X	while(   ' ' < *cp    &&    *cp != '('    &&    *cp != ','   )
X	    NEXT_CHAR
X
X	seg->name_end = cp-1;	/* found end of the callback name */
X
X	/* There may be whitespace between name and left paren or comma */
X	while( *cp <= ' ' )
X            NEXT_CHAR
X
X	/* if we've found a left paren, collect the argument */
X	if ( *cp == '(' )
X	{
X	    ws = cp;	/* actually points at initial left paren */
X	    in_parens = 1;
X	    while (in_parens)
X	    {
X		NEXT_CHAR	/* 1st time skips the initial left paren */
X		if ( '(' == *cp ) in_parens++;
X		if ( ')' == *cp ) in_parens--;
X	    }
X	    /* Now cp actually points at final right paren.  Lets get rid of
X	    ** leading and trailing argument whitespace.  If only whitespace
X	    ** then leave seg->arg_start == seg->arg_end == NULL 
X	    */
X	    do {
X		ws++;	/* skip initial '(', will hit ')' at cp if no arg */
X	    } while ( *ws <= ' ' );
X	    if (ws != cp)
X	    {
X		seg->arg_start = ws; /* first non-whitespace of argument */
X		ws = cp;	     /* now look at the final right paren */
X		do {
X		    ws--;
X		} while ( *ws <= ' ' );
X		seg->arg_end = ws;
X	    }
X	    NEXT_CHAR		/* skip final right paren */
X	}
X	/* Skip optional comma separator, then do next segment */
X	while( *cp <= ' ' || *cp == ',' )
X	    NEXT_CHAR
X
X	seg++;
X	/* NB: we must have space for following `NULL' segment */
X	if ( --num_segs < 2 )
X	    BARF( "Callback, Too many callbacks" );
X    }
X
Xend_of_parse:
X    /* Got here because we've detected the NULL terminator.  We
X    ** could have hit the NULL at any of the "NEXT_CHAR" invocations.
X    */
X
X    if (seg->name_start && !seg->name_end)
X	seg->name_end = cp-1;			/* callback name */
X    else if ( in_parens )
X	BARF( "Callback, Unbalanced parens in callback argument" )
X
X    seg++; seg->name_start = (char*)NULL;	/* following seg is NULL */
X
X    return 0; /* sucessful parse */
X}
X
X/*
X    -- Build XtCallbackList based on name+arg segments
X*******************************************************************************
X*/
X
Xstatic XtCallbackRec* BuildCallbackList( seg )
X    Segment* seg;
X{
X    XtCallbackRec	callback_list[MAX_CALLBACKS];	/* temporary */
X    XtCallbackRec*	rec = callback_list;
X    int                 callback_list_len = 0;
X    int			bytes;
X
X/*  -- process individual callback string segments "name(arg)" */
X    for( ;  seg->name_start  ;  seg++ )
X    {
X	if ( GetCallbackAddrFromCache( seg->name_start, seg->name_end, rec ) )
X	{
X	    CopyArgsToCallbackClosure( seg->arg_start,  seg->arg_end,  rec );
X	    rec++;
X	    callback_list_len++;
X	}
X    }
X
X/*  -- terminate the callback list */
X    {
X        rec->callback = NULL;
X	rec->closure  = NULL;
X	callback_list_len++;
X    }
X
X/*  -- make a permanent copy of the new callback list, and return a pointer */
X    bytes = callback_list_len * sizeof(XtCallbackRec);
X    rec = (XtCallbackRec*)XtMalloc( bytes );
X    memcpy ( (char*)rec, (char*)callback_list,  bytes );
X    return rec;
X}
X
X/*
X    -- Find named callback in callback cache: TRUE if found
X*******************************************************************************
X    Searches the Callback cache, gets the address of the callback
X    function, and the default closure data as registered.
X*/
X
Xstatic int GetCallbackAddrFromCache( name_start, name_end, rec )
X    char*          name_start;
X    char*          name_end;
X    XtCallbackRec* rec;
X{
X    static   char  lowerCaseName[MAX_XRMSTRING];
X    register char* cp   = name_start;
X    register char* dest = lowerCaseName;
X    register int   i;
X    XrmQuark       quark;
X
X    /* our callback cache names are case insensitive */
X    while( cp <= name_end )
X        *dest++ = (isupper(*cp) ) ? tolower (*cp++) : *cp++;
X    *dest = NUL;
X
X    /* try to locate callback in our cache of callbacks */
X    quark = XrmStringToQuark (lowerCaseName);
X
X    for ( i=0 ; i < callbacks_num ; i++ )
X    {
X        if ( callbacks_ptr[i].quark == quark )
X	{
X	    rec->callback = callbacks_ptr[i].callback;
X	    rec->closure  = callbacks_ptr[i].closure; /* default closure */
X	    return 1;
X	}
X    }
X    XtStringConversionWarning ( lowerCaseName,
X	"Callback, unknown callback name");
X    return 0;
X}
X
X/*
X    -- Copy arguments from segment into XtCallbackList
X*******************************************************************************
X*/
X
Xstatic void CopyArgsToCallbackClosure( arg_start,  arg_end,  rec )
X    char*          arg_start;
X    char*          arg_end;
X    XtCallbackRec* rec;
X{
X    register char *arg;
X    register int   alen;
X	   
X    if ( arg_start )
X    {
X	/* arg in parens - pass as string replacing default closure */
X	alen = 1 + (int)arg_end - (int)arg_start;
X	arg  = XtMalloc(alen+1);
X	strncpy ( arg, arg_start, alen );
X	arg[alen]    = NUL;
X	rec->closure = (caddr_t)arg;
X    }
X    else
X    {
X	/* no arg in parens.  Make sure closure is something -
X	** do NOT return NULL in any event.  Causes SEGV too
X	** easily.  
X	*/
X	if (rec->closure == NULL)
X	    rec->closure = (caddr_t)"";
X    }
X}
X
X/*
X    -- Convert String To Widget
X*******************************************************************************
X    This conversion creates a Widget id from the X resource database string.
X    The conversion will fail, and WcFullNameToWidget() will issue a warning,
X    if the widget so named has not been created when this converter is called.
X    For example, if a widget refers to itself for some reason, during
X    its creation when this converter is called, it is not yet created: 
X    therefore, the converter will fail.
X*/
X
Xvoid XmuCvtStringToWidget (args, num_args, fromVal, toVal)
X    XrmValue *args;
X    Cardinal *num_args;
X    XrmValue *fromVal;
X    XrmValue *toVal;
X{
X    toVal->addr = 
X	(caddr_t) WcFullNameToWidget( WcRootWidget(NULL), fromVal->addr);
X    toVal->size = sizeof(Widget);
X}
X
X/*
X*******************************************************************************
X* Public_function_declarations.
X*******************************************************************************
X*/
X
X/*
X    -- Add String To ... Convertors
X*******************************************************************************
X*/
X
Xvoid WcAddConverters ( app )
X    XtAppContext app;
X{
X    ONCE_PER_XtAppContext( app );
X
X    XtAddConverter       (XtRString,
X                          WcRClassPtr,
X                          CvtStringToClassPtr,
X                          (XtConvertArgList)NULL,
X                          (Cardinal)0);
X
X    XtAddConverter       (XtRString,
X                          WcRClassName,
X                          CvtStringToClassName,
X                          (XtConvertArgList)NULL,
X                          (Cardinal)0);
X
X    XtAddConverter       (XtRString,
X                          WcRConstructor,
X                          CvtStringToConstructor,
X                          (XtConvertArgList)NULL,
X                          (Cardinal)0);
X
X    XtAddConverter       (XtRString, 
X                          XtRCallback,
X                          CvtStringToCallback,
X                          (XtConvertArgList)NULL,
X                          (Cardinal)0);
X
X    XtAddConverter       (XtRString,
X                          XtRWidget,
X                          XmuCvtStringToWidget,
X                          (XtConvertArgList)NULL,
X                          (Cardinal)0);
X}
!STUFFY!FUNK!
echo Extracting DemosMotif/FakeMailBox
sed >DemosMotif/FakeMailBox <<'!STUFFY!FUNK!' -e 's/X//'
X>From x-mailer@expo.lcs.mit.edu Fri Jan  4 18:16 PST 1991
XReceived: from mips.com by wildcat.mips.com (5.61/Relay-2.9) 
X	id AA20156; Fri, 4 Jan 91 18:16:20 -0800
XReceived: from EXPO.LCS.MIT.EDU by mips.com (5.61.15/2.7) id AA13363; 
X	Fri, 4 Jan 91 18:15:58 -0800 
XReceived: by expo.lcs.mit.edu; Fri, 4 Jan 91 21:11:13 EST
XReceived: from decwrl.dec.com by expo.lcs.mit.edu; Fri, 4 Jan 91 21:11:05 EST
XReceived: by decwrl.dec.com; id AA10278; Fri, 4 Jan 91 18:13:39 -0800
XReceived: from baskerville.adobe.com by adobe.com (4.0/SMI-4.0)
X	id AA00804; Fri, 4 Jan 91 18:10:33 PST
XReceived: by baskerville.adobe.com (5.57/Ultrix3.0-C)
X	id AA27047; Fri, 4 Jan 91 18:09:42 -0800
XMessage-Id: <9101050209.AA27047@baskerville.adobe.com>
XTo: fontwork@expo.lcs.mit.edu
XCc: Paul Asente <asente@adobe.com>
XSubject: Re: How to request bitmap/outline characters
XDate: Fri, 04 Jan 91 18:09:41 PST
XFrom: asente@adobe.com
XStatus: O
X
XFrom: Bob Scheifler <rws@expo.lcs.mit.edu>
X
X>    From: asente@adobe.com
X>    Essentially this is adding a new, optional "pragma set" field to the
X>    beginning of XLFD.
X>
X>The XLFD (section 3.1) says:
X>
X[Reasons you can't add a new pragma set field to the beginning of XLFD]
X
XOk, don't think of it as part of XLFD.  It's not part of the font name
Xunder any circumstances; it will never be returned by ListFonts, it
Xnever shows up in a font name property.  It's a directive to OpenFonts,
Xuseful in conjunction with XLFD.
X
XThis whole issue sort of sputtered out.  I'd like to get some more
Xdiscussion going on it before the meeting at the conference.
X
X	-paul
X
X
X>From motif-talk-request@osf.org Fri Jan  4 22:52 PST 1991
XReceived: from mips.com by wildcat.mips.com (5.61/Relay-2.9) 
X	id AA22405; Fri, 4 Jan 91 22:52:06 -0800
XReceived: from osf.osf.org by mips.com (5.61.15/2.7) id AA03236; 
X	Fri, 4 Jan 91 22:51:49 -0800 
XReceived: by osf.osf.org (5.61/OSF 0.9)
X	id AA00623; Sat, 5 Jan 91 01:37:01 -0500
XReceived: from BU-PUB.BU.EDU by osf.osf.org (5.61/OSF 0.9)
X	id AA00608; Sat, 5 Jan 91 01:36:53 -0500
XReceived: by bu-pub.bu.edu (5.61+++/SMI-4.0.3)
X	id AA25240; Sat, 5 Jan 91 01:36:49 -0500
XDate: Sat, 5 Jan 91 01:36:49 -0500
XFrom: eap@bu-pub.bu.edu (Eric A Pearce)
XMessage-Id: <9101050636.AA25240@bu-pub.bu.edu>
XTo: kung32!kung@uunet.UU.NET
XCc: motif-talk@osf.org
XIn-Reply-To: Michael Kung's message of Fri, 4 Jan 91 14:43:35 CST <9101041443.AA00252@kung32.UUCP>
XSubject: Motif Contrib
XStatus: O
X
X
XActually, I think this is a real problem.
XAs I understand it, we are responsible for controlling access to the
XMotif source.  This means we can't have it sitting around publicly 
Xreadable on all our machines.    I fully expect anything unprotected
Xwill be copied to non-BU machines, even though this violates our
X"ethics policy" on BU machines.  Yet, people read the documentation
Xand justifiably come asking about source to the demo programs.
XI can't make everyone who is interested in learning Motif sign a
Xlicense agreement.   I don't want to have a special Motif machine
Xthat only a privileged few can sign onto and I'd rather not maintain
Xa list of authorized people.   It would be nice to have some public domain
Xexample source that I can put on each system when I install the 
XMotif libraries and header files.   We do this for other packages,
Xpeople can just look in /usr/local/examples for programming examples.
X
X-e
X
X Eric Pearce eap@bu-pub.bu.edu                             "Get Some!"
X Boston University Information Technology                  - Dispatches
X
X>From motif-request@alphalpha.com Sat Jan  5 02:34 PST 1991
XReceived: from mips.com by wildcat.mips.com (5.61/Relay-2.9) 
X	id AA03072; Sat, 5 Jan 91 02:34:30 -0800
XReceived: from BU.EDU by mips.com (5.61.15/2.7) id AA16890; 
X	Sat, 5 Jan 91 02:34:24 -0800 
XReceived: by BU.EDU (1.99) Sat, 5 Jan 91 05:29:22 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA15466; Sat, 5 Jan 91 05:04:11 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA15463; Sat, 5 Jan 91 05:04:06 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA09974; Sat, 5 Jan 91 04:29:22 EST
XReceived: from hplms2.hpl.hp.com by BU.EDU (1.99) Sat, 5 Jan 91 01:04:01 EST
XReceived: from hplnpm.hpl.hp.com by hplms2.hpl.hp.com with SMTP
X	(16.5/15.5+IOS 3.20) id AA29496; Fri, 4 Jan 91 22:04:00 -0800
XReceived: from localhost by hplnpm.hpl.hp.com with SMTP
X	(15.11/15.5+IOS 3.14) id AA04630; Fri, 4 Jan 91 22:03:58 pst
XMessage-Id: <9101050603.AA04630@hplnpm.hpl.hp.com>
XTo: motif@alphalpha.com
XSubject: WINTERP B.O.F. at 5th Annual Tech. Conf. on the X Window System
XOrganization: Hewlett-Packard Labs, Software & Systems Lab, Palo Alto, CA.
XX-Mailer: mh6.7
XDate: Fri, 04 Jan 91 22:03:57 PST
XFrom: Niels P. Mayer <mayer@hplnpm.hpl.hp.com>
XStatus: O
X
X
X<NOTE: Hopefully, this note hasn't appeared twice on comp.windows.x.motif.
XI sent this message to xpert@expo and motif@alphalpha.com on 12/20/90 but
Xit never made it to comp.windows.x.motif (verified on an HP and non-HP
Xsite)>
X
XI'm posting this note to announce that there will be an informal "birds of
Xa feather" session on the WINTERP OSF/Motif Widget INTERPreter at the
Xupcoming 5th Annual Tech. Conf. on the X Window System.  The conference is
Xhappening at the Boston Marriott Copley Place in Boston, Massachusetts,
X14-16 January 1991. I figured that since I'm attending this conference, I
Xmight as well get together with any current or prospective WINTERP users.
X
XThe BOF will be held on Tuesday, January 15 8:00 PM to 9:30 PM. For
Xdetails, see the schedules posted at the conference.
X
XI'd like to use this session as an informal information exchange:
X	* For interested folks to find out more about WINTERP.
X	* To get input on desired features and improvements.
X	* Discuss upcoming plans for WINTERP (e.g. the real soon now
X	  WINTERP 1.1 // Motif 1.1 release)
X	* Exchange ideas on how people are using WINTERP for application 
X	  prototyping.
X	* Find out how people are using WINTERP as a platform for building
X	  customizable/extensible applications.
X	* Discuss issues: WINTERP vs. UIL, WCL, Tcl, Builders, UIMSs, etc.
X	* etc.
X
XIf you are planning on attending, please reply by e-mail to
Xmayer@hplabs.hp.com (or {decwrl,sun,etc}hplabs!mayer). If you want, you may
Xalso suggest further topics for discussion.
X
XPS: for further info on WINTERP, see the proceedings of Xhibition '90 (pls
Xignore formatting and spelling errors introduced by ICS), or see the
Xproceedings of the EXUG First European X Conference (Sept 1990). 
X
XPPS: The following is a blurb introducing WINTERP and telling you how to
Xget this software:
X			--------------------
XWINTERP: An object-oriented rapid prototyping, development and delivery
Xenvironment for building user-customizable applications with the OSF/Motif
XUI Toolkit.
X------------------------------------------------------------------------------
XWINTERP is a Widget INTERPreter, an application development environment
Xenabling rapid prototyping of graphical user-interfaces (GUI) through the
Xinteractive programmatic manipulation of user interface objects and their
Xattached actions. The interpreter, based on David Betz's XLISP, provides an
Xinterface to the X11 toolkit Intrinsics (Xtk), the OSF/Motif widget set,
Xprimitives for collecting data from UN*X processes, and facilities for
Xinteracting with other UN*X processes. WINTERP thus supports rapid
Xprototyping of GUI-based applications by allowing the user to interactively
Xchange both the UI appearance and application functionality. These features
Xmake WINTERP a good tool for learning and experimenting with the
Xcapabilities of the OSF/Motif UI toolkit, allowing UI designers to more
Xeasily play "what if" games with different interface styles.
X
XWINTERP is also an excellent platform for delivering extensible or
Xcustomizable applications. By embedding a small, efficient language
Xinterpreter with UI primitives within the delivered application, users and
Xsystem integrators can tailor the static and dynamic layout of the UI,
XUI-to-application dialogue, and application functionality. WINTERP's use of
Xa real programming language for customization allows WINTERP-based
Xapplications to be much more flexible than applications using customization
Xschemes provided by the X resource database or OSF/Motif's UIL (user
Xinterface language).
X
XAn environment similar to WINTERP's already exists in the Gnu-Emacs text
Xeditor -- WINTERP was strongly influenced by Gnu-Emacs' successful design.
XIn Gnu-Emacs, a mini-Lisp interpreter is used to extend the editor to
Xprovide text-browser style interfaces to a number of UN*X applications
X(e.g. e-mail user agents, directory browsers, debuggers, etc). Whereas
XEmacs-Lisp enables the creation of new applications by tying together
XC-implemented primitives operating on text-buffer UI objects, WINTERP-Lisp
Xties together operations on graphical UI objects implemented by the Motif
Xwidgets. Both achieve a high degree of customizability that is common for
Xsystems implemented in Lisp, while still attaining the speed of execution
Xand (relatively) small size associated with C-implemented applications.
X
XOther features:
X	* WINTERP is free software -- available via anonymous ftp from
X	  expo.lcs.mit.edu:contrib/winterp/winterp-1.01.tar.Z
X	* Portable -- runs without porting on many Unix systems.	
X	* Interface to gnuemacs' lisp-mode allows code to be developed
X	  and tested without leaving the editor;
X	* Built-in RPC mechanism for inter-application communications;
X	* XLISP provides a simple Smalltalk-like object system.
X	* OSF/Motif widgets are real XLISP objects -- widgets can be
X	  specialized via subclassing, methods added or altered, etc.
X	* Automatic storage management of Motif/Xt/X data.
X	* Contains facilities for "direct manipulation" of UI components;
X
XYou may obtain the current source, documentation, and examples via
Xanonymous ftp from host expo.lcs.mit.edu: in directory contrib/winterp you
Xwill find the compress(1)'d tar(1) file winterp-1.01.tar.Z. Slides, papers
Xand further documentation can be found in directory contrib/winterp/papers.
X
XThere is also a mailing list for WINTERP-related announcements and
Xdiscussions. To get added to the list, send mail to
Xwinterp-request%hplnpm@hplabs.hp.com or hplabs!hplnpm!winterp-request.
X
X-------------------------------------------------------------------------------
X	    Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com
X		  Human-Computer Interaction Department
X		       Hewlett-Packard Laboratories
X			      Palo Alto, CA.
X				   *
X
X>From motif-request@alphalpha.com Sat Jan  5 02:53 PST 1991
XReceived: from mips.com by wildcat.mips.com (5.61/Relay-2.9) 
X	id AA03191; Sat, 5 Jan 91 02:53:13 -0800
XReceived: from BU.EDU by mips.com (5.61.15/2.7) id AA17762; 
X	Sat, 5 Jan 91 02:53:10 -0800 
XReceived: by BU.EDU (1.99) Sat, 5 Jan 91 05:26:25 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA15369; Sat, 5 Jan 91 05:00:09 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA15366; Sat, 5 Jan 91 05:00:04 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA09991; Sat, 5 Jan 91 04:29:45 EST
XReceived: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Sat, 5 Jan 91 02:24:07 EST
XReceived: by ucbvax.Berkeley.EDU (5.63/1.42)
X	id AA06929; Fri, 4 Jan 91 23:16:51 -0800
XReceived: from USENET by ucbvax.Berkeley.EDU with netnews
X	for motif@alphalpha.com (motif@alphalpha.com)
X	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
XDate: 5 Jan 91 06:08:11 GMT
XFrom: shlump.nac.dec.com!riscy.enet.dec.com!fuel.dec.com!graham@decuac.dec.com  (kris graham)
XOrganization: Mind Terroists
XSubject: Re: Determining children widget IDs (Summary)
XMessage-Id: <1859@riscy.enet.dec.com>
XReferences: <1991Jan2.185621.20296@sctc.com>, <20.277b089c@idicl1.idi.battelle.org>, <21.277e1314@idicl1.idi.battelle.org>
XSender: motif-request@alphalpha.com
XTo: motif@alphalpha.com
XStatus: O
X
X
X> One of the OSF/Motif 1.0 manuals had a demo program which did include
X> both, and this lead to much frustration later on when  I found out
X> that some fucntion protocols (e.g. XtScreen, XtDisplay,..) in Intrinsic.h 
X> were being redefined by
X> macro defines in IntrinsicP.h by #include-ing the former followed by the
X> latter, and this resulted in core dumps when I tried using the functions.
X
XThe  XtDisplay ..etc function causing core dumps is a  behaviour ;-) 
Xthat was introduced with the advent of X11R4/Motif 1.1.  There are 
Xsome talks about incompatible specs between R3 and R4.
X  
XI noticed this  too when moving some applications from Motif 1.0.x to 1.1.
X
XUse  XtDisplayOfObject()  to get around this problem.
X
X XtDisplayOfObject(object)  
X
XWidget object ;   /*  object whose display is to be returned */
X
X
XChristopher Graham          
XDigital Equipment Corp            
XUltrix Resource Center                                             
XNew York City
X
XInternet: graham@fuel.enet.dec.com 
XUUCP:     ...!decwrl!fuel.enet.dec.com!graham
X
X>From motif-request@alphalpha.com Sat Jan  5 03:30 PST 1991
XReceived: from mips.com by wildcat.mips.com (5.61/Relay-2.9) 
X	id AA03442; Sat, 5 Jan 91 03:30:29 -0800
XReceived: from BU.EDU by mips.com (5.61.15/2.7) id AA20160; 
X	Sat, 5 Jan 91 03:30:25 -0800 
XReceived: by BU.EDU (1.99) Sat, 5 Jan 91 06:28:07 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA15556; Sat, 5 Jan 91 06:00:15 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA15553; Sat, 5 Jan 91 06:00:10 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA10143; Sat, 5 Jan 91 05:29:06 EST
XReceived: from mcsun.EU.net by BU.EDU (1.99) Sat, 5 Jan 91 04:39:51 EST
XReceived: by mcsun.EU.net with SMTP; Sat, 5 Jan 91 10:39:55 +0100
XReceived: from cl.cam.ac.uk by kestrel.Ukc.AC.UK   via Janet (UKC CAMEL FTP)
X           id aa08671; 5 Jan 91 9:35 GMT
XReceived: from westhawk.uucp by swan.cl.cam.ac.uk via UUCP channel (PP) 
X          id <3995-0@swan.cl.cam.ac.uk>; Sat, 5 Jan 1991 09:34:44 +0000
XReceived: by westhawk.uucp (4.0/SMI-3.2) id AA06851; Sat, 5 Jan 91 09:16:54 GMT
XDate: Sat, 5 Jan 91 09:16:54 GMT
XFrom: "Timothy H Panton." <westhawk!thp@relay.EU.net>
XMessage-Id: <"swan.cl.ca.001:05.00.91.09.34.48"@cl.cam.ac.uk>
XSender: westhawk!thp@relay.EU.net
XApparently-To: <motif@alphalpha.com>
XStatus: O
X
X
XMessage-Id: <9101050916.AA06851@westhawk.uucp>
XTo: motif%alphalpha.com%ukc.ac.uk@cl.cam.ac.uk
XSubject: Re:  Trying to create a widget with a 'double' or 'float' resource.
XCc: thp@westhawk
X
XDoug Selph <cae780!digger> on the difficulty of using doubles as resources
X> And don't come responding to me that you have to pass the 
X> 'address of a double or...'
X
XOk I won't, but many resources are passed by reference, strings, structures
Xetc. It is a weakness of Xt, but there you go.
X 
X> define my own 'DblArg' and 'AxisSetDblValues'
X
XThis won't help you with the (many) other ways resources get values.
XYou might as well dispense with the pretence and write a function, say
XSetAxis(widget,axis,value) .
X
XTim.
X+----------------------------------------------------------------------------+
X|Tim Panton, Westhawk Ltd.    "Do not meddle in the affairs of Wizards, for  |
X|Phone: +44 928722574         	   they are subtle and quick to anger."      |
X|Email: thp%westhawk.uucp@ukc.ac.uk       The Lord of the Rings.             |
X|Paper: Westhawk Ltd. 26 Rydal Grove, Helsby, Cheshire, WA6 OET. UK.         |
X+----------------------------------------------------------------------------+
X
X>From x-mailer@expo.lcs.mit.edu Sat Jan  5 06:38 PST 1991
XReceived: from mips.com by wildcat.mips.com (5.61/Relay-2.9) 
X	id AA04589; Sat, 5 Jan 91 06:38:56 -0800
XReceived: from EXPO.LCS.MIT.EDU by mips.com (5.61.15/2.7) id AA25582; 
X	Sat, 5 Jan 91 06:38:51 -0800 
XReceived: by expo.lcs.mit.edu; Sat, 5 Jan 91 09:31:46 EST
XReceived: from expire.lcs.mit.edu by expo.lcs.mit.edu; Sat, 5 Jan 91 09:31:42 EST
XReceived: by expire.lcs.mit.edu; Sat, 5 Jan 91 09:31:40 EST
XMessage-Id: <9101051431.AA15569@expire.lcs.mit.edu>
XTo: fontwork@expo.lcs.mit.edu
XSubject: Re: How to request bitmap/outline characters 
XIn-Reply-To: Your message of "Fri, 04 Jan 91 18:09:41 PST."
X             <9101050209.AA27047@baskerville.adobe.com> 
XDate: Sat, 05 Jan 91 09:31:37 EST
XFrom: Bob Scheifler <rws@expo.lcs.mit.edu>
XStatus: O
X
X    To: asente@adobe.com
X    Ok, don't think of it as part of XLFD.  It's not part of the font name
X    under any circumstances; it will never be returned by ListFonts, it
X    never shows up in a font name property.  It's a directive to OpenFonts,
X    useful in conjunction with XLFD.
X
XHmm, OK, I understand better now what the intention is.  But I think I like
Xit even less.  Essentially you are introducing a loophole mechanism for making
Xarbitrary semantic changes to OpenFont without going through any kind of
Xreal change to the X protocol.  (Of course, introducing scalable font matching
Xdoes this too, although [I think] in a less severe way.)  It seems to me that
Xif there is both an outline and a bitmap, and you really want to distinguish
Xthem, then they *should* have distinct names.  E.g., you really do want both
Xof them to show up in a ListFonts, right?  Otherwise how do you know that
Xthe server supports this magic?
X
X    This whole issue sort of sputtered out.  I'd like to get some more
X    discussion going on it before the meeting at the conference.
X
XAgreed.  Jim Fulton, are you putting together an agenda for the meeting?
X
X>From motif-request@alphalpha.com Sat Jan  5 10:29 PST 1991
XReceived: from mips.com by wildcat.mips.com (5.61/Relay-2.9) 
X	id AA06221; Sat, 5 Jan 91 10:29:28 -0800
XReceived: from BU.EDU by mips.com (5.61.15/2.7) id AA02393; 
X	Sat, 5 Jan 91 10:29:26 -0800 
XReceived: by BU.EDU (1.99) Sat, 5 Jan 91 13:27:02 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA15714; Sat, 5 Jan 91 11:59:58 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA15711; Sat, 5 Jan 91 11:59:48 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA11397; Sat, 5 Jan 91 11:23:33 EST
XReceived: from ucbvax.Berkeley.EDU by BU.EDU (1.99) Sat, 5 Jan 91 09:39:20 EST
XReceived: by ucbvax.Berkeley.EDU (5.63/1.42)
X	id AA13431; Sat, 5 Jan 91 06:35:07 -0800
XReceived: from USENET by ucbvax.Berkeley.EDU with netnews
X	for motif@alphalpha.com (motif@alphalpha.com)
X	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
XDate: 4 Jan 91 19:37:14 GMT
XFrom: pmafire!uudell!bigtex!texsun!smunews!ti-csl!m2.csc.ti.com!jmellby@uunet.uu.net  (John Mellby)
XOrganization: TI Computer Science Center, Dallas
XSubject: Restricting or "greying out" menu items
XMessage-Id: <1991Jan4.193714.19947@csc.ti.com>
XSender: motif-request@alphalpha.com
XTo: motif@alphalpha.com
XStatus: O
X
X
X	We want to build a menu application in X11R4/Motif 1.0.3 (soon
Xto be Motif 1.1) that has the 'grey out' functionality in the menus.
XI.E. We want to build a menu, and depending upon the state of the application,
Xprevent the user from selecting some of the menu items.
X	Some of this could feasibly be done through mwm, but generally
Xwe  can't use the f.nop of Mwm because these temporary windows aren't 
Xcontrolled by Mwm.
X	I know how to do this through creating the menus using pushbuttons 
Xwhen selectable and labels (in a different font) when not.  However, I don't
Xwant to create a new menu with different widgets each time the selectivity of
Xa command changes. Could I use the same menu widget switching sub-widgets
Xbetween displays?  How?
X	Could I work within the pushbuttons, ie change the font of the label 
Xand change the callback function, then re-realize the menu on demand? This 
Xseems the best solution to me at present.
X	Is there some easy way to do this I don't know about?
X
XDave Beck
Xbeck@flopn2.ti.com
X or
XJohn R. Mellby                       Texas Instruments
Xjmellby@skvax1.ti.com                P.O.Box 869305, MS 8513
X                                     Plano,  Texas, 75086
X(214)517-5370                       (214)575-6774 (work)
X
X>From motif-request@alphalpha.com Sat Jan  5 10:30 PST 1991
XReceived: from mips.com by wildcat.mips.com (5.61/Relay-2.9) 
X	id AA06233; Sat, 5 Jan 91 10:30:11 -0800
XReceived: from BU.EDU by mips.com (5.61.15/2.7) id AA02406; 
X	Sat, 5 Jan 91 10:30:09 -0800 
XReceived: by BU.EDU (1.99) Sat, 5 Jan 91 13:27:55 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA15820; Sat, 5 Jan 91 13:00:07 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA15817; Sat, 5 Jan 91 13:00:02 EST
XReceived: by alphalpha.com ( 5.52 (84)/test)
X	id AA11479; Sat, 5 Jan 91 12:20:58 EST
XFrom: nazgul@alphalpha.com (Kee Hinckley)
XTo: jmellby@skvax1.ti.com, motif@alphalpha.com (The Motif Discussion List)
XSubject: Re: Restricting or "greying out" menu items
XIn-Reply-To: <1991Jan4.193714.19947@csc.ti.com>
XReferences: <1991Jan4.193714.19947@csc.ti.com>
XX-Mailer: Poste
XDate: Sat, 5 Jan 91 12:20:54 -0500
XMessage-Id: <910105122054.9225@alphalpha>
XStatus: O
X
X> 	Is there some easy way to do this I don't know about?
X
XXtSetSensitive(widget, False);
X
!STUFFY!FUNK!
echo Extracting DemosMotif/XMailbox.peeb
sed >DemosMotif/XMailbox.peeb <<'!STUFFY!FUNK!' -e 's/X//'
X/*
X * XMailbox.res
X *
X * Mri resource file for xmailbox.
X *
X * This interface MUST include a XmText widget.
X * It must be registered w/ the main application using RegisterText().
X * See below.
X *
X * There are a number of functions that can be bound to various events
X * within the interface.  Commonly these are attached to something like
X * an activateCallback on a PushButton:
X *
X * WcExitCB	
X *	Will exit the application.
X *
X * ClearText
X *	This clears the messages in the mailbox window.  The next 
X *	incoming mail will become the first message in the window.
X *	This action happens automatically when the mailbox is emptied
X *	from a mailer like xmh or elm.
X *
X * HideMail
X *	Causes the mailbox window to disappear until the next incoming mail
X *	arrives.  Keeps the desktop clean.  When the hideNoMail resource
X *	is set to true, the mailbox window is hidden whenever there are
X * 	no unread mail messages left.
X *
X * ReScan
X *	Causes the mailbox to be rescanned for all unread messages and
X *	the mailbox window to be updated.  This action might be performed
X *	after a ClearText, when you wish to see some past message.
X *
X * None, some, or all of these actions may be used freely within this
X * interface.  There are a number of Mri internal actions as well, 
X * (WcExitCB is one of them) see Mri documentation for details.
X *
X */
X
X/*
X * toplevel declaration.
X */
XXMailbox*xmailbox.wcChildren:		bb
X
X/*
X * Uncomment this for a trace of the widget hierarchy.  Useful for building
X * resource files.
X */
X!*wcTrace:				True
X
XXMailbox*bb.wcConstructor:		XmCreateBulletinBoard
XXMailbox*bb.wcChildren:			table
XXMailbox*bb.defaultPosition:            True
X
X/*
X * The Text window.  Some kind of XmText construct MUST be declared and
X * used for displaying mail messages.
X */
XXMailbox*text.wcConstructor:            XmCreateScrolledText
XXMailbox*text.wcPopups:			menuBar
XXMailbox*text.wcCallback:               RegisterText ( this )
XXMailbox*text.editable:                 False
XXMailbox*text.editMode:                 MULTI_LINE_EDIT
XXMailbox*text.columns:                  40
XXMailbox*text.rows:                     5
X
XXMailbox*XmText.translations:   #augment \n\
X                <Btn3Down>: MriPopupACT( *menuBar )
X
X/*
X * I use a Table widget to hold it all together
X */
XXMailbox*table.wcClass:			xmpTableWidgetClass
XXMailbox*table.wcChildren:		text
X
X!                               	c r cs rs opts
XXMailbox*table.layout:	textSW		0 0  1  1     ;
X
XXMailbox*table.columnSpacing:         	5
XXMailbox*table.rowSpacing:            	5
XXMailbox*table.borderWidth:           	0
XXMailbox*table.internalHeight:        	5
XXMailbox*table.internalWidth:         	5
X
X/*
X * Buttons attahced to a pulldown menu for invoking built in actions
X */
XXMailbox*clear.wcConstructor:		XmCreatePushButtonGadget
XXMailbox*clear.labelString:		Rubout
XXMailbox*clear.mnemonic:		R
XXMailbox*clear.activateCallback:	ClearText
X
XXMailbox*quit.wcConstructor:		XmCreatePushButtonGadget
XXMailbox*quit.labelString:		Quit
XXMailbox*quit.mnemonic:			Q
XXMailbox*quit.activateCallback:		WcExitCB
X
XXMailbox*hide.wcConstructor:		XmCreatePushButtonGadget
XXMailbox*hide.labelString:		Hide
XXMailbox*hide.mnemonic:			H
XXMailbox*hide.activateCallback:		HideMail
X
XXMailbox*rescan.wcConstructor:		XmCreatePushButtonGadget
XXMailbox*rescan.labelString:		Rescan
XXMailbox*rescan.mnemonic:		R
XXMailbox*rescan.activateCallback:	ReScan
X
XXMailbox*cmd.wcConstructor:		XmCreatePushButtonGadget
XXMailbox*cmd.labelString:		Mail
XXMailbox*cmd.mnemonic:			M
XXMailbox*cmd.activateCallback:		WcSystemCB (/usr/bin/X11/xterm  -e /usr/bin/mailx &)
X
XXMailbox*sep1.wcConstructor:            XmCreateSeparator
X
XXMailbox*sep2.wcConstructor:            XmCreateSeparator
XXMailbox*sep2.separatorType:            Double_Line
X
XXMailbox*mlabel.wcConstructor:		XmCreateLabelGadget
XXMailbox*mlabel.labelString:		Commands
X
X/*
X * the menubar
X */
XXMailbox*menuBar.wcConstructor:         XmCreatePopupMenu
XXMailbox*menuBar.wcChildren:            mlabel, sep1, \
X					clear, hide, rescan, cmd, \
X					sep2, quit
X
!STUFFY!FUNK!
echo " "
echo "End of kit 28 (of 35)"
cat /dev/null >kit28isdone
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.