This is GraphicView.h in view mode; [Download] [Up]
/* GraphicView.h -- front end to an intelligent bitmap environment designed * for bitmap oriented computer graphics (15-462). * * Written By: Bill Bumgarner (Friday Software & Consulting) * <wb1j+@andrew.cmu.edu> * 414 S.Craig, #119 * Pittsburgh, PA. 15213 * 412-268-5378 * * You are free to use, abuse, and distribute this source code in any * form under the following conditions: * - The author makes no gurantee as to the validity, stability, or * correctedness of the contained code. * - You send any neat code additions to the above email address * (I'm not looking for any of the basic stuff-- I just want neat * designs, cool images, and other such stuff that falls in the realm * of extraordinary). And if you can't send the code, for whatever reason, * send a description of the project. (If it is interesting to me, I * am quite willing to offer my assistance-- whether it be beta * testing or just answering questions). * - Either the info panel stays as is or else it contains the message: * "Built on GraphicsWrapper by bbum". Not an ego thing-- I just * want to have an idea of who is using this for what. * * If you have any questions about the code (or anything else), email * them to the above address and I will try to be as helpful as possible. */ #import <appkit/View.h> @interface GraphicView:View { id bitmap; // pointer to the NXBitmapGraphicRep object id foreWell; // NXColorWell containing the current foreground color id backWell; // NXColorWell containing the current background color id foreSlide; // Slider that contains the gray value of the foreground id backSlide; // Slider that contains the gray value of the background id infoPanel; // id of the infoPanel object id toolPanel; id toolBtn; id toolStatus; } // initializes the view and allocates/initializes the bitmap object - initFrame:(NXRect *) aRect; // performs application initilization stuff - appDidInit:sender; - infoPanel:sender; // redraws bitmap (recomposites it to the screen). No region optimization - drawSelf:(const NXRect *)rects :(int)rectCount; // draws some points in diagonal lines (bogus line drawing routine) - draw:sender; // erase image to the current background color - eraseImage:sender; // Look in InterfaceBuilder for the connection to these methods. // received when a colorwell changes color - foreWell:sender; - backWell:sender; // received when a slider changes value - setFore:sender; - setBack:sender; // polygron drawing control methods - startStopPolyDraw:sender; // save/open stuff - saveCommands:sender; - openCommands:sender; - newCommands:sender; // toolHit stuff - toolHit:sender; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.