Pointers: PTAttr and TAttr is not used anymore

    • Offizieller Beitrag

    There are no pointers in WPTools 5. This change was necessary to make support for .NET possible.

    Characters in WPTools 5 have their own set of properties. This properties have priority over the properties of the paragraph or the span codes the text is located in. But the properties are not located in records which are stored "parallell" to the character itself.

    Instead only a 3 byte number is stored which is used as index into a table of character properties, the AttrCache. This means that it is not possible to simply change the attribute of a character by changing a value in the memory.

    Instead the value must be changed and a new index in the AttributeCache must be found which reflects the changed attribute record.
    This is automatically done by the various and very powerful attribute interface classes.

    This example show how the text can be manipulated in code - without moving the cursor. It changes all captital characters to bold, red. (Tip: CPAttr, CPMoveNext is normally easier to use)