home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / RectsView.h < prev    next >
Text File  |  1996-04-26  |  2KB  |  72 lines

  1. /* RectsView.h
  2.  *
  3.  * by Nik Gervae, Technical Publications, NeXT Software Inc.
  4.  *
  5.  * You may freely copy, distribute, and reuse the code in this example.
  6.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to
  7.  * its fitness for any particular use.
  8.  */
  9.  
  10.  
  11. #import <AppKit/AppKit.h>
  12.  
  13. @class Edge, ColorRect;
  14.  
  15.  
  16. /* RectsView is the ruler view's client in this test app. It tries to handle
  17.  * most ruler operations. */
  18.  
  19. @interface RectsView : NSView
  20. {
  21.     NSMutableArray *rects;
  22.     ColorRect *selectedItem;
  23. }
  24.  
  25. + (void)initialize;
  26. - (id)initWithFrame:(NSRect)frameRect;
  27. - (void)awakeFromNib;
  28. - (BOOL)acceptsFirstResponder;
  29. - (void)drawRect:(NSRect)aRect;
  30. - (void)mouseDown:(NSEvent *)theEvent;
  31.  
  32. - (void)selectRect:(ColorRect *)aColorRect;
  33. - (void)lock:(id)sender;
  34. - (void)zoomIn:(id)sender;
  35. - (void)zoomOut:(id)sender;
  36. - (void)nestle:(id)sender;
  37.  
  38. - (void)drawRulerlinesWithRect:(NSRect)aRect;
  39. - (void)updateRulerlinesWithOldRect:(NSRect)oldRect newRect:(NSRect)newRect;
  40. - (void)eraseRulerlinesWithRect:(NSRect)aRect;
  41. - (void)updateHorizontalRuler;
  42. - (void)updateVerticalRuler;
  43. - (void)updateRulers;
  44. - (void)updateSelectedRectFromRulers;
  45.  
  46.  
  47. - (BOOL)rulerView:(NSRulerView *)aRulerView
  48.     shouldMoveMarker:(NSRulerMarker *)aMarker;
  49. - (float)rulerView:(NSRulerView *)aRulerView
  50.     willMoveMarker:(NSRulerMarker *)aMarker
  51.     toLocation:(float)location;
  52. - (void)rulerView:(NSRulerView *)aRulerView
  53.     didMoveMarker:(NSRulerMarker *)aMarker;
  54. - (BOOL)rulerView:(NSRulerView *)aRulerView
  55.     shouldRemoveMarker:(NSRulerMarker *)aMarker;
  56. - (void)rulerView:(NSRulerView *)aRulerView
  57.     didRemoveMarker:(NSRulerMarker *)aMarker;
  58. - (BOOL)rulerView:(NSRulerView *)aRulerView
  59.     shouldAddMarker:(NSRulerMarker *)aMarker;
  60. - (float)rulerView:(NSRulerView *)aRulerView
  61.     willAddMarker:(NSRulerMarker *)aMarker
  62.     atLocation:(float)location;
  63. - (void)rulerView:(NSRulerView *)aRulerView
  64.     didAddMarker:(NSRulerMarker *)aMarker;
  65. - (void)rulerView:(NSRulerView *)aRulerView
  66.     handleMouseDown:(NSEvent *)theEvent;
  67. - (void)rulerView:(NSRulerView *)aRulerView
  68.     willSetClientView:(NSView *)newClient;
  69.  
  70.  
  71. @end
  72.