1 // PXCanvasView.h 2 // Pixen 3 // 4 // Created by Joe Osborn on Sat Sep 13 2003. 5 // Copyright (c) 2003 Open Sword Group. All rights reserved. 6 // 7 8 #import <AppKit/AppKit.h> 9 10 @class PXCanvas; 11 @interface PXCanvasView : NSView { 12 PXCanvas * canvas; 13 id mainBackground, alternateBackground; 14 id grid, crosshair; 15 NSAffineTransform * transform; 16 float zoomPercentage; 17 NSPoint centeredPoint; 18 BOOL shouldDrawMainBackground; 19 20 NSTrackingRectTag trackingRect; 21 22 id delegate; 23 24 id timer; 25 BOOL shouldTile; 26 } 27 - (void)setDelegate:aDelegate; 28 - (void)setCrosshair:aCrosshair; 29 - initWithFrame:(NSRect)rect; 30 - (float)zoomPercentage; 31 - (void)setZoomPercentage:(float)percent; 32 - (void)setCanvas:aCanvas; 33 - (NSPoint)convertFromCanvasToViewPoint:(NSPoint)point; 34 - (NSRect)convertFromCanvasToViewRect:(NSRect)rect; 35 - (NSPoint)convertFromViewToCanvasPoint:(NSPoint)point; 36 - (NSPoint)convertFromWindowToCanvasPoint:(NSPoint)location; 37 - (void)setNeedsDisplayInCanvasRect:(NSRect)rect; 38 - (void)sizeToCanvas; 39 - (void)centerOn:(NSPoint)aPoint; 40 - (NSAffineTransform *)setupTransform; 41 - (NSAffineTransform *)setupScaleTransform; 42 43 - (void)setMainBackground:aBackground; 44 - (void)setAlternateBackground:aBackground; 45 46 - (void)scrollUpBy:(int)amount; 47 - (void)scrollRightBy:(int)amount; 48 - (void)scrollDownBy:(int)amount; 49 - (void)scrollLeftBy:(int)amount; 50 51 - (void)setShouldDrawMainBackground:(BOOL)newShouldDraw; 52 - grid; 53 - (BOOL)shouldTile; 54 - (void)setShouldTile:(BOOL)newShouldTile; 55 - (void)toggleShouldTile; 56 57 @end 58