ftp.nice.ch/pub/next/developer/resources/classes/RuledViews.s.tar.gz#/RuledViews/BrainRulers/RuledScrollView.h

This is RuledScrollView.h in view mode; [Download] [Up]

// RuledScrollView.h
// RuledScrollView is intended as a general purpose class to make it
// easy to add all kinds of rulers to any view.  This class is an 
// extension of the tiledScrollView class, from "ScrollDoodScroll" 
// (by Jayson Adams, NeXT Developer Support Team)
// This class is intended to be widely useful without needing to
// modify (or understand) its code, so it provides methods to setup 
// the mainView and its rulerViews, rather than hardcoding the setup.
// Kevin Brain (ksbrain@zeus.UWaterloo.ca)

#import <appkit/ScrollView.h>
#import <appkit/ClipView.h>
#import "Ruler.h"

// These manifests indicate which edge a scaleView is added to.,
// Also, they give the 'slice' parameter of the NXDivideRect function.
// (See the documentation for the NXDivideRect function in the
// file NXFunctsStoZ.rtfd release 2)
#define LEFTEDGE 0
#define BOTTOMEDGE 1
#define RIGHTEDGE 2
#define TOPEDGE 3
#define BOTTOMLEFTCORNER 4
#define TOPLEFTCORNER 5
#define BOTTOMRIGHTCORNER 6
#define TOPRIGHTCORNER 7

#define	TOPBOTTOM 1
#define	LEFTRIGHT 2

@interface RuledScrollView:ScrollView

{
	View 	*mainView,*printView;
	id		leftRuler;
	id		rightRuler;
	id		topRuler;
	id		bottomRuler;
	id		bottomLeftStub;
	id		topLeftStub;
	id		bottomRightStub;
	id		topRightStub;
	ClipView *leftRulerClipView,*rightRulerClipView;
	ClipView *topRulerClipView,*bottomRulerClipView;
	// original rectangles of ClipViews before adjusting them for printing
	NXRect	oldMainClipRect,oldLeftRect, oldRightRect, oldTopRect, oldBottomRect;
	NXRect	oldRect;
	// Connect popupListButton to a popUpList's button in Interface Builder 
	// if you want a popUpList in the horizontal scroller (eg. for zooming)
	id		hScrollerLeftEmbeddedView;
	id		hScrollerRightEmbeddedView;
	id		vScrollerTopEmbeddedView;
	id		vScrollerBottomEmbeddedView;
	BOOL	rulersOn;
	int		rulerVisible[4];
	id		printWindow;	
	ClipView *mainPrintClipView;	// clipView that holds mainView 
									// while constructing the printView
	NXPoint	mainVisiblePoint;		// point to scroll mainView to
	int	primaryRulers;				// which rulers extend to edge
}

/* instance methods */
- initFrame:(NXRect *)theFrame;
- free;
- setLeftRuler:anObject;
- setRightRuler:anObject;
- setTopRuler:anObject;
- setBottomRuler:anObject;
- setBottomLeftStub:anObject;
- setTopLeftStub:anObject;
- setBottomRightStub:anObject;
- setTopRightStub:anObject;
- addRulerView:(Ruler *)theView toEdge:(int)edge;
- addStubView:(View *)theView toCorner:(int)corner;
- tile;
- reflectScroll:cView;
- scrollClip:aClipView to:(NXPoint *)aPoint;
- setSizeIfNeeded;
- setSize;
- setPrimaryRulers:(int)orientation;
- (int)primaryRulers;
- showRuler:(int)whichRuler;
- hideRuler:(int)whichRuler;
- (BOOL)isRulerVisible:(int)whichRuler;
- topRuler;
- bottomRuler;
- leftRuler;
- rightRuler;
- bottomLeftStub;
- topLeftStub;
- bottomRightStub;
- topRightStub;
- getMinSize:(NXSize *)theSize;
- printVisible:sender;
- writeToStream:(NXStream *)stream;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.