home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / MiscKit1.2.6 / Palettes / MiscDragViews / MiscViews.subproj / MiscIconWell.h < prev    next >
Encoding:
Text File  |  1994-05-23  |  1.9 KB  |  58 lines

  1. /**************************************************************************
  2.  * CLASS:        MiscIconWell
  3.  * PROGRAMMER:    Todd Thomas        (todd@avocado.cuc.ab.ca)
  4.  * DATE:        May 24, 1994
  5.  * VERSION:        0.4
  6.  *
  7.  *    This class (by default) allows both source and destination dragging of 
  8.  * icon representations of files and folders and uses the NXFilenamePboardType
  9.  * to pass the filename that is associated with the dragged icon.
  10.  * Since we are inheriting the basic functionality from MiscDragView, we 
  11.  * should not need to do much. 
  12.  *
  13.  * Small bug fixes: BJM 5/24/94 (Bruce McKenzie, spuds@netcom.com)
  14.  *   1) changed "- (char *)filename" to "- (const char *)filename"
  15.  *   2) fixed recognition of multiple files in filename to look for tab,
  16.  *       rather than "any whitespace".
  17.  *   3) fixed places where it was assumed that filename ivar was ever nil
  18.  *   4) Added proper archiving/versioning to class.
  19.  *   5) Added "- launch:sender" method
  20.  *
  21.  * This object is included in the MiscKit by permission from the author
  22.  * and its use is governed by the MiscKit license, found in the file
  23.  * "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  24.  * for a list of all applicable permissions and restrictions.
  25.  ***************************************************************************/
  26.  
  27. #import <appkit/appkit.h>
  28. #import <misckit/MiscDragView.h>
  29.  
  30.  
  31. @interface MiscIconWell : MiscDragView
  32. {
  33.     id  filename;
  34.     BOOL  allowDoubleClickLaunch;
  35. }
  36.  
  37. - initFrame: (const NXRect *)frameRect;
  38. - awake;
  39. - free;
  40. - (const char *)filename;
  41. - setImageByFilename: (const char *)aFilename;
  42. - setAllowDoubleClickLaunch: (BOOL)aBool;
  43. - (BOOL)allowDoubleClickLaunch;
  44.  
  45. /*
  46.  * Launch/open file in WS: BJM 5/24/94
  47.  */
  48. - launch:sender;
  49.  
  50. - mouseDown: (NXEvent *)theEvent;
  51. - (BOOL)setupForSourceDrag;
  52. - (BOOL)performDragOperation: sender;
  53. - concludeDragOperation: sender;
  54. - read: (NXTypedStream *)stream;
  55. - write: (NXTypedStream *)stream;
  56.  
  57. @end
  58.