WPTools Manual



Search


(press enter to search)

Class TWPSetModeControl

Hierarchy

System.TObject | System.Classes.TPersistent | TWPSetModeControl

Description

Interface to the 'current' character and paragraph attributes. You can use the provided properties to modify character and paragraph attributes.
@depreciated This interface is provided for compatibility to WPTools Version 4 and earlier. This property hides one of the best features of WPTools 5: all properties have a null state but its source (unit WPCtrRich.PAS) is a good example how the properties of the text can be retrieved and changed. The interface is easy to use and will so be supported in future version of WPTools, too. It will not be supported in a pure OCX or .NET version of WPTools though.
Please note that the class TWPSetModeControl only works as a interface to the text manahed by the "RTF-Engine". It cannot be used to store properties. Please use the property WPCSS to get a string with property definitions if you need to store and transfer properties.
Upgrade notes: The properties "Tabs" and "BorderProp" are not anymore defined.
The property MultSpaceBetween is not used anymore. In WPTools 5 a paragraph can have either a LineHeight defined in % or the SpaceBetween value as a positive (=minimum) or negative (=exact) twips value.
Size is now a floating point value (type: single)

Properties

Methods

Function AddNumberStyle(Style:TWPNumberStyle; TextB:string; TextA:string; BulletFont:string; Indent:Integer) : Integer

Procedure AddStyle(x:WrtStyle)

Procedure AddTab(pos:Integer; Kind:TTabKind; Fill:TTabFill; ColorNr:Integer)

Procedure ADel(WPAT_Code:Byte)

Function AGet(WPAT_Code:Byte; Value:Integer) : Boolean

Function AGetDefault(WPAT_Code:Byte; Value:Integer) : Integer

Procedure ASet(WPAT_Code:Byte; Value:Integer)

Procedure Assign(Source:TPersistent)

Procedure AutoIndentFirst(defaultvalue:Integer)

Procedure BeginUpdate

Procedure ClearAllTabs

Procedure ClearAttr(ParAttr:Boolean; CharAttr:Boolean)

Procedure ClearAttributes(StyleNr:Integer)

Function ColorToNr(x:TColor; add:Boolean) : Integer

Create(aOwner:TWPCustomRtfEdit)

Function CurrentTable : TParagraph

Procedure DecIndent

Procedure DecOutlineLevel

Procedure DecSize(n:Single)

Procedure DeleteStyle(x:WrtStyle)

Procedure DeleteTab(pos:Integer)

Destroy

Function EndUpdate : Boolean

Function GetAlign : TParAlign

Function GetBKColor : Integer

Function GetCellCommand : string

Function GetCellFormat : Integer

Function GetCellName : string

Function GetCharSet : Integer

Function GetColor : Integer

Function GetColorEx(WPAT_Code:Integer) : Integer

Function GetCurrNumberStart : Integer

Function GetCurrNumberStyle : Integer

Function GetCursor : TWPRTFDataCursor

Function GetFontName : string

Function GetFontNr : Integer

Function GetIndentFirst : Integer

Function GetIndentLeft : Integer

Function GetIndentRight : Integer

Function GetLineColor(index:TWPBrdLine) : Integer

Function GetLineheight : Integer

Function GetLineVisible(index:TWPBrdLine) : Boolean

Function GetLineWidth(index:TWPBrdLine) : Integer

Function GetNumberStyle(nr:Integer) : TWPRTFNumberingStyle

Function GetNumberStyleEx : TWPRTFNumberingStyle

Function GetOutlineBreak : Boolean

Function GetOutlineLevel : Integer

Function GetOutlineMode : Boolean

Function GetOutlineStyle : TWPNumberStyle

Function GetOutlineStyles(index:Integer) : TWPRTFNumberingStyle

Function GetParColor : Integer

Function GetParId : Integer

Function GetParKeep : Boolean

Function GetParKeepNext : Boolean

Function GetParProtect : Boolean

Function GetParShading : Integer

Function GetRTFProps : TWPRTFProps

Function GetSize : Single

Function GetSpaceAfter : Integer

Function GetSpaceBefore : Integer

Function GetSpaceBetween : Integer

Function GetStyle : WrtStyle

Function GetStyleName : string

Function GetTabCount : Integer

Function GetTabFill(index:Integer) : TTabFill

Function GetTabKind(index:Integer) : TTabKind

Function GetTableLeftRight(tbLeft:Integer; tbRight:Integer) : Boolean

Function GetTableName : string

Function GetTabPosition(index:Integer) : Integer

Function GetUnderlineMode : Integer

Function GetVertAlign : TParVertAlign

Procedure HidePar(Status:Boolean)

Procedure IncIndent

Procedure IncOutlineLevel

Procedure IncSize(n:Single)

Function NrToColor(x:Integer) : TColor

Procedure SetAlign(x:TParAlign)

Procedure SetBKColor(x:Integer)

Procedure SetBorders(LineSelection:TBorderType; WPBRD_mode:Integer; ThicknessTW:Integer; LeftColor:Integer; RightColor:Integer; TopColor:Integer; BottomColor:Integer; AllPadding:Integer; DeleteDefaultSettings:Boolean)

Procedure SetCellBorders(left:TThreeState; top:TThreeState; right:TThreeState; bottom:TThreeState; inner:TThreeState)

Procedure SetCellCommand(x:string)

Procedure SetCellFormat(x:Integer)

Procedure SetCellName(x:string)

Procedure SetCharSet(x:Integer)

Procedure SetColor(x:Integer)

Procedure SetCurrNumberStart(x:Integer)

Procedure SetCurrNumberStyle(x:Integer)

Procedure SetFontCharset(fontname:string; charset:Integer)

Procedure SetFontName(x:string)

Procedure SetFontNr(x:Integer)

Procedure SetFontStyle(x:TFontStyles)

Procedure SetIndentFirst(x:Integer)

Procedure SetIndentLeft(x:Integer)

Procedure SetIndentRight(x:Integer)

Procedure SetLineColor(index:TWPBrdLine; x:Integer)

Procedure SetLineHeight(x:Integer)

Procedure SetLineVisible(index:TWPBrdLine; x:Boolean)

Procedure SetLineWidth(index:TWPBrdLine; x:Integer)

Procedure SetNoWordWrapInPar(Status:Boolean)

Function SetNumberStyle(TextB:string; TextA:string; BulletFont:string; Style:TWPNumberStyle; indent:Integer) : Integer

Procedure SetNumberStyleEx(x:TWPRTFNumberingStyle)

Procedure SetOutlineBreak(x:Boolean)

Procedure SetOutlineLevel(x:Integer)

Procedure SetOutlineMode(x:Boolean)

Procedure SetOutlineStyle(x:TWPNumberStyle)

Procedure SetParColor(x:Integer)

Procedure SetParId(x:Integer)

Procedure SetParKeep(x:Boolean)

Procedure SetParKeepNext(x:Boolean)

Procedure SetParProtect(x:Boolean)

Procedure SetParShading(x:Integer)

Function SetParStyle(aName:string) : TWPRTFStyleElement

Procedure SetSize(x:Single)

Procedure SetSpaceAfter(x:Integer)

Procedure SetSpaceBefore(x:Integer)

Procedure SetSpaceBetween(x:Integer)

Procedure SetStyle(x:WrtStyle)

Procedure SetStyleName(x:string)

Procedure SetTableLeftRight(tbLeft:Integer; tbRight:Integer)

Procedure SetTableName(x:string)

Procedure SetUnderlineMode(x:Integer)

Procedure SetVertAlign(x:TParVertAlign)

Procedure TextStyle(x:WrtStyle; AddStyle:Boolean)

Procedure ToggleStyle(afsStyleName:TOneWrtStyle)

Used or referenced by

-Property TWPCustomRichText.CurrAttr : TWPSetModeControl