1 /* 2 NSRulerMarker.h 3 4 Displays a symbol in a NSRulerView. 5 6 Copyright (C) 1999 Free Software Foundation, Inc. 7 8 Author: Michael Hanni <mhanni@sprintmail.com> 9 Date: Feb 1999 10 Author: Fred Kiefer <FredKiefer@gmx.de> 11 Date: Sept 2001 12 13 This file is part of the GNUstep GUI Library. 14 15 This library is free software; you can redistribute it and/or 16 modify it under the terms of the GNU Lesser General Public 17 License as published by the Free Software Foundation; either 18 version 2 of the License, or (at your option) any later version. 19 20 This library is distributed in the hope that it will be useful, 21 but WITHOUT ANY WARRANTY; without even the implied warranty of 22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 23 Lesser General Public License for more details. 24 25 You should have received a copy of the GNU Lesser General Public 26 License along with this library; see the file COPYING.LIB. 27 If not, see <http://www.gnu.org/licenses/> or write to the 28 Free Software Foundation, 51 Franklin Street, Fifth Floor, 29 Boston, MA 02110-1301, USA. 30 */ 31 32 #ifndef _GNUstep_H_NSRulerMarker 33 #define _GNUstep_H_NSRulerMarker 34 35 #import <Foundation/NSObject.h> 36 #import <Foundation/NSGeometry.h> 37 38 @class NSRulerView; 39 @class NSImage; 40 @class NSEvent; 41 42 @interface NSRulerMarker : NSObject <NSCopying, NSCoding> 43 { 44 NSRulerView *_rulerView; 45 NSImage *_image; 46 id <NSCopying> _representedObject; 47 NSPoint _imageOrigin; 48 CGFloat _location; 49 BOOL _isMovable; 50 BOOL _isRemovable; 51 BOOL _isDragging; 52 } 53 54 - (id)initWithRulerView:(NSRulerView *)aRulerView 55 markerLocation:(CGFloat)location 56 image:(NSImage *)anImage 57 imageOrigin:(NSPoint)imageOrigin; 58 59 - (NSRulerView *)ruler; 60 61 - (void)setImage:(NSImage *)anImage; 62 - (NSImage *)image; 63 64 - (void)setImageOrigin:(NSPoint)aPoint; 65 - (NSPoint)imageOrigin; 66 - (NSRect)imageRectInRuler; 67 - (CGFloat)thicknessRequiredInRuler; 68 69 - (void)setMovable:(BOOL)flag; 70 - (BOOL)isMovable; 71 - (void)setRemovable:(BOOL)flag; 72 - (BOOL)isRemovable; 73 74 - (void)setMarkerLocation:(CGFloat)location; 75 - (CGFloat)markerLocation; 76 77 - (void)setRepresentedObject:(id <NSCopying>)anObject; 78 - (id <NSCopying>)representedObject; 79 80 - (void)drawRect:(NSRect)aRect; 81 - (BOOL)isDragging; 82 - (BOOL)trackMouse:(NSEvent *)theEvent adding:(BOOL)adding; 83 84 @end 85 86 #endif /* _GNUstep_H_NSRulerMarker */ 87