Apple Newton Utilities User's Guide Page 767

  • Download
  • Add to my manuals
  • Print
  • Page
    / 942
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 766
CHAPTER 21
Routing Interface
Using Routing 21-19
in portrait mode ('portrait) or horizontally in landscape mode ('landscape).
The default value of the
orientation slot is 'portrait. Your format should
always use relative view justication and/or check the actual bounds of the print
format by using the
LocalBox view method. Note that you cannot change the
orientation between a series of pages being printed by a single print format.
If multiple items are being routed (as from a multiple selection in an overview), you
may want to print each item on a separate page or print the items one after another,
placing multiple items on the same page before starting a new page. You can control
this feature by setting the usesCursors slot. The default setting of this slot is nil.
If you want to lay out multiple items on a page, set the
usesCursors slot of the
format to
true. In this case, the target object encapsulates all the items being
routed in a single multiple-item object created by
CreateTargetCursor. Your
format should call the
GetTargetCursor method to return a cursor for this
object, on which you can iterate over the individual items to be routed using the
cursor methods
Entry, Next, and Prev. If your format can use other print
formats, you can use the
GetCursorFormat method of the
protoPrintFormat to find formats for the individual items.
If you want to lay out each item on a separate page, or if this format cannot handle
a multiple-item target object, set the
usesCursors slot to nil. In this case, this
format is invoked multiple times, once for each item being routed, and each item
begins on a separate page.
Printing and Faxing 21
When an item in the Out Box is actually printed or faxed using your print format,
the view represented by the print format is instantiated and drawn to the output
device. As when any view is instantiated, the system sends the print format view
standard messages and also routing-specic messages. For optimal printing
performance, and to avoid timing out a fax connection, you need to be aware of the
sequence of events and know which operations are time-critical.
Here is the sequence of events during a printing or faxing operation:
1. The transport sends the print format the
FormatInitScript message, to give
you an opportunity to perform initialization operations. You must perform any
lengthy initialization operations in this method, before the transport connection
is made. You can store initialized data in
self. For more information about
using
FormatInitScript, see Newton Programmers Reference.
2. For sending a fax only, the transport sends the print format the
CountPages
message. If you can determine the number of pages in the fax ahead of time, you
should override this method in your print format and have it return the number
of pages (not including the cover page). If you don’t override this message, the
transport opens the print format view in an offscreen window and performs steps
3, 4, and 6, below, to go through each page so it can count the number of pages.
Page view 766
1 2 ... 762 763 764 765 766 767 768 769 770 771 772 ... 941 942

Comments to this Manuals

No comments