[comp.sources.x] v11i050: wcl - Widget Creation Language, Part35/35

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

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

#! /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 35 (of 35).  If kit 35 is complete, the line"
echo '"'"End of kit 35 (of 35)"'" will echo at the end.'
echo ""
export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
mkdir Ari DemosAthena DemosMotif Doc Mri Xp 2>/dev/null
echo Extracting Mri/MriMotifP.h
sed >Mri/MriMotifP.h <<'!STUFFY!FUNK!' -e 's/X//'
X/*
X** Copyright (c) 1990 David E. Smyth
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: @(#)MriMotifP.h 1.1 ( 19 Nov 90 )
X*/
X
X#ifndef _MriMotifP_h_
X#define _MriMotifP_h_
X
X/* Core, Object, RectObj, WindowObj, 
X** XmGadget, XmPrimitive, and XmComposite, 
X** Shell, OverrideShell, WMShell, VendorShell, TopLevelShell, ApplicationShell, 
X** Constraint, XmManager.
X*/
X#include <Xm/XmP.h>
X
X/* XmGadget Subclasses
X*/
X#include <Xm/ArrowBGP.h>
X#include <Xm/SeparatoGP.h>
X#include <Xm/LabelGP.h>
X#include <Xm/CascadeBGP.h>
X#include <Xm/PushBGP.h>
X#include <Xm/ToggleBGP.h>
X
X/* XmPrimitive Subclasses
X*/
X#include <Xm/ArrowBP.h>
X#include <Xm/ListP.h>
X#include <Xm/ScrollBarP.h>
X#include <Xm/SeparatorP.h>
X#include <Xm/TextP.h>
X#include <Xm/LabelP.h>
X#include <Xm/CascadeBP.h>
X#include <Xm/DrawnBP.h>
X#include <Xm/PushBP.h>
X#include <Xm/ToggleBP.h>
X
X/* XmManager Subclasses
X*/
X#include <Xm/DrawingAP.h>
X#include <Xm/FrameP.h>
X#include <Xm/PanedWP.h>
X#include <Xm/RowColumnP.h>
X#include <Xm/ScaleP.h>
X#include <Xm/ScrolledWP.h>
X#include <Xm/MainWP.h>
X#include <Xm/BulletinBP.h>
X#include <Xm/FormP.h>
X#include <Xm/MessageBP.h>
X#include <Xm/SelectioBP.h>
X#include <Xm/CommandP.h>
X#include <Xm/FileSBP.h>
X
X/* Shell Subclasses
X*/
X#include <X11/ShellP.h>
X#include <X11/VendorP.h>
X#include <Xm/MenuShellP.h>
X#include <Xm/DialogSP.h>
X
X/* Apparently Obsolete 
X*/
X#include <Xm/SashP.h>
X
X#endif
!STUFFY!FUNK!
echo Extracting Wc.tmpl
sed >Wc.tmpl <<'!STUFFY!FUNK!' -e 's/X//'
X#include "Install.rules"
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/*
X * Variables which may need to be tailored on a site by site basis:
X *
X *		name			value			default
X *
X *	HaveAthenaWidgetSet		YES or NO		YES
X *	HaveMotifWidgetSet		YES or NO		NO
X *
X *	UsingOldXt			(Pre-R4) YES or NO	NO
X *
X *	StandardInstallationLocation	YES or NO		YES
X *	INSTLIB				libraries here		$(LIBDIR)
X *	INSTLIN				lint libs here		$(LINTLIBDIR)
X *	INSTINC				includes here 		$(INCDIR)
X *	INSTBIN				progs installed here	$(BINDIR)
X *	INSTMAN				man pgs installed here	$(MANDIR)
X *	INSTAPP				app-defaults here	$(XAPPLOADDIR)
X */
X
X#define HaveAthenaWidgetSet YES
X#define HaveMotifWidgetSet NO
X
X#define UsingOldXt NO
X
X#define StandardInstallationLocation YES
X
X#if StandardInstallationLocation
X      INSTLIB = $(LIBDIR)
X      INSTLIN = $(LINTLIBDIR)
X      INSTINC = $(INCDIR)
X      INSTBIN = $(BINDIR)
X      INSTMAN = $(MANDIR)
X      INSTAPP = $(XAPPLOADDIR)
X#else
X/**/# What I use for pre-release testing
X#define PreCM u/tds/david/tmp
X      INSTLIB = /PreCM/lib
X      INSTLIN = /PreCM/lib/lint
X      INSTINC = /PreCM/include
X      INSTBIN = /PreCM/bin
X      INSTMAN = /PreCM/man/man1
X      INSTAPP = /PreCM/app-defaults
X
X      MKDIRHIER = /bin/sh /u/tds/david/bin/mkdirhier.sh
X#endif
X 
X/*
X * You probably never need to make any edits from here to end of file
X */
X
X#ifndef WcTopDir
X#define WcTopDir .
X#endif
X
X   WCTOPDIR = WcTopDir
X/*
X * making all from the top level Makefile overrides these to use local libs
X */
X      WCLIB = -L$(INSTLIB) -lWc
X      XPLIB = -L$(INSTLIB) -lXp
X     XMPLIB = -L$(INSTLIB) -lXmp
X
X#if HasSunOSSharedLibraries
X    SoWcRev = 1.05
X#else
X    DEPLIBS = $(WCTOPDIR)/Wc/libWc.a
X#endif
!STUFFY!FUNK!
echo Extracting DemosAthena/MD
sed >DemosAthena/MD <<'!STUFFY!FUNK!' -e 's/X//'
X#
X# Motif Widgets for Multi-Display Demo
X#
X
XMDmotif.wcChildren:		rc
X
X*rc.wcClassName:		XmRowColumn
X*rc.wcChildren:			exit, close, bugs, snap, crackle, pop
X
X*exit.wcConstructor:		XmCreatePushButton
X*exit.activateCallback:		WcExitCB
X
X*close.wcConstructor:		XmCreatePushButton
X*close.activateCallback:	KillWidgetTreeOnDisplay
X
X*bugs.wcConstructor:		XmCreatePushButton
X*bugs.activateCallback:		NewWidgetTreeOnDisplay( bugs:0.0 )
X
X*snap.wcConstructor:		XmCreatePushButton
X*snap.activateCallback:		NewWidgetTreeOnDisplay( snap:0.0 )
X
X*crackle.wcConstructor:		XmCreatePushButton
X*crackle.activateCallback:	NewWidgetTreeOnDisplay( crackle:0.0 )
X
X*pop.wcConstructor:		XmCreatePushButton
X*pop.activateCallback:		NewWidgetTreeOnDisplay( pop:0.0 )
X
X#
X# Athena Widgets for Multi-Display Demo
X#
X
XMDathena.wcChildren:		table
X
X*table.wcClassName:		Table
X*table.wcChildren:		aexit, aclose, abugs, asnap, acrackle, apop
X#		child   	c r cs rs opts
X*table.layout:	aexit		0 0  1  1	;\
X		aclose		0 1  1  1	;\
X		abugs		0 2  1  1	;\
X		asnap		0 3  1  1	;\
X		acrackle	0 4  1  1	;\
X		apop		0 5  1  1
X
X*aexit.wcClass:		commandWidgetClass
X*aexit.label:		exit
X*aexit.callback:	WcExitCB
X
X*aclose.wcClass:	commandWidgetClass
X*aclose.label:		close
X*aclose.callback:	KillWidgetTreeOnDisplay
X
X*abugs.wcClass:		commandWidgetClass
X*abugs.label:		bugs
X*abugs.callback:	NewWidgetTreeOnDisplay( bugs:0.0 )
X
X*asnap.wcClass:		commandWidgetClass
X*asnap.label:		snap
X*asnap.callback:	NewWidgetTreeOnDisplay( snap:0.0 )
X
X*acrackle.wcClass:	commandWidgetClass
X*acrackle.label:	crackle
X*acrackle.callback:	NewWidgetTreeOnDisplay( crackle:0.0 )
X
X*apop.wcClass:		commandWidgetClass
X*apop.label:		pop
X*apop.callback:		NewWidgetTreeOnDisplay( pop:0.0 )
X
!STUFFY!FUNK!
echo Extracting DemosMotif/MD
sed >DemosMotif/MD <<'!STUFFY!FUNK!' -e 's/X//'
X#
X# Motif Widgets for Multi-Display Demo
X#
X
XMDmotif.wcChildren:		rc
X
X*rc.wcClassName:		XmRowColumn
X*rc.wcChildren:			exit, close, bugs, snap, crackle, pop
X
X*exit.wcConstructor:		XmCreatePushButton
X*exit.activateCallback:		WcExitCB
X
X*close.wcConstructor:		XmCreatePushButton
X*close.activateCallback:	KillWidgetTreeOnDisplay
X
X*bugs.wcConstructor:		XmCreatePushButton
X*bugs.activateCallback:		NewWidgetTreeOnDisplay( bugs:0.0 )
X
X*snap.wcConstructor:		XmCreatePushButton
X*snap.activateCallback:		NewWidgetTreeOnDisplay( snap:0.0 )
X
X*crackle.wcConstructor:		XmCreatePushButton
X*crackle.activateCallback:	NewWidgetTreeOnDisplay( crackle:0.0 )
X
X*pop.wcConstructor:		XmCreatePushButton
X*pop.activateCallback:		NewWidgetTreeOnDisplay( pop:0.0 )
X
X#
X# Athena Widgets for Multi-Display Demo
X#
X
XMDathena.wcChildren:		table
X
X*table.wcClassName:		Table
X*table.wcChildren:		aexit, aclose, abugs, asnap, acrackle, apop
X#		child   	c r cs rs opts
X*table.layout:	aexit		0 0  1  1	;\
X		aclose		0 1  1  1	;\
X		abugs		0 2  1  1	;\
X		asnap		0 3  1  1	;\
X		acrackle	0 4  1  1	;\
X		apop		0 5  1  1
X
X*aexit.wcClass:		commandWidgetClass
X*aexit.label:		exit
X*aexit.callback:	WcExitCB
X
X*aclose.wcClass:	commandWidgetClass
X*aclose.label:		close
X*aclose.callback:	KillWidgetTreeOnDisplay
X
X*abugs.wcClass:		commandWidgetClass
X*abugs.label:		bugs
X*abugs.callback:	NewWidgetTreeOnDisplay( bugs:0.0 )
X
X*asnap.wcClass:		commandWidgetClass
X*asnap.label:		snap
X*asnap.callback:	NewWidgetTreeOnDisplay( snap:0.0 )
X
X*acrackle.wcClass:	commandWidgetClass
X*acrackle.label:	crackle
X*acrackle.callback:	NewWidgetTreeOnDisplay( crackle:0.0 )
X
X*apop.wcClass:		commandWidgetClass
X*apop.label:		pop
X*apop.callback:		NewWidgetTreeOnDisplay( pop:0.0 )
X
!STUFFY!FUNK!
echo Extracting Ari/Ari.man
sed >Ari/Ari.man <<'!STUFFY!FUNK!' -e 's/X//'
X.TH "Ari" 1 "1 January 1991"
X.SH NAME
XAri \- Athena Resource Interpreter
X.SH SYNOPSIS
X.B Ari
X.SH DESCRIPTION
X.I Ari
Xis a tool for developing Athena based user interfaces.  The look and
Xfeel of the user interface can be specified in one or more X resource
Xfiles.
X.SH OPTIONS
X.I Ari
Xtakes standard
X.I X
Xoptions. (see
X.I X(1)
X.SH FILES
X.IP /usr/lib/X11/app-defaults/A[0-9][0-9]*
XExample resource files.
X.IP .../Doc/*.PS
XPostscript documents describing the Widget Creation Library, Ari, and Mri.
XThe Doc directory is probably named ...contrib/Wcl/Doc within the X11R4
Xand later source tree.
X.SH "ENVIRONMENT VARIABLES"
X.IP XENVIRONMENT
XSpecifies the name of the initial resource file.
X.SH "SEE ALSO"
X.BI Mri (1)
X.BI X (1)
X.SH AUTHORS
XMartin Brunecky at Auto-trol Technology, Denver (marbru@auto-trol.UUCP)
Xwrote the initial code and posted it to comp.windows.x with the title
XPOOR MAN's UIL - WsXc.
X
XDavid Harrison of the UC Berkeley Electronics Research Lab
X(davidh@ic.Berkeley.EDU or ...!ucbvax!ucbcad!davidh) wrote a very
Xuseful Table widget.  Kee Hinckley (nazgul@alphalpa.com) wrote a
Xversion of Table which works with Motif.  The Table widget, in both its
Xincarnations, is so good I've included it with this distribution.  It
Xis separately available from archive sites.  See TableHEARYE and
XTableFIRST for information on this widget.
X
XMany people helped alot by providing bug fixes, enhancements, suggestions,
Xand just plain feedback.  There are many who helped, including Andrew Peebles
Xat MIPS, Randy Brown, Art Poley, Mike Yee of OSF, Richard Hesketh, and
Xour own Kaleb Keithley.
X
XThe rest was done by David E. Smyth of Jet Propulsion Labs, Pasadena
X(david@devvax.jpl.nasa.gov).
!STUFFY!FUNK!
echo Extracting Mri/M06_ListTable
sed >Mri/M06_ListTable <<'!STUFFY!FUNK!' -e 's/X//'
X  Scrolled Lists in Tables
X  ------------------------
X
X  This resource file presents the way one must deal with scrolled lists
X  which are managed by Table widgets.  In the layout resource for the
X  Table widget, we must name the scrolled window, NOT the list:
X
X        *table.layout:          quit    0 0 1 1 hH ;\
X                                slistSW 0 1 1 1
X
X  If we simply said "slist" instead of "slistSW" then nothing
X  appears, because slist is not one of the children of table.
X  Rather, slistSW is the child of table, and slist is the
X  child of slistSW.
X
X  As an aside, the layout options hH on the quit button allow
X  resizing to work nicely.  Compare the behavior of the Table
X  with the resize behavior of XmRowColumn.  I think you will
X  prefer Table over XmRowColumn.
X
X  ----------------------------------------------------------------------
X
X!*wcTrace:	True
X
XMri.wcChildren:		table
XMri.title:		M06_ListTable
X
X*table.wcClassName:	Table
X*table.wcChildren:	quit, slist
X*table.layout:		quit    0 0 1 1 hH ;\
X			slistSW 0 1 1 1
X
X*quit.wcConstructor:	XmCreatePushButton
X*quit.activateCallback:	WcExitCB
X*quit.labelString:	Push To Exit
X
X*slist.wcConstructor:		XmCreateScrolledList
X*slist.items:			This demo uses the Table widget.,\
X				Try resizing the window.,\
X				You will see the list gets wider\\,,\
X				AND longer - unlike with XmRowColumn.,\
X				foo,bar, baz is a nice item,\
X				zorp,the,quick,brown,fox,\
X				jumped,over,the, lazy, dog, and, blew,\
X				the, candle, out. This\\, and that, and,\
X				more,to,come. That's all.
X*slist.itemCount:		26
X*slist.visibleItemCount:	8
X*slist.selectionPolicy:		EXTENDED_SELECT
!STUFFY!FUNK!
echo Extracting Mri/M06_ListRowCol
sed >Mri/M06_ListRowCol <<'!STUFFY!FUNK!' -e 's/X//'
X  Scrolled Lists
X  --------------
X
X  This resource file presents the way one must deal with scrolled lists
X  inside of XmRowColumn widgets.  Its actually pretty easy now.
X
X  Note, however that XmRowColumn does not do such a good job of
X  resizing the scrolled window widget.
X
X  ----------------------------------------------------------------------
X
X!*wcTrace:	True
X
XMri.wcChildren:		rc
XMri.title:		M06_ListRowCol
X
X*rc.wcConstructor:	XmCreateRowColumn
X*rc.wcChildren:		quit, slist
X*rc.entryAlignment:	ALIGNMENT_CENTER
X
X*quit.wcConstructor:	XmCreatePushButton
X*quit.activateCallback:	WcExitCB
X*quit.labelString:	Push To Exit
X
X*slist.wcConstructor:		XmCreateScrolledList
X*slist.items:			This demo uses the XmRowColumn,\
X				widget.  Try resizing the window.,\
X				You will see the list gets wider\\,,\
X				but not longer.,\
X				foo,bar, baz is a nice item,\
X				zorp,the,quick,brown,fox,\
X				jumped,over,the, lazy, dog, and, blew,\
X				the, candle, out. This\\, and that, and,\
X				more,to,come. That's all.
X*slist.itemCount:		26
X*slist.visibleItemCount:	11
X*slist.selectionPolicy:		EXTENDED_SELECT
!STUFFY!FUNK!
echo Extracting Xp/Imakefile
sed >Xp/Imakefile <<'!STUFFY!FUNK!' -e 's/X//'
X#include "../Wc.tmpl"
X
X/**/# Imakefile for libXp
X
XHEADERS = Table.h TableP.h
X
XSRCS = Table.c XpRegAll.c
XOBJS = Table.o XpRegAll.o
X
Xall::
X#if HasSunOSSharedLibraries
X# if DebugLibWc
XSharedAndDebuggedLibraryObjectRule()
X# else
XSharedLibraryObjectRule()
X# endif
X#else
X# if DebugLibWc && ProfileLibWc
XDebuggedAndProfiledLibraryObjectRule()
X# else
X#  if DebugLibWc
XDebuggedLibraryObjectRule()
X#  else
X#   if ProfileLibWc
XProfiledLibraryObjectRule()
X#   else
XNormalLibraryObjectRule()
X#   endif
X#  endif
X# endif
X#endif
X
X/*
X * always generate unshared library too
X */
X#if HasSunOSSharedLibraries
XNormalSharedLibraryTarget(Xp,$(SoWcRev),$(OBJS))
XInstallSharedLibrary(Xp,$(SoWcRev),$(INSTLIB))
X#endif
XNormalLibraryTarget(Xp,$(OBJS))
XInstallLibrary(Xp,$(INSTLIB))
X
XLintLibraryTarget(Xp,$(SRCS))
XInstallLintLibrary(Xp,$(INSTLIN))
X
X#if ProfileLibWc
XProfiledLibraryTarget(Xp,$(OBJS))
XInstallLibrary(Xp_p,$(INSTLIB))
X#endif
X
X#if DebugLibWc
XDebuggedLibraryTarget(Xp,$(OBJS))
X
X#endif
X
XMakeDirectories(install,$(INSTINC)/Xp)
XInstallMultiple($(HEADERS),$(INSTINC)/Xp)
X
XDependTarget()
X
XNormalLintTarget($(SRCS))
X
!STUFFY!FUNK!
echo Extracting Ari/A03_Box
sed >Ari/A03_Box <<'!STUFFY!FUNK!' -e 's/X//'
X  This provides similar functionality as that shown by the Xaw example
X  named xbuttonbox.  The Box widget is used to introduce the programmer to
X  a widget hierarchy.
X
X  Unlike the Shell widget a Box widget can accept more than one child.
X  By using boxes and other composites it is possible to create an
X  arbitrarily complex application with hundreds or event thousands of
X  widgets.
X
XAri.wcChildren:		box
XAri.title:		A03_Box
X
X*box.wcClassName:	Box
X*box.wcChildren:	quit, \
X			lab1, lab2, lab3, lab4, lab5, \
X			lab6, lab7, lab8, lab9, lab10
X
X*quit.wcClassName:	Command
X*quit.callback:		WcExitCB
X*Command.Label:    Click the left mouse button here to quit
X
X*lab1.wcClass:		labelWidgetClass
X*lab2.wcClass:          labelWidgetClass
X*lab3.wcClass:          labelWidgetClass
X*lab4.wcClass:          labelWidgetClass
X*lab5.wcClass:          labelWidgetClass
X*lab6.wcClass:          labelWidgetClass
X*lab7.wcClass:          labelWidgetClass
X*lab8.wcClass:          labelWidgetClass
X*lab9.wcClass:          labelWidgetClass
X*lab10.wcClass:         labelWidgetClass
!STUFFY!FUNK!
echo Extracting Doc/Wcl.PS:AD
sed >Doc/Wcl.PS:AD <<'!STUFFY!FUNK!' -e 's/X//'
X181. 561. 199. 574. R
XV
X97. 534. 111. 547. 138. 547. 138. 588. 151. 588. 151. 547. 138. 534. 7 Y
X0 X
XV
X0 H
XN
X270. 360. 13.5 13.5 137.5 547.5 G
X270. 270.1 13.5 -13.5 124. 534. A
X270. 0. -13.5 -13.5 151. 534. A
X277. 534. 264. 547. 237. 547. 237. 588. 223. 588. 223. 547. 237. 534. 7 Y
XV
XN
X180. 270. 13.5 13.5 236.5 547.5 G
X180. 180.1 13.5 13.5 223. 561. A
X180. 270. 13.5 -13.5 223. 534. A
X169. 588. 169. 534. 156. 534. 156. 588. 4 Y
XV
XN
X169. 561. 183. 547. 205. 547. 219. 561. 219. 574. 205. 588. 169. 588.
X 169. 574. 205. 574. 205. 561. 10 Y
XV
XN
X0. 90. 13.5 13.5 205.5 574.5 G
X0. 90. -13.5 13.5 219. 588. A
X270. 360. 13.5 13.5 205.5 560.5 G
X270. 270.1 13.5 -13.5 192. 547. A
X270. 0. -13.5 -13.5 219. 547. A
XFMENDPAGE
X%%Trailer
X%%Pages: 27 -1
X%%DocumentFonts: Times-Roman
X%%+ Times-Italic
X%%+ Times-Bold
X%%+ Courier
X%%+ Helvetica-Bold
X%%+ Helvetica-BoldOblique
!STUFFY!FUNK!
echo Extracting DemosMotif/UnixMB
sed >DemosMotif/UnixMB <<'!STUFFY!FUNK!' -e 's/X//'
X#!/bin/csh
X#
X# I use this simple script to fire up two xmailboxs that are used to monitor
X# the ongoing results of a simulation of the unix kernel on a model of a
X# microprocessor.  One box monitors `Passed' lines in the simulation log
X# file and the other monitors `ERROR' lines in the same log file.  The
X# log file is the "mailbox" file, instead of /usr/mail/peebles.
X#
X
X/user/peebles/x11/xmail/xmailbox \
X	-mailbox /user/peebles/AUnix/mips/TRACES/Watch.out \
X	-resources /user/peebles/x11/xmail/XMailbox.popup \
X	-xrm "*xmailbox*geometry: +734+10" \
X	-fromCmd "grep Passed" &
X
X/user/peebles/x11/xmail/xmailbox \
X	-mailbox /user/peebles/AUnix/mips/TRACES/Watch.out \
X	-resources /user/peebles/x11/xmail/XMailbox.popup \
X	-xrm "*xmailbox*geometry: +734+90" \
X	-fromCmd "grep ERROR" &
!STUFFY!FUNK!
echo Extracting DemosMotif/XMailbox.main.mdove
sed >DemosMotif/XMailbox.main.mdove <<'!STUFFY!FUNK!' -e 's/X//'
XXMailbox.mailbox:			./FakeMailBox
XXMailbox.wcResources:			./XMailbox.res
X
XXMailbox.hideNoMail:			True
XXMailbox.flash:				True
XXMailbox.flashTimeout:			100
XXMailbox.flashNumber:			4
XXMailbox.beep:				False
XXMailbox.timeout:			15
XXMailbox.nomailboxWarningMessage: 	False
X
XXMailbox*xmailbox.geometry:		365x86+720+0
XXMailbox*xmailbox*fontList:		*times-bold-i-*--12-*
XXMailbox*xmailbox*background:		Maroon
XXMailbox*xmailbox*foreground:		SpringGreen
XXMailbox*xmailbox*quit*foreground:	Yellow
XXMailbox*xmailbox*hide*foreground:	Green
XXMailbox*xmailbox*rescan*foreground:	Cyan
XXMailbox*xmailbox*clear*foreground:	MidnightBlue
X
X!XMailbox*xmailbox.includeSubject:	False
X!XMailbox*xmailbox.fromCmd:		mailfrom
!STUFFY!FUNK!
echo Extracting Mri/M12_Modal
sed >Mri/M12_Modal <<'!STUFFY!FUNK!' -e 's/X//'
XMri.WcChildren:			rc
XMri.title:			M12_Modal
X
X*rc.wcClassName:		XmRowColumn
X*rc.wcChildren:			cleanup, quit
X
X*quit.wcClassName:		XmPushButton
X*quit.activateCallback:		WcExitCB
X
X*cleanup.wcClassName:		XmPushButton
X*cleanup.wcPopups:		cuDialogShell
X*cleanup.activateCallback:	WcPopupGrabCB( *cuDialogShell)
X
X*cuDialogShell.wcClass:		transientShellWidgetClass
X*cuDialogShell.x:		100
X*cuDialogShell.y:		100
X*cuDialogShell.wcChildren:	cuDialog
X
X*cuDialog.wcClassName:		XmMessageBox
X*cuDialog.dialogType:		DIALOG_WARNING
X*cuDialog.messageString:	This will remove all backup files!
X*cuDialog.okCallback:		WcSystemCB(cleanup all) \
X				WcPopdownCB( ~ )
X*cuDialog.cancelCallback:	WcPopdownCB( ~ )
!STUFFY!FUNK!
echo Extracting Ari/A05_Menu
sed >Ari/A05_Menu <<'!STUFFY!FUNK!' -e 's/X//'
X! Example showing how to use Athena Menus
X
XAri.wcChildren:		menuButton
XAri.title:		A05_Menu
X
X*menuButton.wcClass:	menuButtonWidgetClass
X*menuButton.wcPopups:	menu
X
X*menu.wcClass:		simpleMenuWidgetClass
X*menu.wcManaged:	False
X*menu.wcChildren:	menuEntry1, menuEntry2, menuLine, \
X			menuEntry3, menuEntry4, menuEntry5
X
X*menuLine.wcClass:      smeLineObjectClass
X*menuEntry1.wcClass:    smeBSBObjectClass
X*menuEntry2.wcClass:    smeBSBObjectClass
X*menuEntry3.wcClass:    smeBSBObjectClass
X*menuEntry4.wcClass:    smeBSBObjectClass
X*menuEntry5.wcClass:    smeBSBObjectClass
X*menuEntry5.label:	quit
X*menuEntry5.callback:	WcExitCB
X
!STUFFY!FUNK!
echo Extracting test_install
sed >test_install <<'!STUFFY!FUNK!' -e 's/X//'
X# !/bin/csh
X#
X# Execute all of the programs in the Widget Creation Library
X# delivery.
X#
X
Xecho This script will execute the installed programs once at a time.
X
Xalias se setenv XENVIRONMENT
Xalias sa setenv XAPPLRESDIR
X
Xif ($#argv >= 1) then
X    set ADIR = $1
X    sa $1
Xelse
X    set ADIR = /usr/lib/X11/app-defaults
Xendif
X
Xrehash
X
X
Xif (-e `which Ari`) then
X    echo ============= Testing Ari =============
X    cd $ADIR/ari
X    foreach example (*)
X	se $example
X	Ari
X    end
Xendif
X
X
Xif (-e `which Mri`) then
X    echo ============= Testing Mri =============
X    cd $ADIR/mri
X    foreach example (*)
X	se $example
X	Mri
X    end
Xendif
!STUFFY!FUNK!
echo Extracting Ari/A04_Paned
sed >Ari/A04_Paned <<'!STUFFY!FUNK!' -e 's/X//'
XAri.wcChildren:		paned
XAri.title:		A04_Paned
X
X*paned.wcClassName:	Paned
X*paned.wcChildren:	quit, label
X
X*quit.wcClassName:	Command
X*quit.callback:		WcExitCB
X*quit.font:		*-courier-bold-r-*-240-*
X*quit.translations:	<EnterWindow>:	highlight()		\n\
X			<LeaveWindow>:	reset()			\n\
X			<Btn1Down>:	set()			\n\
X			<Btn1Up>:	notify() unset()	\n\
X			<Key>Return:	WcSetValueACT(*quit.label:Quit) \n\
X			<Key>Tab:	WcSetValueACT(*quit.label: Go)
X
X*label.wcClassName:	Label
X*label.label:		Paned, Command, & Label
X*label.font:		*lucida-bold-i-*-240-*
X*label.translations:	
!STUFFY!FUNK!
echo Extracting test_motif
sed >test_motif <<'!STUFFY!FUNK!' -e 's/X//'
X#!/bin/csh
Xalias se setenv XENVIRONMENT
Xalias sa setenv XAPPLRESDIR
X
Xcd DemosMotif
Xif (-e xmailbox) then
X    echo ============= Testing xmailbox =============
X    foreach UI (mdove beldar peeb)
X	echo ===== using XMailbox.main.$UI and XMailbox.$UI =====
X        se XMailbox.main.$UI
X        xmailbox -resources XMailbox.$UI
X    end
Xendif
Xif (-e MDmotif) then
X    echo ============= Testing MDmotif =============
X    echo	This will core dump when you close a display,
X    echo	and then try to open another display.
X    se MD
X    MDmotif
Xendif
Xcd ..
!STUFFY!FUNK!
echo Extracting Mri/Imakefile
sed >Mri/Imakefile <<'!STUFFY!FUNK!' -e 's/X//'
X#ifndef WcTopDir
X#define WcTopDir ..
X#endif
X
X#include "../Wc.tmpl"
X
XSRCS = Mri.c
XOBJS = Mri.o
X
XLOCAL_LIBRARIES = $(XMPLIB) -lXm $(WCLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
X
XAPPDEFS = M01_Hello M02_Goodbye M03_Menubar M04_DoOpt M04_OptMenu M05_Dialogs \
X          M06_ListRowCol M06_ListTable M07_TwoLists M08_Periodic M09_Multi \
X          M10_Popup M11_FSB M12_Modal
X
XComplexProgramTarget(Mri)
X
XMakeDirectories(install,$(INSTAPP)/mri)
XInstallMultipleFlags($(APPDEFS),$(INSTAPP)/mri,$(INSTAPPFLAGS))
!STUFFY!FUNK!
echo Extracting Mri/M07_TwoLists
sed >Mri/M07_TwoLists <<'!STUFFY!FUNK!' -e 's/X//'
XMri.wcChildren:		form
XMri.title:		M07_TwoLists
X
X*form.wcConstructor:	XmCreateForm
X*form.wcChildren:	one, two
X
X*one.wcConstructor:	XmCreateScrolledList
X*one.items:		Foobar, Mumble, Glorp, Reggae, Rock, and, Roll
X*one.itemCount:		7
X*one.visibleItemCount:	3
X*oneSW.leftAttachment:	ATTACH_FORM
X
X*two.wcConstructor:	XmCreateScrolledList
X*two.items:		title, Black, Blue, Coral, LimeGreen
X*two.itemCount:		5
X*two.visibleItemCount:	4
X*twoSW.leftAttachment:	ATTACH_POSITION
X*twoSW.leftPosition:	50
!STUFFY!FUNK!
echo Extracting Ari/A07_Form
sed >Ari/A07_Form <<'!STUFFY!FUNK!' -e 's/X//'
XAri.wcChildren:		form
XAri.title:		A07_Form
X
X*font:			*times-bold-i-*-140-*
X
X*form.wcClassName:	Form
X*form.wcChildren:	label, one, two, three, go
X
X*label.wcClassName:	Label
X*label.label:		Form with Buttons
X
X*one.wcClassName:	Command
X*one.fromVert:		*label
X
X*two.wcClassName:	Command
X*two.fromHoriz:		*label
X
X*three.wcClassName:	Command
X*three.fromHoriz:	*one
X*three.fromVert:	*label
X
X*go.wcClassName:	Command
X*go.fromHoriz:		*three
X*go.fromVert:		*two
X*go.callback:		WcExitCB
!STUFFY!FUNK!
echo Extracting DemosAthena/Imakefile
sed >DemosAthena/Imakefile <<'!STUFFY!FUNK!' -e 's/X//'
X#ifndef WcTopDir
X#define WcTopDir ..
X#endif
X
X#include "../Wc.tmpl"
X
X       PROGRAMS = App MDathena
X          SRCS1 = App.c
X          OBJS1 = App.o
X          SRCS2 = MDathena.c
X          OBJS2 = MDathena.o
XLOCAL_LIBRARIES = $(XPLIB) $(XAWLIB) $(WCLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
X  SYS_LIBRARIES = -lm
X
XUninstalledComplexProgramTarget_1(App,     $(LOCAL_LIBRARIES),$(SYSTEM_LIBRARIES))
XUninstalledComplexProgramTarget_2(MDathena,$(LOCAL_LIBRARIES),$(SYSTEM_LIBRARIES))
!STUFFY!FUNK!
echo Extracting Ari/Imakefile
sed >Ari/Imakefile <<'!STUFFY!FUNK!' -e 's/X//'
X#ifndef WcTopDir
X#define WcTopDir ..
X#endif
X
X#include "../Wc.tmpl"
X
XSRCS = Ari.c
XOBJS = Ari.o
X
XLOCAL_LIBRARIES = $(XPLIB) $(XAWLIB) $(WCLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
X  SYS_LIBRARIES = -lm
X
XAPPDEFS = A01_Hello A02_Scrollbar A03_Box A04_Paned A05_Menu A05_Popup \
X          A06_Dialog A07_Form A08_ClkLogo A09_Text A10_MultiWin
X
XComplexProgramTarget(Ari)
X
XMakeDirectories(install,$(INSTAPP)/ari)
XInstallMultipleFlags($(APPDEFS),$(INSTAPP)/ari,$(INSTAPPFLAGS))
!STUFFY!FUNK!
echo Extracting DemosMotif/Imakefile
sed >DemosMotif/Imakefile <<'!STUFFY!FUNK!' -e 's/X//'
X#ifndef WcTopDir
X#define WcTopDir ..
X#endif
X
X#include "../Wc.tmpl"
X
X       PROGRAMS = MDmotif xmailbox
X          SRCS1 = MDmotif.c
X          OBJS1 = MDmotif.o
X          SRCS2 = xmailbox.c
X          OBJS2 = xmailbox.o
XLOCAL_LIBRARIES = $(XMPLIB) -lXm $(WCLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
X
XUninstalledComplexProgramTarget_1(MDmotif,$(LOCAL_LIBRARIES),)
XUninstalledComplexProgramTarget_2(xmailbox,$(LOCAL_LIBRARIES),)
!STUFFY!FUNK!
echo Extracting Doc/VG5.PS:AH
sed >Doc/VG5.PS:AH <<'!STUFFY!FUNK!' -e 's/X//'
XD49414941494149414941494149414941494149414941494149414941494149414941495E5
XD000400040004000400040004000400040004000400040004000400040004000400040013z"
XC11165
XD0088008800880088008800880088008800880088008800880088008800880088008800A7
XENDBITMAP
X
X%%EndBinary
XFMENDPAGE
X%%Trailer
X%%Pages: 16 -1
X%%DocumentFonts: Times-Roman
X%%+ Helvetica-Oblique
X%%+ Helvetica
X%%+ Times-Bold
X%%+ Times-Italic
X%%+ Helvetica-Bold
!STUFFY!FUNK!
echo Extracting Ari/A09_Text
sed >Ari/A09_Text <<'!STUFFY!FUNK!' -e 's/X//'
XAri.wcChildren:			paned
XAri.title:			A09_Text
X
X*paned.wcClassName:		Paned
X*paned.wcChildren:		quit, textFile
X
X*quit.wcClassName:		Command
X*quit.callback:			WcExitCB
X
X*textFile.wcClassName:		AsciiText
X*textFile*type:			file
X*textFile*string:		/etc/motd
X*textFile.scrollVertical:	whenNeeded
X*textFile.scrollHorizontal:	whenNeeded
X*textFile.height:		100
X*textFile*font:			*clean-medium-r-*-150-*
!STUFFY!FUNK!
echo Extracting Ari/A08_ClkLogo
sed >Ari/A08_ClkLogo <<'!STUFFY!FUNK!' -e 's/X//'
XAri.wcChildren:		box
XAri.title:		A08_ClkLogo
X
X*box.wcClassName:	Box
X*box.wcChildren:	clock, logo, label
X*box.translations:	<Key>Return:	WcExitACT() \n\
X			<Key>Tab:	WcSystemACT( echo Yo Dude! ) \n\
X			<Key>Delete:	WcSystemACT( Ari & )
X
X*clock.wcClassName:	ClockWidget
X
X*logo.wcClassName:	LogoWidget
X
X*label.wcClassName:	Label
X*label.label:		Try hitting Delete, Tab, and Return
!STUFFY!FUNK!
echo Extracting Mri/M04_DoOpt
sed >Mri/M04_DoOpt <<'!STUFFY!FUNK!' -e 's/X//'
XMri.wcPopups:		doMenu
XMri.wcChildren:		doOption
XMri.title:		M04_DoOpt
X
X*doMenu.wcConstructor:	XmCreatePulldownMenu
X*doMenu.wcChildren:	DoYou, BoKnowsIt, justDoIt
X
X*DoYou.wcClassName:	XmPushButton
X*BoKnowsIt.wcClassName:	XmPushButton
X*justDoIt.wcClassName:	XmPushButton
X
X*doOption.wcConstructor:	XmCreateOptionMenu
X*doOption.labelString:		Do It
X*doOption.subMenuId:		*doMenu
X
!STUFFY!FUNK!
echo Extracting Ari/A06_Dialog
sed >Ari/A06_Dialog <<'!STUFFY!FUNK!' -e 's/X//'
XAri.wcChildren:		dialog
XAri.title:		A06_Dialog
X
X*dialog.wcClassName:	Dialog
X*dialog.wcChildren:	ok
X*dialog*Font:		*times-bold-i-*-80-*
X
X*dialog.label:		I am a Dialog widget.
X*dialog.label.font:	*new century schoolbook-bold-r-*-140-*
X
X*dialog.value:		Enter new value here.
X
X*ok.wcClassName:	Command
X*ok.callback:		WcExitCB
!STUFFY!FUNK!
echo Extracting Ari/A01_Hello
sed >Ari/A01_Hello <<'!STUFFY!FUNK!' -e 's/X//'
X  This resource file represents a very basic application: a single
X  button which, when pressed, causes the application to exit.
X
XAri.wcChildren:		command
XAri.title:		A01_Hello
X
X*command.wcClass:	commandWidgetClass
X*command.Label:		Click the left mouse button here
X*command.callback:	WcExitCB
!STUFFY!FUNK!
echo Extracting test_athena
sed >test_athena <<'!STUFFY!FUNK!' -e 's/X//'
X#!/bin/csh
Xalias se setenv XENVIRONMENT
Xalias sa setenv XAPPLRESDIR
X
Xcd DemosAthena
Xif (-e App) then
X    echo ============= Testing App =============
X    se App1.All
X    App
Xendif
Xif (-e MDathena) then
X    echo ============= Testing MDathena =============
X    se MD
X    MDathena
Xendif
Xcd ..
!STUFFY!FUNK!
echo Extracting Mri/M01_Hello
sed >Mri/M01_Hello <<'!STUFFY!FUNK!' -e 's/X//'
X  This resource file represents a very basic application: a single
X  button which, when pressed, causes the application to exit.
X
XMri.wcChildren:		push
XMri.title:		M01_Hello
X
X*push.wcClass:		xmPushButtonWidgetClass
X*push.labelString:	Hello World
X*push.activateCallback:	WcExitCB
!STUFFY!FUNK!
echo Extracting test
sed >test <<'!STUFFY!FUNK!' -e 's/X//'
X# !/bin/csh
Xalias se setenv XENVIRONMENT
Xalias sa setenv XAPPLRESDIR
X
X#
X# Execute all of the programs in the Widget Creation Library
X# delivery.
X#
X
Xecho This script will execute the programs once at a time.
X
Xtest_ari
Xtest_athena
Xtest_mri
Xtest_motif
!STUFFY!FUNK!
echo Extracting test_ari
sed >test_ari <<'!STUFFY!FUNK!' -e 's/X//'
X#!/bin/csh
Xalias se setenv XENVIRONMENT
Xalias sa setenv XAPPLRESDIR
X
Xcd Ari
Xif (-e Ari) then
X    echo ============= Testing Ari =============
X    foreach example (A[0-9][0-9]_*)
X	se $example
X	Ari
X    end
Xendif
Xcd ..
!STUFFY!FUNK!
echo " "
echo "End of kit 35 (of 35)"
cat /dev/null >kit35isdone
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 Heller
------------------------------------------------
O'Reilly && Associates 		      Zyrcom Inc
Senior Writer			       President
argv@ora.com			argv@zipcode.com