home *** CD-ROM | disk | FTP | other *** search
- /* NAME:
- ** IconView:View
- **
- ** COPYRIGHT 1992, BY PLEXUS SOFTWARE
- ** ALL RIGHTS RESERVED.
- **
- ** SOURCE:
- ** IconView.m
- ** By Jayson Adams, NeXT Developer Support Team
- **
- ** REVISION HISTORY:
- ** 92/04/16 Mark Onyschuk starting point
- **
- ** DESCRIPTION:
- */
-
-
- #import <sys/param.h>
- #import <appkit/View.h>
-
-
- @interface IconView:View
- {
- id myImage;
- id myListener;
-
- id delegate;
-
- char *filePath;
- }
-
-
- /* CONSTRUCTOR, DESTRUCTOR **********************************************/
-
-
- - initFrame:(const NXRect *)frameRect;
- - free;
-
-
- /* ACTION METHODS ********************************************************/
-
-
- - (BOOL)acceptsFirstMouse; /* receiver accepts mouse-down */
- /* events */
-
- - setDelegate:anObject; /* sets the receiver's delegate */
- /* to <anObject>. */
-
- - delegate; /* returns the receiver's */
- /* delegate. */
-
- - beginListening; /* instructs the receiver to */
- /* initialize its Listener */
-
- - setFilename:(const char *)filename /* sets the receiver's filename */
- andRedraw:(BOOL)redraw; /* and redraws if directed */
-
- - (const char *)filename; /* returns the filename[s] */
- /* associated with the reciever */
-
- - clear; /* clears and redraws the */
- /* receiver */
-
-
- /* PRIVATE METHODS ******************************************************/
-
-
- - takeIconFromWindow :(int)windowNumber
-
- :(float)x :(float)y
-
- :(float)width
- :(float)height;
-
-
- - mouseDown :(NXEvent*)theEvent;
-
-
- - drawSelf :(NXRect*)rects
- :(int)rectCount;
-
-
- /* LISTENER DELEGATE METHODS ********************************************/
-
-
- - (int)iconEntered:(int)windowNum
-
- at:(double)x
- :(double)y
-
- iconWindow:(int)iconWindowNum
-
- iconX:(double)iconX
- iconY:(double)iconY
- iconWidth:(double)iconWidth
- iconHeight:(double)iconHeight
-
- pathList:(char *)pathList;
-
- - (int)iconReleasedAt:(double)x
- :(double)y
-
- ok:(int*)flag;
-
- @end
-
-
- @interface DummyIconViewDelegate : Object
-
- - (int)willAcceptIcon:sender ok:(int*)flag;
-
- @end
-