🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #1738

Re: GEM/AES/VDI 'C' Sample Code Needed!!

#1738
From: Mark O'Bryan
Date: Thu, 15 Jun 1989 16:19
35 lines
2332 bytes
In article <43b0b64c.14a1f@gtephx.UUCP>, covertr@gtephx.UUCP (Richard E. Covert) writes:
> 
> 	As an example of where I am stuck I want to display a bar that fills
> from left to right as I process data. The bar can be in a blank screen of its
> own, but it would be nice to have a text displayed with it.
> 
> 	Now, would I use a RSC editor to create the dialog box with the bar and
> the text?? If so, how do I create it with the above RSC editors?? I see that

Doing "gauges" is pretty easy, once you know how.  To start off, you make
your dialog box by dragging out a "box" type and setting it to a 2-pixel
border with the "outline" attribute turned on.  Stretch it so it's big enuf
to hold all the stuff you want inside.  For your labels, drag down a STRING
object (unless you want to get fancy with sizes or colors, then you need a
TEXT object), then click on it and edit it to say what you want.

For the gauge itself, you'll need two nested boxes.  Drag out one "box"
object and make it the size and shape you want for the full gauge.  Pick
the fill color/pattern to correspond to whatever you want for "empty".
Then grab another "box" and drop it inside of the first one.  Slide it
up until it's flush with the upper left corner of the container, then
resize it until it's as tall as the container and maybe half as wide.
Set the fill color/pattern to contrast and indicate "full".  Give this
box a name, like "bar" maybe.  Then you can access the width field of
the bar object, initially making it 0, and increasing it (and doing a
ReDraw) as the bar widens.

You'll also want to access the width field of the containing "gauge"
object, to see what the maximum width should be, and so you can grow
your bar at the proper proportional rate.

-- 
Mark T. O'Bryan                 Internet:  obryan@gumby.cc.wmich.edu
Western Michigan University
Kalamazoo, MI  49008
Technical Details
Message-ID: <772@gumby.cc.wmich.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!gumby!obryan
References: <43b0b64c.14a1f@gtephx.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!gumby!obryan
From: obryan@gumby.cc.wmich.edu (Mark O'Bryan)
Newsgroups: comp.sys.atari.st,comp.lang.c
Subject: Re: GEM/AES/VDI 'C' Sample Code Needed!!
Keywords: c,aes,vdi,atari st
Message-ID: <772@gumby.cc.wmich.edu>
Date: 15 Jun 89 16:19:48 GMT
References: <43b0b64c.14a1f@gtephx.UUCP>
Organization: Western Michigan University, Kalamazoo, MI
Lines: 35