Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 3 - Word Processing Views / About protoTXView And the View System


About Paged and Non-paged Word-Processing Views

You can use either paged or non-paged views with *protoTXView. The text in a paged view is laid out in many pages, with text flowing from one page to another; pages are shown separated by a dotted line. The text in a non-paged view is all contained in one box. You specify whether a word-processing view is paged or non-paged when you set up its characteristics in the *protoTXView:*SetGeometry method. Paged versus non-paged views have a few other implications, as shown in Table 3-3.

Table 3-3 Paged versus non-paged views
IssuePaged viewsNon-paged views
Text layoutText flows from one page to another, as required.All text is contained within one bounding box.
Text height computationText height is automatically adjusted as you add or remove text.Text height is not automatically adjusted, which means that newly added text might not appear in the text region.

As a result, you might want to define the text height as an arbitrarily large number in your call to *SetGeometry.

Note that this is only an issue for read-write views.

ScrollingDefault scrolling behavior is to scroll to the bottom of a page, even if the text does not fill the entire page.For proper scrolling, you need to write a function to determine the actual text height in your view.

Note that this is related to text height computation (see the previous table entry) and is only an issue for read-write views.

See Listing 3-5 for an example.

Note
The sample code in this chapter for the TXWord program uses a paged word-processing view.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help