File: Document.h

package info (click to toggle)
preview.app 0.8.5-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 508 kB
  • sloc: objc: 487; makefile: 57; sh: 17
file content (81 lines) | stat: -rw-r--r-- 2,090 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
** Document.h
**
** Document header : This file is part of Preview 
** 
** Copyright (c) 2003,2004 Fabien VALLON 
** 2003,2004 Alcove ( http://www.alcove.com ) 
** Additional copyrights here
** 
** Authors : Fabien VALLON <fabien@sonappart.net>
** Date:	10 Oct 2003
** 
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
** published by the Free Software Foundation; either version 2 of
** the License, or (at your option) any later version.
** 
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** 
** See the GNU General Public License for more details.
** 
** You should have received a copy of the GNU General Public
** License along with this program; if not, write to:
** 
** Free Software Foundation, Inc.
** 59 Temple Place - Suite 330
** Boston, MA  02111-1307, USA
*/

#ifndef _IMAGESAPPS_PREVIEW_DOCUMENT_H
#define _IMAGESAPPS_PREVIEW_DOCUMENT_H

#include <Foundation/NSGeometry.h>
#include <AppKit/NSDocument.h>

@class NSImage;
@class NSImageView;
@class NSNotification;
@class NSMatrix;
@class NSScrollView;
@class NSWindow;


/*!
  @class Document
  @abstract Preview NSDocument subclass
  @discussion Preview NSDocument subclass. 
  It is also the Preview.gorm controller
  and the window delegate
*/
@interface Document: NSDocument
{
  NSScrollView *scrollView;
  NSImageView *imageView; 
  NSWindow *window;
  NSPopUpButton *popUp;
  NSMatrix *matrix;
@private 
  NSImage *_image;
  double _scaleFactor;
  NSSize _originalSize;
  unsigned _tag;
  BOOL _isAlpha;
  id checkeredView;
  id openHandCursor;
  id closedHandCursor;
}

//Action methods
-(void) zoomImage: (id) sender;  //from menuItems
-(void) resize: (id) sender;     //from menuItems/popUp/matrix

//window delegate
- (void)windowDidResize:(NSNotification *)aNotification; 
- (void)windowDidMiniaturize:(NSNotification *)aNotification; 

@end

#endif /* _IMAGESAPPS_PREVIEW_DOCUMENT_H */