apply
layout::apply (application[, flags[, doc]])
This function uses the current print FOSI to add page layout structure to the document and then calls an application specific function. The markup consists of singletons with the atipl namespace prefix, for example atipl:startpage.
The application parameter is the name of a callable function that implements some application specific behavior. Most commonly it will specify a set of generic attributes of the atipl markup to achieve a set of formatting effects. The application function must accept a single parameter: the document to modify, and return a status of 0 for failure or 1 for success. A sample line numbering application is located in the samples\linenumbering folder of your installation directory.
The optional flags parameter is a bit mask used to control the markup inserted. If not specified, then all possible markup is inserted. The bits control the type of structured markup to add to the document. These bits are:
• 0x1 — line
• 0x2 — entry
• 0x4 — row
• 0x8 — float
• 0x10 — column
• 0x20 — span
• 0x40 — page
The following bits are used to control the behavior of the function:
• 0x1000 — generate diagnostics
• 0x2000 — no atipl markup for lines that contain only generated text
The optional doc parameter specifies the document to modify. The current document is assumed if this parameter is not specified.
If the operation fails the function returns 0. If the operation succeeds then the function returns 1.
For more detailed information on the page layout elements and their attributes, see
http://www.arbortext.com/namespace/pagelayout. Refer to the
Programmer's Reference for more detailed information about line numbering applications.
Related Topics