Added copyright notice and defined some ivars.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11095 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2001-10-06 22:27:26 +00:00
parent 263b6bf5a6
commit a113ea6e17
2 changed files with 96 additions and 8 deletions

View file

@ -1,12 +1,54 @@
/*
NSRulerMarker.h
Displays a symbol in a NSRulerView.
Copyright (C) 1999 Free Software Foundation, Inc.
Author: Michael Hanni <mhanni@sprintmail.com>
Date: Feb 1999
Author: Fred Kiefer <FredKiefer@gmx.de>
Date: Sept 2001
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _GNUstep_H_NSRulerMarker
#define _GNUstep_H_NSRulerMarker
#include <Foundation/NSObject.h>
#include <Foundation/NSGeometry.h>
@class NSRulerView;
@class NSImage;
@class NSEvent;
@interface NSRulerMarker : NSObject <NSCopying, NSCoding>
{
NSRulerView *_rulerView;
NSImage *_image;
id <NSCopying> _representedObject;
NSPoint _imageOrigin;
float _location;
BOOL _isMovable;
BOOL _isRemovable;
BOOL _isDragging;
}
@interface NSRulerMarker : NSObject <NSObject,NSCopying>
- (id)initWithRulerView:(NSRulerView *)aRulerView
markerLocation:(float)location
image:(NSImage *)anImage
@ -37,9 +79,6 @@
- (BOOL)isDragging;
- (BOOL)trackMouse:(NSEvent *)theEvent adding:(BOOL)flag;
// NSCopying
- (id) copyWithZone: (NSZone*)zone;
@end
#endif /* _GNUstep_H_NSRulerMarker */

View file

@ -1,16 +1,58 @@
/*
NSRulerView.h
The NSRulerView class.
Copyright (C) 1999 Free Software Foundation, Inc.
Author: Michael Hanni <mhanni@sprintmail.com>
Date: Feb 1999
Author: Fred Kiefer <FredKiefer@gmx.de>
Date: Sept 2001
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library 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
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _GNUstep_H_NSRulerView
#define _GNUstep_H_NSRulerView
#include <AppKit/NSView.h>
#include <AppKit/NSRulerMarker.h>
#include <AppKit/NSScrollView.h>
@class NSRulerMarker;
@class NSScrollView;
typedef enum {
NSHorizontalRuler,
NSVerticalRuler
} NSRulerOrientation;
@interface NSRulerView : NSView <NSObject, NSCoding>
@interface NSRulerView : NSView
{
NSMutableArray *_markers;
NSString *_measurementUnits;
NSView *_clientView;
NSView *_accessoryView;
NSScrollView *_scrollView;
float _originOffset;
float _reservedThicknessForAccessoryView;
float _reservedThicknessForMarkers;
float _ruleThickness;
NSRulerOrientation _orientation;
}
- (id)initWithScrollView:(NSScrollView *)aScrollView
orientation:(NSRulerOrientation)orientation;
@ -60,7 +102,14 @@ unitToPointsConversionFactor:(float)conversionFactor
- (float)ruleThickness;
- (float)requiredThickness;
- (float)baselineLocation;
- (BOOL)isFlipped;
- (BOOL)isFlipped;
@end
//
// Methods Implemented by the Delegate
//
@interface NSObject (NSRulerViewClient)
- (void)rulerView:(NSRulerView *)aRulerView
didAddMarker:(NSRulerMarker *)aMarker;