TRVStyleTemplate

Properties   Methods

<< Click to display table of contents >>

TRVStyleTemplate

Properties   Methods

This class represents a "real" style controlling properties of TFontInfo and TParaInfo objects.

This is an item in the collection of TRVStyle.StyleTemplates. The class of the collection itself is TRVStyleTemplateCollection.

Unit RVStyle.

Syntax

TRVStyleTemplate = class(TCollectionItem)

(introduced in version 14)

Hierarchy

TObject

TPersistent

TCollectionItem

Main Properties

Kind – kind of this style templates (defines it applicability to text or paragraphs);

Name – unique name;

Id – unique identifier;

TextStyle, ValidTextProperties – text properties;

ParaStyle, ValidParaProperties – paragraph properties;

ParentId – a reference to a parent style template;

NextId – a reference to a style template for following paragraphs;

QuickAccess – recommends to provide a quick access to this style template in applications UI.

Main Methods

UpdateModifiedTextStyleProperties fills the set of properties of the specified text style that were changed after applying this style template;

UpdateModifiedParaStyleProperties fills the set of properties of the specified paragraph style that were changed after applying this style template;

ApplyToTextStyle applies this style template to the specified text style;

ApplyToParaStyle applies this style template to the specified paragraph style.

Linking

Each style template has two properties having unique values: Id and Name. Id is read-only, is assigned automatically, the collection provides its uniqueness. Name is assigned by the user, you (the programmer) must provide its uniqueness.

Links from TextStyles, ParaStyles, and between StyleTemplates are made via Id property.

Name is used when merging style templates of two different documents.

Unlike items in TRVStyle.TextStyles and TRVStyle.ParaStyles, style templates are never referred by their index in the collection (except for indices returned after searching by a name or an identifier, and the editor methods for applying to the selection).

See also

Styles and style templates.