#! /usr/NeWS/bin/psh
%
% This file is a product of Sun Microsystems, Inc. and is provided for
% unrestricted use provided that this legend is included on all tape
% media and as a part of the software program in whole or part.  Users
% may copy or modify this file without charge, but are not authorized to
% license or distribute it to anyone else except as part of a product
% or program developed by the user.
% 
% THIS FILE IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
% WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
% PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
% 
% This file is provided with no support and without any obligation on the
% part of Sun Microsystems, Inc. to assist in its use, correction,
% modification or enhancement.
% 
% SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
% INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS FILE
% OR ANY PART THEREOF.
% 
% In no event will Sun Microsystems, Inc. be liable for any lost revenue
% or profits or other special, indirect and consequential damages, even
% if Sun has been advised of the possibility of such damages.
% 
% Sun Microsystems, Inc.
% 2550 Garcia Avenue
% Mountain View, California  94043
%
%
% @(#)catalyst 9.2 88/01/18
%
% Copyright (c) 1985 by Sun Microsystems, Inc.
%

/newshomepath (NEWSHOME) getenv def

/imagedirectory (/smi/) def

/catalystdirectory (Catalyst/) def

/imagedict 20 dict def
imagedict begin
	/Add-On_Hardware			(Hardware) def
	/Architectural_and_Civil_Engineering	(Arch_Civil_Eng) def
	/Artificial_Intelligence		(AI) def
	/Biological_and_Physical_Sciences	(Sciences) def
	/Communications				(Communications) def
	/Data_Base_Management_Systems		(Data_Base) def
	/Earth_Resource_Engineering		(Earth_Resource) def
	/Electrical_Engineering			(Electrical_Eng) def
	/Graphics				(Graphics) def
	/Manufacturing				(Manufacturing) def
	/Mathematics_and_Statistics		(Math_Stat) def
	/Mechanical_Engineering			(Mech_Eng) def
	/Office_Automation			(Office_Auto) def
	/Project_Management			(Proj_Manage) def
	/Software_Engineering			(Software_Eng) def
	/Miscellaneous				(Miscellaneous) def
end


/sunlogotype {
	 0 0 0 PaintPicture
	 (Catalyst)
	 (3rd Party Catalog.)
	PaintMessage
	} def
/Hardware {
	 1.03 .1 90 PaintPicture
	 (Add-On Hardware)
	 ()
	PaintMessage} def
/Arch_Civil_Eng {
	 1.07 .065 90 PaintPicture
	 (Architectural CAE)
	 ()
	PaintMessage} def
/AI {
	.1 -.12 0 PaintPicture
	(Artificial Intelligence)
	()
	PaintMessage} def
/Sciences {
	1 0 90 PaintPicture
	(Biological Sciences)
	()
	PaintMessage} def
/Communications {
	.05 0 0 PaintPicture
	(Communications)
	()
	PaintMessage} def
/Data_Base {
	.94 0 90 PaintPicture
	(DBMS)
	()
	PaintMessage} def
/Earth_Resource {
	1 -.08 90 PaintPicture
	(Earth Engineerng)
	()
	PaintMessage} def
/Electrical_Eng {
	0 0 0 PaintPicture
	(Electrical Engineering)
	()
	PaintMessage} def
/Graphics {
	1 -.08 90 PaintPicture
	(Graphics)
	()
	PaintMessage} def
/Manufacturing {
	.94 .05 90 PaintPicture
	(Manufacturing)
	()
	PaintMessage} def
/Math_Stat {
	.13 -.1 0 PaintPicture
	(Math and Statistics)
	()
	PaintMessage} def
/Mech_Eng {
	.07 0 0 PaintPicture
	(Mechanical CAE)
	()
	PaintMessage} def
/Office_Auto {
	1.25 .07 90 PaintPicture
	(Office Automation)
	()
	PaintMessage} def
/Proj_Manage {
	.12 0 0 PaintPicture
	(Project Management)
	()
	PaintMessage} def
/Software_Eng {
	1 -.08 90 PaintPicture
	(Software Engineering)
	()
	PaintMessage} def
/Miscellaneous {
	.07 0 0 PaintPicture
	(Miscellaneous)
	()
	PaintMessage} def

/bigfont { /Times-Roman findfont .1 scalefont setfont } def
/smallfont { /Times-BoldItalic findfont .05 scalefont setfont } def
/purple {monochromecanvas {.5 .5 .5} {1 .8 1} ifelse setrgbcolor} def
/red {1 .5 .5 setrgbcolor} def
/cyan {0 1 1 setrgbcolor} def
/gray {.6 .6 .8 setrgbcolor} def
/PaintPicture {
	/rotation exch def
	/ypos exch def
	/xpos exch def
	currentcanvas 1 fillcanvas
	clippath pathbbox
	scale pop pop
	gsave xpos ypos translate rotation rotate
	0 0 moveto pause theimage imagecanvas
	grestore
	} def

/PaintMessage {
	/message exch def
	/title exch def
	clippath pathbbox scale pop pop
	gsave purple .09 .02 .015 Sunlogo grestore pause
	bigfont gray .05 .05 moveto title show pause
	bigfont red .0525 .0525 moveto title show pause
	smallfont gray .5 .9 moveto message show pause
	} def

 /CatalystWindow {
	/thepicture (AI) def
	/theimage  newshomepath imagedirectory catalystdirectory thepicture
		append append append readcanvas def

	/catalystmenu [
		(Add-On_Hardware) (Architectural_and_Civil_Engineering)
		(Artificial_Intelligence) (Biological_and_Physical_Sciences)
		(Communications) (Data_Base_Management_Systems)
		(Earth_Resource_Engineering) (Electrical_Engineering)
		(Graphics) (Manufacturing) (Mathematics_and_Statistics)
		(Mechanical_Engineering) (Office_Automation)
		(Project_Management) (Software_Engineering)
		(Miscellaneous) ]
		[ 
		  {/thepicture
			imagedict /currentkey self send cvn get store
		   /theimage  newshomepath imagedirectory catalystdirectory
			thepicture append append append readcanvas store
		   /paintclient thewindow send
		  }
	]
	/new DefaultMenu send def

	/thewindow framebuffer /new DefaultWindow send def
	{
		/FrameLabel (Catalyst) def	
		/PaintClient { thepicture cvn cvx exec } def
		/PaintIcon {
			.9 fillcanvas
			0 strokecanvas purple 7 -21 8 Sunlogo
			red FrameFont setfont 2 10 moveto (Catalyst) show
		} def
		/ClientMenu catalystmenu def
	} thewindow send


%    /catalysteventmgr
%	[   MenuButton {catalystmenu showmenu}
%	    DownTransition thewindow /ClientCanvas get
%	    eventmgrinterest
%	] forkeventmgr def
%    catalysteventmgr

	/reshapefromuser thewindow send
	/map thewindow send
    } def

CatalystWindow
