Deriving from TAbstractPanelFormatter

TAbstractPanelFormatter provides a complete set of abstract member functions that you implement to create a text formatter. TAbstractPanelFormatter also stores the resolution at which to format the text as an instance of TGrafMatrix, and provides the protocol for accessing the resolution. You can set this resolution to an ideal resolution for your layout and formatting or to the resolution of a specific device. TAbstractPanelFormatter treats this resolution as a const value. When text is displayed, it uses the actual resolution of the port into which the text is drawn.

This figure shows the TAbstractPanelFormatter functions you must implement:


The TAbstractPanelFormatter functions provide protocol for referencing a single panel (or formatting area). Your derived class must specifically provide for any formatting across multiple panels.

Following are brief descriptions of the TAbstractPanelFormatter abstract member functions. For complete descriptions, see the online class and member function documentation.

Initialize sets the parameters for the formatter, specifying:

The Initialize function must be called after the formatter has been constructed and the initial text and size of the formatting area are present. You must ensure that Initialize is called once before any other formatter functions are called.

The following functions provide access to information about the panel (formatting area):

The following functions handle changes to the associated text or to the size and shape of the formatting area:

Draw displays the formatted text. The Draw function resolves the text to the resolution of the specified graf port, but it does not recalculate line breaks. You should ensure that FlushChanges is called before drawing if any changes occurred since the last time FlushChanges was called.

The following functions allow conversion between external graphics coordinates and ranges of text--that is, a text range, text area, or insertion offset:


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker