Skip to main content
Home Browse Development Canimcursor 10b4 C
Canimcursor 10b4 C
Canimcursor 10b4 C icon

Canimcursor 10b4 C

Development · info-mac
Filenamecanimcursor-10b4-c.hqx
Size33.5 KB (34329 bytes)
Downloads2
About
This Compact Pro archive contains the source code for CAnimCursor, a public domain Think C 5 class that provides easy, flexible handling of animated cursors. The Think Class Library is not required. This is the fourth beta. (It's quite stable and hasn't crashed in months, but I'm still calling it beta because of a minor anomaly which I haven't resolved yet.) CAnimCursor uses an 'acur' resource to determine which cursors to display; the animation speed and a few other variables are changed by method calls. Both color and B&W are supported. The interface can be as simple as initializing the object with the resource ID of your 'acur', and calling startAnimating() and stopAnimating() at the appropriate times. CAnimCursor's best feature is that it is very good about doing the Right Thing (tm). For example, if your 'acur' points to color cursors and the Mac is B&W, it will pull the B&W bitmaps out of the 'crsr's. If you call startAnimating() twice, the second call will have no effect. And so on. CAnimCursor will not call SetCCursor at interrupt time, since that trap relies on the heap being good, and will fail if the interrupt occurs during a memory manager reorganization. This does not happen often, but one crash is one too many. Also included are CQixableCursor, a subclass which optionally draws a little 'Qix' over your cursors; subclasses of three TCL core classes which will prevent the cursor from being reset each time through the event loop; a short sample subclass; and four sample cursors, including a smooth beachball and a color spinning earth. (I stole the earth from Stefan Bilaniuk's free extension "Earth," also at sumex-aim. I feel no guilt because I guess he stole it from someone else ;-), and because I colorized all 26 frames by hand, phew!) Extensive (indeed, ponderous) comments explain proper usage, and there are even one or two comments in the code itself. Plus, it comes with a toll-free technical support number, which I figure is a pretty good deal for something in the public domain, eh?
File Info

This file is from the info-mac archive. It is BinHex encoded — use The Unarchiver to decode it.

MacTrove — a free archive of classic Macintosh software. Files mirrored from ftp.funet.fi/pub/mac (info-mac + funet legacy). All software provided for historical preservation.