1 /* 2 NSClipView.h 3 4 The class that contains the document view displayed by a NSScrollView. 5 6 Copyright (C) 1996 Free Software Foundation, Inc. 7 8 Author: Ovidiu Predescu <ovidiu@net-community.com> 9 Date: July 1997 10 11 This file is part of the GNUstep GUI Library. 12 13 This library is free software; you can redistribute it and/or 14 modify it under the terms of the GNU Lesser General Public 15 License as published by the Free Software Foundation; either 16 version 2 of the License, or (at your option) any later version. 17 18 This library 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. See the GNU 21 Lesser General Public License for more details. 22 23 You should have received a copy of the GNU Lesser General Public 24 License along with this library; see the file COPYING.LIB. 25 If not, see <http://www.gnu.org/licenses/> or write to the 26 Free Software Foundation, 51 Franklin Street, Fifth Floor, 27 Boston, MA 02110-1301, USA. 28 */ 29 30 #ifndef _GNUstep_H_NSClipView 31 #define _GNUstep_H_NSClipView 32 #import <GNUstepBase/GSVersionMacros.h> 33 34 #import <AppKit/NSView.h> 35 36 @class NSNotification; 37 @class NSCursor; 38 @class NSColor; 39 40 @interface NSClipView : NSView 41 { 42 NSView* _documentView; 43 NSCursor* _cursor; 44 NSColor* _backgroundColor; 45 BOOL _drawsBackground; 46 BOOL _copiesOnScroll; 47 /* Cached */ 48 BOOL _isOpaque; 49 } 50 51 /* Setting the document view */ 52 - (void)setDocumentView:(NSView*)aView; 53 - (id)documentView; 54 55 /* Scrolling */ 56 - (void)scrollToPoint:(NSPoint)aPoint; 57 - (BOOL)autoscroll:(NSEvent*)theEvent; 58 - (NSPoint)constrainScrollPoint:(NSPoint)proposedNewOrigin; 59 60 /* Determining scrolling efficiency */ 61 - (void)setCopiesOnScroll:(BOOL)flag; 62 - (BOOL)copiesOnScroll; 63 64 /* Getting the visible portion */ 65 - (NSRect)documentRect; 66 - (NSRect)documentVisibleRect; 67 68 /* Setting the document cursor */ 69 - (void)setDocumentCursor:(NSCursor*)aCursor; 70 - (NSCursor*)documentCursor; 71 72 /* Setting the background color */ 73 - (void)setBackgroundColor:(NSColor*)aColor; 74 - (NSColor*)backgroundColor; 75 76 #if OS_API_VERSION(GS_API_MACOSX, GS_API_LATEST) 77 /* Setting the background drawing */ 78 - (void)setDrawsBackground:(BOOL)flag; 79 - (BOOL)drawsBackground; 80 #endif 81 82 @end 83 84 #endif /* _GNUstep_H_NSClipView */ 85