|Top Previous Next|
To make compilation with Delphi8 for .NET possible, WPTools Version 9 no longer makes use of pointers (exception: some optimized conversion code).
As a result, all pointers have been replaced. The PTParagraph pointers have all been changed to references to a TParagraph object. Since references and pointers can be used in a very similar manner, you can compile your code by simply removing the ^ sign (Delphi) or changing -> into . (c++)
The RTF-Engine paragraph pointers (WPRichText1.Memo.active_paragraph and others) have been moved. The references which represent the cursor position are now in WPRichText.Memo.Cursor or, if no editor is used, in RTFDataCollection.Cursor.
Please note that in WPTools Version 9 the reference active_paragraph can be undefined (nil). The same is true for the 'FirstPar' reference of a TWPRTFDataBlock - although the code will create a first paragraph as soon as this property is read.
The pointer for the TLine record of WPTools Version 9 is no longer supported. The TLine record has been completely replaced, a position in a paragraph is now described solely by the position, posinpar.
The cursor object still supports a property called active_line. It is an integer value which can be used to access the wrapped lines.
Pointers to border descriptions (TBorder) can no longer be used. The border definitions are now stored in the regular properties of a TParagraph or TWPTextStyle class. But to provide compatibility to WPTools 4 it is possible to fill a TBorder record 'on the fly' with values calculated from the stored properties.
This means that if you have a procedure which expects a TBorder record or pointer it is necessary to pass a reference to a TWPTextStyle class and calculate the border record inside of this procedure using the TWPTextStyle procedure AGetBorder(). Please see the next chapter for further information.