home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / SourceCode / Classes / IconView / IconView.h next >
Text File  |  1992-04-19  |  2KB  |  113 lines

  1. /* NAME:
  2. **    IconView:View
  3. **
  4. **     COPYRIGHT 1992, BY PLEXUS SOFTWARE
  5. **    ALL RIGHTS RESERVED.
  6. **
  7. ** SOURCE:
  8. **    IconView.m
  9. **     By Jayson Adams, NeXT Developer Support Team
  10. **
  11. ** REVISION HISTORY:
  12. **    92/04/16    Mark Onyschuk    starting point
  13. **
  14. ** DESCRIPTION:
  15. */
  16.  
  17.  
  18. #import <sys/param.h>
  19. #import <appkit/View.h>
  20.  
  21.  
  22. @interface IconView:View
  23. {
  24.     id        myImage;
  25.     id        myListener;
  26.     
  27.     id        delegate;
  28.     
  29.     char    *filePath;
  30. }
  31.  
  32.  
  33. /* CONSTRUCTOR, DESTRUCTOR **********************************************/
  34.  
  35.  
  36. - initFrame:(const NXRect *)frameRect;
  37. - free;
  38.  
  39.  
  40. /* ACTION METHODS ********************************************************/
  41.  
  42.  
  43. - (BOOL)acceptsFirstMouse;        /* receiver accepts mouse-down    */
  44.                     /* events            */
  45.  
  46. - setDelegate:anObject;            /* sets the receiver's delegate    */
  47.                     /* to <anObject>.        */
  48.  
  49. - delegate;                /* returns the receiver's    */
  50.                     /* delegate.            */
  51.                     
  52. - beginListening;            /* instructs the receiver to    */
  53.                     /* initialize its Listener    */
  54.                     
  55. - setFilename:(const char *)filename    /* sets the receiver's filename    */
  56.     andRedraw:(BOOL)redraw;        /* and redraws if directed    */
  57.  
  58. - (const char *)filename;        /* returns the filename[s]    */
  59.                       /* associated with the reciever    */
  60.                     
  61. - clear;                /* clears and redraws the    */
  62.                     /* receiver            */
  63.  
  64.  
  65. /* PRIVATE METHODS ******************************************************/
  66.  
  67.  
  68. - takeIconFromWindow :(int)windowNumber 
  69.  
  70.                      :(float)x :(float)y
  71.  
  72.                      :(float)width
  73.                  :(float)height;
  74.  
  75.  
  76. - mouseDown         :(NXEvent*)theEvent;
  77.  
  78.  
  79. - drawSelf           :(NXRect*)rects
  80.              :(int)rectCount;
  81.             
  82.  
  83. /* LISTENER DELEGATE METHODS ********************************************/
  84.  
  85.  
  86. -  (int)iconEntered:(int)windowNum
  87.  
  88.                  at:(double)x
  89.             :(double)y
  90.  
  91.          iconWindow:(int)iconWindowNum
  92.     
  93.           iconX:(double)iconX
  94.           iconY:(double)iconY
  95.           iconWidth:(double)iconWidth
  96.       iconHeight:(double)iconHeight
  97.  
  98.            pathList:(char *)pathList;
  99.  
  100. - (int)iconReleasedAt:(double)x
  101.                      :(double)y
  102.              
  103.            ok:(int*)flag;
  104.  
  105. @end
  106.  
  107.  
  108. @interface DummyIconViewDelegate : Object
  109.  
  110. - (int)willAcceptIcon:sender ok:(int*)flag;
  111.  
  112. @end
  113.