1 /* 2 ** Document.h 3 ** 4 ** Document header : This file is part of Preview 5 ** 6 ** Copyright (c) 2003,2004 Fabien VALLON 7 ** 2003,2004 Alcove ( http://www.alcove.com ) 8 ** Additional copyrights here 9 ** 10 ** Authors : Fabien VALLON <fabien@sonappart.net> 11 ** Date: 10 Oct 2003 12 ** 13 ** This program is free software; you can redistribute it and/or 14 ** modify it under the terms of the GNU General Public License as 15 ** published by the Free Software Foundation; either version 2 of 16 ** the License, or (at your option) any later version. 17 ** 18 ** This program is distributed in the hope that it will be useful, 19 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 ** 22 ** See the GNU General Public License for more details. 23 ** 24 ** You should have received a copy of the GNU General Public 25 ** License along with this program; if not, write to: 26 ** 27 ** Free Software Foundation, Inc. 28 ** 59 Temple Place - Suite 330 29 ** Boston, MA 02111-1307, USA 30 */ 31 32 #ifndef _IMAGESAPPS_PREVIEW_DOCUMENT_H 33 #define _IMAGESAPPS_PREVIEW_DOCUMENT_H 34 35 #include <Foundation/NSGeometry.h> 36 #include <AppKit/NSDocument.h> 37 38 @class NSImage; 39 @class NSImageView; 40 @class NSNotification; 41 @class NSMatrix; 42 @class NSScrollView; 43 @class NSWindow; 44 45 46 /*! 47 @class Document 48 @abstract Preview NSDocument subclass 49 @discussion Preview NSDocument subclass. 50 It is also the Preview.gorm controller 51 and the window delegate 52 */ 53 @interface Document: NSDocument 54 { 55 NSScrollView *scrollView; 56 NSImageView *imageView; 57 NSWindow *window; 58 NSPopUpButton *popUp; 59 NSMatrix *matrix; 60 @private 61 NSImage *_image; 62 double _scaleFactor; 63 NSSize _originalSize; 64 unsigned _tag; 65 BOOL _isAlpha; 66 id checkeredView; 67 id openHandCursor; 68 id closedHandCursor; 69 } 70 71 //Action methods 72 -(void) zoomImage: (id) sender; //from menuItems 73 -(void) resize: (id) sender; //from menuItems/popUp/matrix 74 75 //window delegate 76 - (void)windowDidResize:(NSNotification *)aNotification; 77 - (void)windowDidMiniaturize:(NSNotification *)aNotification; 78 79 @end 80 81 #endif /* _IMAGESAPPS_PREVIEW_DOCUMENT_H */ 82