TAttr Type

Unit
WPRTEDefs

Declaration

TAttr = packed record
    Style: WrtStyle; // afsBold ...
    Color: Integer; // was: Byte
    BGColor: Integer; // was: Byte
    Font: Integer; // was: Byte
    CharSet: Integer; // has been inserted for version 5
    Size: Single; // was: Byte
    Tag: Integer; // only if the character is an object - then this is the
    // unique ID of the TWPTextObject used for this character. This is only used
    // for reading, not for writing!
    // -------------------------------------------------------------------------
    // the following elements were used in earlier WPTools versions. They are not any longer used
    // Extra: Byte; was: UNICode Char with fmRichTextUnicode
    // cStyle: Byte; was: reserved
    // Width: Word;  was: the width of the character
    // Base: Word; was: the baseline of the character
    // Height: Word; was: the height of the character
  end;

Description
@depreciated This record is only defined for better compatibility to WPTools 4 and earlier. It is a record with some (but not all possible) character attributes which can be read from and assigned to the property Attr of the TWPRichText object. The values which used to be 'Byte' value are changed to 'Integer' since the TAttr does not any longer need to be memory optimized.

Note: Records of type 'TWPCharAttr' are now used to store character attributes. Each character in the text has a reference to such a record using the par.CharAttr array. The CharAttr[] values are 3-byte index values to the TWPCharAttr records hosted by RTFProps.Attributes. The top byte is used to encode 8 dynamic flags, such as the marks for misspelled words. To change a CharAttr use the Cursor properties, such as property CurrentCharAttr: TWPCursorCharAttrInterface and property SelectedTextAttr: see class="TWPSelectedTextAttrInterface">.


Copyright (C) by WPCUBED GmbH - Munich
http://www.wpcubed.com