jess@gn.ecn.purdue.edu (Jess M Holle) (06/14/91)
I am attempting to write a pop-up calculator (small application rather than a DA, in the spirit of System 7.0). I am still doing some preliminary thinking about how I'm going to implement it. This thinking has turned up several questions, which I would really appreciate answers to. 1) I have a drawing (PICT, at the moment) of the calculator, as I would like it to look in its normal state (with no buttons pressed). Is there any way that I could store this as a black and white bitmap within my program and do something simple like a copybits to draw it in my application window? I would like to be able to just copy portions from this bitmap to fill any invalid regions whenever I get an update event (or is the necessary work slower probably slower than just redrawing the whole window?). Alternatively, what do I need to do to take this PICT and store it in my program and redraw my window from it? 2) I am presently considering just checking each mouse click in my event loop to see whether it is in each key (a simple rectangle), then inverting the rectangle, doing what calculations and all that need to be done for the keys function, then re-inverting the key. Are there any better ways to do this? Any general comments are much appreciated as well. Note that I want this to be a fairly small program (in terms of disk and RAM usage). I also want this program to run on the at least most Macs and in color or black and white modes (I only need the calculator in black and white, however). If I ever do get this program working well, I'll post it to sumex, etc. Jess Holle
jess@gn.ecn.purdue.edu (Jess M Holle) (06/14/91)
I just saw my post appear and noticed that I'd left the subject as "stuff". Sorry about that. I feel extremely silly. I called it that at first, because I hadn't decided on a title, and then I forgot to change it before posting it. Jess Holle