[comp.sys.apple2] Curses and the IIGS

avery@netcom.COM (Avery Colter) (02/23/91)

Well, I just printed out the whole man page for curses.

And it would seem that it would be best to have two versions for the IIGS.
One for text mode and one for desktop.

Curses would definitely be something that could work well on the desktop though.

I say this because curses is based on WINDOWS!

It's almost a smaller, not quite so comprehensive version of the
Toolbox's Window Manager and the other toolsets the WM uses.

lucifer@world.std.com (Kevin S Green) (02/24/91)

In article <25293@netcom.COM> avery@netcom.COM (Avery Colter) writes:
>Well, I just printed out the whole man page for curses.
>
>And it would seem that it would be best to have two versions for the IIGS.
>One for text mode and one for desktop.

I've been watching this thread about curses for the //gs for
some time now and had a thought. Is there a curses version for
the Mac? If so, and if the source code is available, wouldn't
it be fairly easy to just port that version rather than putting
a curses lib together from scratch? After all, a lot of Mac
toolbox calls, etc are similar to //gs calls. That should 
simplify matters a little.



-- 
Kevin S. Green / lucifer@world.std.com / {xylogics;uunet}!world!lucifer
Party naked... /AOL: Gargoth / Pro-line: kgreen@pro-angmar

unknown@ucscb.UCSC.EDU (The Unknown User) (02/25/91)

In article <25293@netcom.COM> avery@netcom.COM (Avery Colter) writes:
>And it would seem that it would be best to have two versions for the IIGS.
>One for text mode and one for desktop.

	At first I was going to say that it seemed bogus to think about a 
desktop version of curses (adding a statement saying I'd probably be
proved wrong quickly)..

	But after thinking about it, it seems reasonable... at least if my
little knowledge of the ToolBox allows me to think about the scope of
such a project properly.. I can't find my copy of the ToolBox Manual 2 at
the moment (BINGO.. the cover is off of it so it's not white.. behind
me on the table..under my dust-covered box of unused 5.25" disks)...

	It seems to me that a desktop-based curses would only be 
important for programs that used only text in the window anyhow...

	So, as far as the cursor-moving capabilities, they would be easy...
Simply translate a curses call to a MoveTo, or more appropriately, a Move
call... (since Move already uses displacements, it already allows up/down/
sideways movement).. Mainly I had to get my ToolBox manual out so I wasn't
confusing the MoveTo with a call that we use on our graphics machines at 
school.. (386s with an Imagraf card that's actually kinda neat.. comes with
a bunch of tools that are very similar to the GS/Mac/probably_every_other_
computer's toolbox)

	Are any of my ramblings about Move correct in terms of a curses
port?!

>Curses would definitely be something that could work well on the desktop though.
>I say this because curses is based on WINDOWS!

	This I do have something to correct you on... I am virtually positive
you are reading the word "windows" and misconstruing it. I believe curses
is based on the UNIX program "window".. (I typed it when I first saw your
post and it indeed is a program for making a bunch of 'windows' when you're
on a terminal connected to a UNIX host.

	I would also guess curses is much older than the Microsoft Windows
you're talking about... {Did you hear that Bill Gates built his new mansion
with no glass in it??	He didn't want to spend any more money on windows..
BA DUM PISH! (say it out loud)}
-- 
/Apple II(GS) Forever! unknown@ucscb.ucsc.edu MAIL ME FOR INFO ABOUT CHEAP CDs\
\WRITE TO ORIGIN ABOUT ULTIMA VI //e and IIGS! Mail me for addresses, & info. / 

fadden@cory.Berkeley.EDU (Andy McFadden) (02/26/91)

In article <12768@darkstar.ucsc.edu> unknown@ucscb.UCSC.EDU (The Unknown User) writes:
>	It seems to me that a desktop-based curses would only be 
>important for programs that used only text in the window anyhow...

If you aren't porting a program already written using curses, using it
to develop a desktop-based program is probably silly, since the functionality
is built into the toolbox already.  For text-based programs it might be
useful.

Most people running Rogue, Moria, Larn, Hack, or whatever on a machine
with X windows change the font to something more interesting (so that walls
look like walls instead of '#' or whatever).  Same applies to the //gs.
Nice way to spruce up a program without changing the original code.

Curses allows you to create subwindows, which could be made with "real"
//gs windows instead of performing complicated overlaying in memory (well,
it's not THAT complicated, but it's one piece of code which could be
omitted from a desktop library).

>	So, as far as the cursor-moving capabilities, they would be easy...
>Simply translate a curses call to a MoveTo, or more appropriately, a Move
[snip]
>	Are any of my ramblings about Move correct in terms of a curses
>port?!

If you like.

As always, there are plenty of other ways to go about it.  And it's hardly
the most challenging part :-( .

>>Curses would definitely be something that could work well on the desktop though.
>>I say this because curses is based on WINDOWS!
>
>	This I do have something to correct you on... I am virtually positive
>you are reading the word "windows" and misconstruing it.

(likewise, I'm sure)

>                                                         I believe curses
>is based on the UNIX program "window".. (I typed it when I first saw your
>post and it indeed is a program for making a bunch of 'windows' when you're
>on a terminal connected to a UNIX host.

What?!?

Curses is based on the UNIX program "vi", NOT "window".  In fact, it's fairly
safe to guess that "window" uses curses...  For people without "window" on
their system, try to picture Jove or Emacs in split-screen mode, with a shell
in every window.

>	I would also guess curses is much older than the Microsoft Windows
>you're talking about... {Did you hear that Bill Gates built his new mansion

True.  But I think you missed the point.

>/Apple II(GS) Forever! unknown@ucscb.ucsc.edu MAIL ME FOR INFO ABOUT CHEAP CDs\

Incidentally, A/UX has a curses library.  I don't think the source would be
of much use, however.  The IBM or Amiga curses lib would probably be better.

-- 
fadden@cory.berkeley.edu (Andy McFadden)
..!ucbvax!cory!fadden
fadden@hermes.berkeley.edu (when cory throws up)