tenny@ootool.dec.com (Dave Tenny) (05/09/91)
I have a subclass of ScrollView. It doesn't do much, but overloads initFrame and drawSelf to update some status indicators. It also attaches a subclass of View as the docView of the ScrollView. The docView gets created with a runtime dependent set of dimensions. Let's say the dimensions are 2000x2000. I want to be able to do two things that I can't seem to find very easily. (A) I want to tell the scroller buttons how much a click should cause them to scroll the docView. How? (B) I want to update a status window with the current "lower left" positions that are being displayed in the ScrollView. I can't seem to find this data. The data in the rects argument to drawSelf might have it, or it might not (depends on the why drawSelf was called). The bounds and other objects present in the ScrollView and its docView show things with origin 0,0 and width/height 2000 X 2000. How can I tell exactly what the lower left index of the docView being displayed in the ScrollView is? I suppose an addendum question is: (C) Do the "techdocs" available from NeXT for $95 include the missing concepts chapters which detail this type of data? Will these concepts chapters be online again (as they were in 1.0) in 2.1? Thanks, Dave
sstreep@elvis (Sam Streeper) (05/09/91)
In comp.sys.next article <1991May8.175640.4658@engage.enet.dec.com> you wrote: > > (A) I want to tell the scroller buttons how much a click should cause them to > scroll the docView. How? use the ScrollView method - setLineScroll > (B) I want to update a status window with the current "lower left" positions > that are being displayed in the ScrollView. I can't seem to find this > data. The data in the rects argument to drawSelf might have it, or > it might not (depends on the why drawSelf was called). The bounds and other > objects present in the ScrollView and its docView show things with > origin 0,0 and width/height 2000 X 2000. > > How can I tell exactly what the lower left index of the docView > being displayed in the ScrollView is? You should definitely not attempt to figure this out from drawSelf:: I think that if you implement a scrollClip:to: method in your ScrollView it should give you the data you want. From scrollClip:to: you will need to call rawScroll: to force the scrolling to the point of your choice (which should be the point given in scrollClip:to:) so you know exactly what that point is. Remember that the document View will be displayed "fixed" relative to the clipView's coordinate system. rawScroll translates the ClipView's coordinate system, which effectively moves or scrolls the document view along with it. (Try it, it's easier than it sounds) > (C) Do the "techdocs" available from NeXT for $95 include the missing concepts > chapters which detail this type of data? Will these concepts chapters > be online again (as they were in 1.0) in 2.1? The printed techdocs do include the concepts. You could also ftp the concepts from purdue if you want it online. I think the 2.1 online doc is virtually identical to the 2.0 online doc, except it includes video docs. -sam -- Opinions are not those of my employer. They're not even mine. They're probably wrong besides. How did they get in here, anyway?