[comp.sys.mac.programmer] GKS on MAC II

jezebel@ut-emx.UUCP (Jim Saint) (02/24/88)

Does the MAC-II support GKS ?
Thanks
Jim

jnh@ece-csc.UUCP (Joseph Nathan Hall) (02/25/88)

*** EAT THIS ***

In article <943@ut-emx.UUCP> jezebel@ut-emx.UUCP (Jim Saint) writes:
>Does the MAC-II support GKS ?
>Thanks
>Jim

(See summary line, above.)

I've been using GKS on a VAXstation GPX for almost a year now.  The worst
niggling-type problem with GKS under VMS is that GKS is really designed to
run under FORTRAN (that's right) and so all the "C" calls are by reference
(uggh) and many of the string paramegers use descriptors (double uggh).

Aside from that, GKS is basically bloated, illogical and inefficient and I
can't understand why anyone would want to use GKS on a Mac instead of
QuickDraw.

You might want, I suppose, to port an existing GKS application from a
Sun or VAXstation to a Mac.  Good luck.  The only standardized binding is
for FORTRAN.  (Can you imagine writing in a non-stack-based environment on
a Mac???)  So whatever happens you're going to spend some time changing all
the calls to, say, gks$clear_ws() (on VMS) to ClearWs or something like that
on your Mac.  I'm sure the parameters are in a different order, too.

GKS is not device-independent in an intelligent way, either.  Basically you
have to write code to support each individual device.  Some devices support
multiple windows, some don't--you write differently for each.  Some are
monochrome, some are color.  Text is different sizes.  Markers are different
sizes.  Et cetera.

The worst part of the GKS interface is its rather carelessly designed I/O.
Under VMS the only way to input a string is to:

	0) Before you do anything with any of the input devices you
	   have to call a routine to get the device coordinates, if you
	   want to place your echo area (where the window will be) in
	   a particular spot.  The echo area is defined in terms of
	   device coordinates.

	1) Call gks$init_string to set up a window for the string input.
	   This may include a title for the window, but there are problems
	   (VMS-specific) with this, and it only works on the VAXstation.
	   This means, basically, YOU CAN'T PROMPT for string input under
	   the letter of the GKS standard.  Any prompting is implementation-
	   specific.

	2) Call gks$request_string to get the string.  You can't specify
	   the SIZE or FONT of the type inside the input window.  You can't
	   input more than one line (nothing like TextEdit).  Basically you
	   can't do much more than take a few ugly-looking characters worth
	   of input using the GKS string input routines . . . .

I could list annoying "features" until my fingers fall off.  I've been writing
a user interface for a network analysis CAD tool and certainly having to deal
with GKS has been the most difficult part of this project (unfortunately we're
stuck with it).

I would kill to be able to wad up all these GKS hacks and write a nice, clean
Mac interface.

GKS?

Yuck.

	-joseph

/*
 * What, me worry?
 *
 * These are my opinions.  I'm sure everybody else agrees with me, but,
 * you know.
 */

*** EAT THIS ***