Class TWPAttrCache
Hierarchy
System.TObject | TWPAttrCache
Description
TWPAttrCache - An instance is created by TWPRTFProps to hold all attributes a certain text uses. Each character only holds the index to the list of attributes or 0 for a neutral attr to use the inherited style (from par, style, parent)Advantages of this system: During initialisation we don't have to check if the attribute changes since we only have to compare the index. We can store a small cache of index/attr pairs to save the actual values.
Properties
Property CharAttrCount : Integer
Methods
Procedure EnumCharAttr(param:TObject; Proc:TWPAttrCacheEnumProc)
Function GetCharAttr(Index:Cardinal; CharAttr:TWPCharAttr) : Boolean
Function GetIndex(CharAttr:TWPCharAttr) : Integer
Function GetNewIndex(currindex:Cardinal; valueindex:Integer; Value:Integer) : Integer
Function MergeCharAttr(baseca:TWPCharAttr; SourceCA:TWPCharAttr; CharAttr:TWPCharAttr) : Boolean
Procedure OverrideCharAttr(Index:Cardinal; CharAttr:TWPCharAttr)
Procedure RemoveDifferentProps(SourceCharAttr:TWPCharAttr; CompareIndex:Cardinal)
Used or referenced by
-Property TWPRTFProps.Attributes : TWPAttrCache |