home *** CD-ROM | disk | FTP | other *** search
/ Altsys Virtuoso 2.0K / virtuoso_20k.iso / DemoApps / Graphics / Viewers / Magnify / Source / MagnifyView.h < prev    next >
Encoding:
Text File  |  1993-01-26  |  1.2 KB  |  60 lines

  1. /* File: MagnifyView.h - View class for 'Magnify'
  2.  *
  3.  * By: Christopher Lane
  4.  * Symbolic Systems Resources Group
  5.  * Knowledge Systems Laboratory
  6.  * Stanford University
  7.  *
  8.  * Date: 7 January 1992
  9.  *
  10.  * Copyright: 1990, 1991 & 1992 by The Leland Stanford Junior University.
  11.  * This program may be distributed without restriction for non-commercial use.
  12.  */
  13.  
  14. #import <cthreads.h>
  15. #import <appkit/appkit.h>
  16.  
  17. #define NX_NOBUTTONS (0)
  18. #define NX_MAXPLANES (5)
  19.  
  20. @interface MagnifyView : View
  21. {  
  22.     Window *invisibleWindow;
  23.     View *invisibleView;
  24.     NXPoint mouse;
  25.     NXSize offset;
  26.     NXRect virtualBounds;
  27.     mutex_t lock;
  28.     float scale, grid;
  29.     BOOL frozen, showCursor, showGrid;
  30.     void *data[NX_MAXPLANES];
  31.     int pixelsWide, pixelsHigh, bps, spp, config, mask;
  32. }
  33.  
  34. + newFrame:(const NXRect *) frameRect;
  35.  
  36. - (BOOL) acceptsFirstResponder;
  37. - copy:sender;
  38. - drawSelf:(const NXRect *) rects :(int) rectCount;
  39. - free;
  40. - sizeTo:(NXCoord) newWidth :(NXCoord) newHeight;
  41. - mouseMoved:(NXEvent *) theEvent;
  42.  
  43. - drawCursor;
  44. - drawGrid;
  45.  
  46. - updateBitmap:(NXPoint *) point;
  47.  
  48. - (float) scale;
  49. - setScale:(float) value;
  50. - (float) grid;
  51. - setGrid:(float) value;
  52.  
  53. - (BOOL) isFrozen;
  54. - toggleFrozen:sender;
  55. - toggleCursor:sender;
  56.  
  57. - createWindows;
  58.  
  59. @end
  60.