de.dante.extex.typesetter
Interface Typesetter

All Superinterfaces:
ListMaker
All Known Implementing Classes:
NullTypesetterImpl, TypesetterImpl

public interface Typesetter
extends ListMaker

This interface describes the capabilities of a typesetter. The typesetter is a container for a stack of list makers which perform the task of assembling node lists of the appropriate type and structure. The typesetter acts as proxy. Most requests are simply forwarded to the current list maker.

Version:
$Revision: 1.36 $
Author:
Gerd Neugebauer
See Also:
"TeX – The Program [211]"

Method Summary
 void clearShipoutMark()
          Clear the internal state about shipouts.
 ListMaker ensureHorizontalMode(Locator locator)
          Switch to horizontal mode if necessary.
 void finish()
          Instructs the typesetter to perform any actions necessary for cleaning up everything at the end of processing.
 BackendDriver getBackendDriver()
          Getter for the back-end driver.
 ListMaker getListMaker()
          Getter for the current list maker.
 ListManager getManager()
          Getter for the manager of the list maker stack.
 NodeFactory getNodeFactory()
          Getter for the NodeFactory.
 boolean isShipoutMark()
          Query the shipout mark.
 void push(ListMaker listMaker)
          Open a new list maker and put it in the top of the stack as current box.
 void setBackend(BackendDriver driver)
          Setter for the back-end driver.
 void setNodeFactory(NodeFactory nodeFactory)
          Setter for the node factory.
 void setOptions(TypesetterOptions options)
          Setter for the typesetter specific options.
 void setOutputRoutine(OutputRoutine output)
          Setter for the output routine.
 void setPageBuilder(PageBuilder pageBuilder)
          Setter for the page builder.
 void setParagraphBuilder(ParagraphBuilder paragraphBuilder)
          Setter for the paragraph builder.
 void shipout(NodeList nodes)
          Send a list of nodes to the document writer.
 void showlists(java.lang.StringBuffer sb, long depth, long breadth)
          This method produces a diagnostic representation of the current lists in a StringBuffer.
 
Methods inherited from interface de.dante.extex.typesetter.ListMaker
add, add, addAndAdjust, addSpace, afterParagraph, complete, cr, getLastNode, getLocator, getMode, getPrevDepth, getSpacefactor, leftBrace, letter, mathShift, par, removeLastNode, rightBrace, setPrevDepth, setSpacefactor, showlist, subscriptMark, superscriptMark, tab
 

Method Detail

clearShipoutMark

public void clearShipoutMark()
Clear the internal state about shipouts. The shipout mark is reset to false.

See Also:
isShipoutMark()

ensureHorizontalMode

public ListMaker ensureHorizontalMode(Locator locator)
                               throws TypesetterException
Switch to horizontal mode if necessary. If the current mode is a horizontal mode then nothing is done.

Parameters:
locator - the locator
Returns:
the horizontal list maker
Throws:
TypesetterException - in case of an error

finish

public void finish()
            throws TypesetterException,
                   ConfigurationException
Instructs the typesetter to perform any actions necessary for cleaning up everything at the end of processing. This should involve a shipout of any material still left unprocessed.

Throws:
TypesetterException - in case of an error
ConfigurationException - in case of an configuration problem

getBackendDriver

public BackendDriver getBackendDriver()
Getter for the back-end driver.

Returns:
the back-end driver

getListMaker

public ListMaker getListMaker()
Getter for the current list maker.

Returns:
the top list maker or null if the stack is empty

getManager

public ListManager getManager()
Getter for the manager of the list maker stack.

Returns:
the manager

getNodeFactory

public NodeFactory getNodeFactory()
Getter for the NodeFactory.

Returns:
the node factory

isShipoutMark

public boolean isShipoutMark()
Query the shipout mark. The shipout mark is an internal state which records whether or not the shipout method has been called recently. This method can be used to get the current state. The method clearShipoutMark() can be used to reset the shipout mark to false. Initially the shipout mark is false.

Returns:
true iff there has been an invocation to the method shipout() since the last clearing
See Also:
clearShipoutMark()

push

public void push(ListMaker listMaker)
          throws TypesetterException
Open a new list maker and put it in the top of the stack as current box.

Parameters:
listMaker - the list maker
Throws:
TypesetterException - in case of an error

setBackend

public void setBackend(BackendDriver driver)
Setter for the back-end driver. The back-end driver is addressed whenever a complete page has to be shipped out.

Parameters:
driver - the new back-end driver

setNodeFactory

public void setNodeFactory(NodeFactory nodeFactory)
Setter for the node factory.

Parameters:
nodeFactory - the node factory

setOptions

public void setOptions(TypesetterOptions options)
Setter for the typesetter specific options.

Parameters:
options - the options to use

setOutputRoutine

public void setOutputRoutine(OutputRoutine output)
Setter for the output routine.

Parameters:
output - the output routine

setPageBuilder

public void setPageBuilder(PageBuilder pageBuilder)
Setter for the page builder.

Parameters:
pageBuilder - the page builder to set.

setParagraphBuilder

public void setParagraphBuilder(ParagraphBuilder paragraphBuilder)
Setter for the paragraph builder.

Parameters:
paragraphBuilder - the paragraph builder to set.

shipout

public void shipout(NodeList nodes)
             throws TypesetterException
Send a list of nodes to the document writer. As a side effect the shipout mark is set.

Parameters:
nodes - the nodes to send to the typesetter
Throws:
TypesetterException - in case of an error
See Also:
clearShipoutMark()

showlists

public void showlists(java.lang.StringBuffer sb,
                      long depth,
                      long breadth)
This method produces a diagnostic representation of the current lists in a StringBuffer.

Parameters:
sb - the target string buffer
depth - the depth for the display
breadth - the breadth of the display