DekGenius.com
[ Team LiB ] Previous Section Next Section

NSRulerMarker Mac OS X 10.0

Instances of this class are used to display symbolic markers in an NSRulerView. An example of ruler view markers are those that text documents use to indicate the position of tab stops or table columns. Markers are initialized with an associated ruler view, a position in that view, an image used to represent the marker in the ruler view, and an NSPoint that specifies what point in the image should be treated as the marker origin.

figs/cocn_1578.gif

@interface NSRulerMarker : NSObject <NSCoding, NSCopying>
 // Initializers
   - (id)initWithRulerView:(NSRulerView *)ruler markerLocation:(float)location image:(NSImage *)image
        imageOrigin:(NSPoint)imageOrigin;
 // Accessor Methods
   - (void)setRepresentedObject:(id <NSCopying>)representedObject;
   - (id <NSCopying>)representedObject;
   - (void)setImageOrigin:(NSPoint)imageOrigin;
   - (NSPoint)imageOrigin;
   - (void)setMarkerLocation:(float)location;
   - (float)markerLocation;
   - (void)setMovable:(BOOL)flag;
   - (void)setImage:(NSImage *)image;
   - (NSImage *)image;
   - (void)setRemovable:(BOOL)flag;
 // Instance Methods
   - (void)drawRect:(NSRect)rect;
   - (NSRect)imageRectInRuler;
   - (BOOL)isDragging;
   - (BOOL)isMovable;
   - (BOOL)isRemovable;
   - (NSRulerView *)ruler;
   - (float)thicknessRequiredInRuler;
   - (BOOL)trackMouse:(NSEvent *)mouseDownEvent adding:(BOOL)isAdding;
 // Methods Implementing NSCoding
   - (void)encodeWithCoder:(NSCoder *)aCoder;
   - (id)initWithCoder:(NSCoder *)aDecoder;
 // Methods Implementing NSCopying
   - (id)copyWithZone:(NSZone *)zone;
// Methods Implemented by the Delegate
   - (void)rulerView:(NSRulerView *)ruler didAddMarker:(NSRulerMarker *)marker;
   - (void)rulerView:(NSRulerView *)ruler didMoveMarker:(NSRulerMarker *)marker;
   - (void)rulerView:(NSRulerView *)ruler didRemoveMarker:(NSRulerMarker *)marker;
   - (void)rulerView:(NSRulerView *)ruler handleMouseDown:(NSEvent *)event;
   - (BOOL)rulerView:(NSRulerView *)ruler shouldAddMarker:(NSRulerMarker *)marker;
   - (BOOL)rulerView:(NSRulerView *)ruler shouldMoveMarker:(NSRulerMarker *)marker;
   - (BOOL)rulerView:(NSRulerView *)ruler shouldRemoveMarker:(NSRulerMarker *)marker;
   - (float)rulerView:(NSRulerView *)ruler willAddMarker:(NSRulerMarker *)marker atLocation:(float)location;
   - (float)rulerView:(NSRulerView *)ruler willMoveMarker:(NSRulerMarker *)marker toLocation:(float)location;
   - (void)rulerView:(NSRulerView *)ruler willSetClientView:(NSView *)newClient;

    [ Team LiB ] Previous Section Next Section