home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / YellowBox / Kits / MiscTableScroll-138.1 / Palettes / MiscTableScroll / Framework / MiscMouseTracker.M < prev    next >
Encoding:
Text File  |  1998-03-31  |  3.3 KB  |  92 lines

  1. //=============================================================================
  2. //
  3. //    Copyright (C) 1995-1997 by Paul S. McCarthy and Eric Sunshine.
  4. //        Written by Paul S. McCarthy and Eric Sunshine.
  5. //                All Rights Reserved.
  6. //
  7. //    This notice may not be removed from this source code.
  8. //
  9. //    This object is included in the MiscKit by permission from the authors
  10. //    and its use is governed by the MiscKit license, found in the file
  11. //    "License.rtf" in the MiscKit distribution.  Please refer to that file
  12. //    for a list of all applicable permissions and restrictions.
  13. //    
  14. //=============================================================================
  15. //-----------------------------------------------------------------------------
  16. // MiscMouseTracker.M
  17. //
  18. //    Abstract class defining selection behavior based upon mouse tracking.
  19. //
  20. //-----------------------------------------------------------------------------
  21. //-----------------------------------------------------------------------------
  22. // $Id: MiscMouseTracker.M,v 1.4 96/12/30 09:12:52 sunshine Exp $
  23. // $Log:    MiscMouseTracker.M,v $
  24. //  Revision 1.4  96/12/30  09:12:52  sunshine
  25. //  v107.1: All access to the selection now goes through MiscTableBorder.
  26. //  
  27. //  Revision 1.3  96/05/07  02:12:42  sunshine
  28. //  For OpenStep conformance, keyboard events are now treated the same as
  29. //  mouse events (i.e. one must use the same modifiers with keyboard events
  30. //  as one does with mouse events rather than the behavior being different
  31. //  for keyboard events).  Ditched -keyDown:atPos: method.
  32. //  
  33. //  Revision 1.2  96/04/30  05:38:33  sunshine
  34. //  Ported to OpenStep 4.0 for Mach PR2.
  35. //-----------------------------------------------------------------------------
  36. #import "MiscMouseTracker.h"
  37. #import "MiscSparseSet.h"
  38. #import "MiscTableBorder.h"
  39.  
  40.  
  41. @implementation MiscMouseTracker
  42.  
  43. //-----------------------------------------------------------------------------
  44. // initBorder:
  45. //-----------------------------------------------------------------------------
  46. - (id) initBorder:(MiscTableBorder*)b
  47.     {
  48.     [super init];
  49.     border = b;
  50.     border->selectNone();
  51.     return self;
  52.     }
  53.  
  54.  
  55. //-----------------------------------------------------------------------------
  56. // subclassResponsibility:
  57. //-----------------------------------------------------------------------------
  58. - (void) subclassResponsibility:(SEL)s
  59.     {
  60.     [NSException raise:NSInvalidArgumentException
  61.         format:@"*** Subclass responsibility: %s", sel_getName(s)];
  62.     }
  63.  
  64.  
  65. //-----------------------------------------------------------------------------
  66. // mouseDown:atPos:
  67. //-----------------------------------------------------------------------------
  68. - (void) mouseDown:(NSEvent*) event atPos:(MiscCoord_V)pos
  69.     {
  70.     [self subclassResponsibility:_cmd];
  71.     }
  72.  
  73.  
  74. //-----------------------------------------------------------------------------
  75. // mouseDragged:atPos:
  76. //-----------------------------------------------------------------------------
  77. - (void) mouseDragged:(NSEvent*) event atPos:(MiscCoord_V)pos
  78.     {
  79.     [self subclassResponsibility:_cmd];
  80.     }
  81.  
  82.  
  83. //-----------------------------------------------------------------------------
  84. // mouseUp:atPos:
  85. //-----------------------------------------------------------------------------
  86. - (void) mouseUp:(NSEvent*) event atPos:(MiscCoord_V)pos
  87.     {
  88.     [self subclassResponsibility:_cmd];
  89.     }
  90.  
  91. @end
  92.