Class TWPRTFEngineEdit

Hierarchy

System.TObject | System.Classes.TPersistent | System.Classes.TComponent | Vcl.Controls.TControl | Vcl.Controls.TGraphicControl | WPRTEDefs.TWPRTFEngineBasis | TWPRTFEngineEdit

Subclasses

WPRTEPaint.TWPRTFEnginePaint

Description

TWPRTFEngineEdit implements the page handling and input functions. The actual initialization is implemented into .

Properties

Methods

Procedure _Lock

Procedure _Unlock

Procedure BroadcastEvent(Code:Integer; Param:TObject)

Function c_move(mode:TWPMoveMode; mark:Boolean) : Boolean

Function c_pos(x:Integer; y:Integer; mark:Boolean; scroll:Boolean) : Boolean

Procedure ClearPaintPages

Function CombineAdjacentTables(StartPar:TParagraph; OnlyThis:Boolean) : Integer

Procedure CompleteSpellCheck

Create(aOwner:TComponent)

Function CreateMergeCells(StartPar:TParagraph) : Integer

Function DeleteLast : Boolean

Function DeleteOne(NeedFullReformat:Boolean) : Boolean

Procedure DeletePage(index:Integer)

Destroy

Function ExternPageRefAdd(mode:TWPRTFExternPageRefMode; PageNrX:Integer; Order:Integer; ExternPageRef:TObject; WatermarkRef:TObject) : TWPRTFExternPageRef

Procedure ExternPageRefClear

Procedure ExternPageRefDelete(Def:TWPRTFExternPageRef)

Function GetBlockAttr(DifferentSettings:TWPBlockAttribute; IgnoredValue:Boolean) : Boolean

Function GetFirstParOnPage(page:Integer; par:TParagraph; posinpar:Integer) : Boolean

Function GetLastParOnPage(page:Integer; par:TParagraph; posinpar:Integer) : Boolean

Function GetNumberText(par:TParagraph; NumberStyle:TWPTextStyle) : WideString

Function GetPageAtXY(X:Integer; Y:Integer; marginarea:TWPMouseMarginArea; UseMargins:Boolean) : Integer

Function GetPageWithPar(par:TParagraph; pos_in_par:Integer; rtfdata:TWPRTFDataBlock) : Integer

Function GetPageWithParEx(par:TParagraph; pos_in_par:Integer; rtfdata:TWPRTFDataBlock; rtfpagenr:Integer) : Integer

Function GetPageWithSelectionEnd : Integer

Function GetPageWithSelectionStart : Integer

Function GetPaintPage(index:Integer; PaintPageRec:TWPRTFEnginePaintPages; rtfpage:TWPVirtPage) : Boolean

Procedure GetPaintPageWH(pageno:Integer; width_tw:Integer; height_tw:Integer)

Function GetParAtXY(X:Integer; Y:Integer; par:TParagraph; posinpar:Integer; XNotImportant:Boolean; FindNextPage:Boolean) : Boolean

Function GetPopupParagraphObj(X:Integer; Y:Integer; ObjRect:TWPPopupParagraphObjRect) : TCustomParagraphObj

Function GetPopupParagraphObjRect(index:Integer) : PWPPopupParagraphObjRect

Function GetRTFBlockOnPaintPage(Kind:TWPPagePropertyKind; PaintPageNr:Integer) : TWPRTFDataBlock

Function GetRTFPageAtXY(X:Integer; Y:Integer; PaintPage:Integer; RTFPageNr:Integer; IgnoreX:Boolean) : TWPVirtPage

Function GetRTFPositionAtXY(PaintPageNr:Integer; X:Integer; Y:Integer; aRTFData:TWPRTFDataBlock; par:TParagraph; pos_in_par:Integer; FrameBorder:TWPFrameBorder; TextObject:TWPTextObj; SizerElement:TWPPaintSizerRects; PageHoverLink:TObject; XYAsTwips:Boolean; Modes:TWPRTFPositionAtXYModes) : Boolean

Function GetTextScreenRect(par:TParagraph; posinpar:Integer; x:Integer; y:Integer; w:Integer; h:Integer; CharOffset:Boolean; linenr:Integer; pagenr:Integer; FavourizeEnd:Boolean) : Boolean

Function GetXYOfRTFPage(aRTFData:TWPRTFDataBlock; RTFPageNr:Integer; x:Integer; y:Integer) : Boolean

Function GetXYPositionAtRTF(aRTFData:TWPRTFDataBlock; par:TParagraph; pos_in_par:Integer; PaintPageNr:Integer; X:Integer; Y:Integer; Mode:TWPGetXYPositionAtRTFModes) : Boolean

Function GetXYPositionAtRTFTW(aRTFData:TWPRTFDataBlock; par:TParagraph; pos_in_par:Integer; PaintPageNr:Integer; X:Integer; Y:Integer; IncludeMargins:Boolean) : Boolean

Function InitializePaintPages : Integer

Function InputFootnote(InitText:string; Mode:TWPInputFootnoteModes) : TWPTextObj

Function InputString(Text:string; HandlePaint:Boolean; CodePage:Integer) : Boolean

Function InsertWideString(Text:WideString; HandlePaint:Boolean) : Boolean

Function PageTextHeightPix : Integer

Procedure ReformatAll(InitializeAll:Boolean; SpellcheckAll:Boolean; ReformatProcedure:TWPAbstractRTFDataBlockFormatter)

Procedure RemoveRTFData

Function ReorderPaintPages : Integer

Function RTFDataIsVisible(RTFDataBlock:TWPRTFDataBlock) : Boolean

Function RTFDataOffset(RTFPageNr:Integer; DataBlock:TWPRTFDataBlock; Off:TPoint; Move:Boolean) : Boolean

Function Selected : Boolean

Procedure SetMonitorDPI(xres:Integer; yres:Integer)

Function ShowCursor : Boolean

Function SpellcheckPar(par:TParagraph; CheckAll:Boolean; DontModify:Boolean) : Boolean

Function UpdateCodePage : Integer

Events

OnCalcPageNr : TWPOnCalcPageNr= TWPOnCalcPageNr

This event can be used to overwrite the page numbers which are internally calculated. You can check for the name of the TextObject. It can have the following values: PAGE, NUMPAGES, NEXTPAGE, PRIORPAGE and SECTIONPAGES. The passed RTFPageNr is 0 based. The passed PaintPageNr can be -1 if the event is not executed from painting code, othewise it is the 0 based number of the current page page (see ExternalPages demo).
Note, if the var PrintedPageNr is set to 0 nothing will be printed!

OnChangeZooming : TNotifyEvent= procedure (Sender : TObject) of Object

This event is triggered when the is changed.

OnEditFieldCheckInputString : TWPEditFieldCheckInputStringEvent= TWPEditFieldCheckInputStringEvent

OnGetAttrHidden : TWPGetAttrHiddenEvent= TWPGetAttrHiddenEvent

OnGetAttributeColor : TWPGetAttrColorEvent= TWPGetAttrColorEvent

OnLeaveRTFDataBlock : TWPInternalLeaveRTFDataBlockEvent= TWPInternalLeaveRTFDataBlockEvent

OnMeasureTextPage : TWPMeasurePageEvent= TWPMeasurePageEvent

This event is triggered to measure the size of a page. procedure TForm5.WPRichTextLabel1MeasureTextPage(Sender: TObject; PageInfo: TWPMeasurePageParam); begin PageInfo.HeightTW := 720 * PageInfo.pagenr; PageInfo.changed := true; end;

OnSpellCheckWord : TSpellCheckWordEvent= TSpellCheckWordEvent

OnTextObjectDelete : TWPTextObjectDeleteEvent= TWPTextObjectDeleteEvent

This event checks if a certain object may be deleted. It is only triggered when the object is about to be deleted using the delete or backspace key. The default value of 'MayDelete' is controlled by flag wpObjectDeletion in EditOptions. If the flag is not set, MayDelete defaults to false, otherwise to TRUE.

OnTextObjectEdit : TWPTextObjectEditEvent= TWPTextObjectEditEvent

OnTextObjectSelect : TWPTextObjectSelectEvent= TWPTextObjectSelectEvent

Used or referenced by

-Procedure TWPSuperMerge.PaintBand(Memo:TWPRTFEngineBasis; toCanvas:TCanvas; par:TParagraph; r:TRect; PaintBandMode:TWPPaintBandMode; PaintModes:TWPPaintModes)
-Procedure TWPSuperMerge.PaintBand(Memo:TWPRTFEngineBasis; toCanvas:TCanvas; par:TParagraph; r:TRect; PaintBandMode:TWPPaintBandMode; PaintModes:TWPPaintModes)