File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / Draw / SyncScrollView.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:36 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

/*
 * Any View that responds to these messages can be a "ruler".
 * This is a nice way to make an object which works in concert
 * with another object, but isn't hardwired into the implementation
 * of that object and, instead, publishes a minimal interface
 * which it expects another object to respond to.
 */

@protocol Ruler
- setFlipped:(BOOL)flag;		/* if YES, coordinates go right->left or top->bottom */
- hidePosition;				/* hide any positioning markers */
- showPosition:(NXCoord)p :(NXCoord)q;	/* put the positioning markers at p and q */
@end

typedef enum {
    LowerLeft = 0, LowerRight, UpperLeft, UpperRight
} RulerOrigin;

@interface SyncScrollView : ScrollView
{
    ClipView *hClipRuler;
    ClipView *vClipRuler;
    id rulerClass;
    NXCoord horizontalRulerWidth;
    NXCoord verticalRulerWidth;
    RulerOrigin rulerOrigin;
    BOOL verticalRulerIsVisible;
    BOOL horizontalRulerIsVisible;
    BOOL rulersMade;
}

/* Setting up the rulers */

- (BOOL)bothRulersAreVisible;
- (BOOL)eitherRulerIsVisible;
- (BOOL)verticalRulerIsVisible;
- (BOOL)horizontalRulerIsVisible;

- setRulerClass:factoryId;
- setRulerWidths:(NXCoord)horizontal :(NXCoord)vertical;
- setRulerOrigin:(RulerOrigin)origin;

- showHorizontalRuler:(BOOL)flag;
- showVerticalRuler:(BOOL)flag;

- updateRuler;

/* Comes up the responder chain to us */

- updateRulers:(const NXRect *)rect;
- showHideRulers:sender;

/* Overridden from superclass */

- reflectScroll:cView;
- tile;
- scrollClip:(ClipView *)aClipView to:(const NXPoint *)aPoint;
- descendantFrameChanged:sender;

@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.