Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!mcsun!corton!imag!gourdol From: gourdol@imag.imag.fr (Gourdol Arnaud) Newsgroups: comp.sys.mac.programmer Subject: Re: Progress indicator/thermometers Message-ID: <22235@imag.imag.fr> Date: 5 Jun 91 11:36:59 GMT References: <25104@unix.SRI.COM> Organization: IMAG Institute, University of Grenoble, France Lines: 42 In article <25104@unix.SRI.COM> mxmora@unix.sri.com (Matthew Xavier Mora) writes: >In the new finder, apple has included a color progress indicator. How is >this done? Is is a CDEF? Where do I get the colors to use? Yet another of these things Apple should made standard and include in the ROM. Alas. Try also to have the same outline than the one used in the Finder. The Finder does not use a dialog box but a window (which is clever). So you can pick the layout with ResEdit. However, doing a screen shot will do the trick. Anyway, the gray used is (r,g,b) = (17408)^3 and the blue is (r,g,b) = (52224,52224,65535). Here is a short Pascal asm routine to convert from 3 longs to a RGBColor : procedure MakeRGBColor (red, green, blue: Longint; var aRGBColor: RGBColor); inline $2057, { move.l 4(a7),a0 } $30AF, 14, { move.w 14(a7),(a0) } $316F, 10, 2, { move.w 10(a7),2(a0) } $316F, 6, 4, { move.w 6(a7),4(a0) } $4FEF, 16; { lea 16(sp),sp } I also have a nice Object Pascal class TProgress that does all the work, including drawing the window after a given threshold, drawing it semi-modal, allowing application switching, working in b&w and color, etc... I can't post it now because I am on a sssslllllloooooowwwww 1200bps terminal, but as soon as I get close to something speedier, I'll post it (if there is any interest). Arno. -- /=============================//===================================/ / Arno Gourdol. // On the Netland: Gourdol@imag.fr / / "A keyboard ! How quaint !" -- Scott, Star Trek / /=============================//===================================/