home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / SourceCode / MiniExamples / PaginationLab / BigView.h next >
Text File  |  1991-05-18  |  1KB  |  46 lines

  1. /* BigView.h
  2.  * Purpose: Demonstrates custom pagination.
  3.  * a BigView is a "matrix" of 3x4 rectangles, each of which is 8" x 10"
  4.  * A bigView therefore has very logical page breaks, although the Appkit by
  5.  * default won't break up the bigView on those boundaries.  This class demonstrates
  6.  * how to do this.  This class also demonstrates somewhat optimized scrolling by only
  7.  * drawing affected pages (because a page is the smallest divisible unit in this class.)
  8.  *
  9.  * You may freely copy, distribute, and reuse the code in this example.
  10.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
  11.  * fitness for any particular use.
  12.  */
  13.  
  14. #import <appkit/View.h>
  15.  
  16. #define AUTO 0
  17. #define AUTOWITHHELP 1
  18. #define APPCONTROLLED 2
  19.  
  20. @interface BigView:View
  21. {
  22.     id pi;
  23.     float realScale;
  24. }
  25.  
  26. void _drawRect(float x, float y, char *str, char *num, BOOL darkFlag);
  27.  
  28. - initFrame:(const NXRect *)frameRect;
  29. - drawSelf:(const NXRect *)rects :(int)rectCount;
  30. - (BOOL)knowsPagesFirst:(int *)firstPageNum last:(int *)lastPageNum;
  31. - (BOOL)getRect:(NXRect *)theRect forPage:(int)page;
  32. - placePrintRect:(const NXRect *)aRect offset:(NXPoint *)location;
  33. - addToPageSetup;
  34. - adjustPageHeightNew:(float *)newBottom
  35.     top:(float)oldTop
  36.     bottom:(float)oldBottom
  37.     limit:(float)bottomLimit;
  38. - adjustPageWidthNew:(float *)newRight
  39.     left:(float)oldLeft
  40.     right:(float)oldRight
  41.     limit:(float)rightLimit;
  42. - endPrologue;
  43. - setPrintInfo:newPi;
  44.  
  45. @end
  46.