Class TWPRTFEnginePaint

Hierarchy

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

Subclasses

WPCTRLabel.TWPCustomRtfLabel

Description

TWPRTFEnginePaint inherites from TWPRTFEngineBasis and coordinates the text formatting and painting. It handles its own pages array 'PaintPages' to save the position where and how to paint the pages. The pages in PaintPages can be retrieved from other sources to allow the integration of foreign pages into the text.

Properties

Methods

Procedure BroadcastMsg(Sender:TWPRTFDataCollectionBase; Code:Integer; Param:TObject)

Procedure CheckCursor

Create(aOwner:TComponent)

Destroy

Procedure DoFreeNotifyDynamicObject(Sender:TObject)

Function Draw(outDC:HDC; x:Integer; y:Integer; h:Integer; xres:Integer; yres:Integer; starty:Integer; HandlePageBreaks:Boolean) : Integer

Procedure DrawLineBorders(DestCanvas:TCanvas; aPar:TParagraph; aLin:Integer; aBorder:TBorder; aLineRect:TWPVirtPageImageLineRef; LineData:TWPVirtPageImageLineRef; PaintMode:TWPPaintModes; bPaintInGray:Boolean; rtfpage:TWPVirtPage; xoff:Integer; yoff:Integer; IsCell:Boolean)

Function FindDynamicObject(x:Integer; y:Integer; rtfpage:TWPVirtPage) : TWPDynamicObject

Function FixFontsOfText(RelacementFonts:; Charset:Integer) : Integer

Procedure FrameLine(Mode:TWPFrameLineMode; Pos:Integer)

Function FrameLineWasMoved : Boolean

Function GetCursorXYWH(X:Integer; Y:Integer; W:Integer; H:Integer; par:TParagraph; posinpar:Integer) : Boolean

Function GetImageAtXY(PaintPageNr:Integer; X:Integer; Y:Integer; TextObject:TWPTextObj; img_x:Integer; img_y:Integer; img_w:Integer; img_h:Integer) : Boolean

Function GetSpecialTextStyle(Input:TCharacterAttr; Printing:Boolean; par:TParagraph; posinpar:Integer) : TCharacterAttr

Function GetTextPageScreenRect(par:TParagraph; posinpar:Integer; x:Integer; y:Integer; w:Integer; h:Integer; pagenr:Integer) : TWPVirtPage

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

Function InitializePaintPages : Integer

Procedure InitializePar(RTFDataBlock:TWPRTFDataBlock; par:TParagraph; from_pos:Integer; to_pos:Integer)

Function MeasureObject(MeasureObjectMode:TWPMeasureObjectMode; Par:TParagraph; posinpar:Integer; PageNumber:Integer; xoff:Integer; maxx:Integer; YOff:Integer; maxy:Integer; curr_page:TWPVirtPage; w:Integer; h:Integer; PaintObject:TWPTextObj; PaintCanvas:TCanvas; SectionID:Integer; LockWidth:Boolean) : WideString

Function MoveCursor(PaintPageNr:Integer; X:Integer; Y:Integer; DontLeaveDataBlock:Boolean) : Boolean

Function ObjectWindowRect(TextObject:TWPTextObj; X:Integer; Y:Integer; W:Integer; H:Integer; CurrentPaintPageNr:Integer) : Boolean

Function PaintCursor(Mode:TWPPaintCursorMode; par:TParagraph; posinpar:Integer; aCanvas:TCanvas; xoff:Integer; yoff:Integer) : Boolean

Procedure PaintDesktop(DestCanvas:TCanvas; ScreenWidth:Integer; ScreenHeight:Integer; PaintDesktopModes:TWPPaintDesktopModes; pClipRect:PRect)

Procedure PaintDesktopBackground(Outcanvas:TCanvas; PaintRect:TRect)

Function PaintDesktopPrepareExView(PaintDesktopModes:TWPPaintDesktopModes) : TWPPaintModes

Procedure PaintRTFPage(PaintPageNr:Integer; x:Integer; y:Integer; pw:Integer; ph:Integer; DestCanvas:TCanvas; PaintMode:TWPPaintModes; DestXRes:Integer; DestYRes:Integer; ClipY:Integer; ClipH:Integer; PaintPageMode:TWPRTFEnginePaintPagesModes; rtfpage:TWPVirtPage)

Function PaintSinglePar(par:TWPTextStyle; toCanvas:TCanvas; r:TRect; xres:Integer; yres:Integer; text:string; IgnoreFontColor:Boolean) : Integer

Procedure PrepareDynamicObjects(offx:Integer; offy:Integer; rtfpage:TWPVirtPage; LineData:TWPVirtPageImageLineRef; PaintMode:TWPPaintModes)

Procedure PrintDynamicObjects(offx:Integer; offy:Integer; DestCanvas:TCanvas; rtfpage:TWPVirtPage; PaintMode:TWPPaintModes)

Procedure PropsToFontValues(Props:TWPCharAttr; SpecialTextFlags:TWPSpecialCharacterAttrKinds; InputValues:TWPFontCacheInput)

Function RefreshAniImages(toCanvas:TCanvas; x:Integer; y:Integer) : Boolean

Procedure Repaint

Function ScrollLinePos(par:TParagraph; posinpar:Integer; Obj:TWPTextObj; YOffset:Integer; Forced:Boolean) : Boolean

Procedure SetCanvasAttr(par:TParagraph; pos_in_par:Integer; aCanvas:TCanvas; ChooseHotStyle:Boolean; Printing:Boolean; CanvasExtraParams:TWPPaintExtraParams; BaseCA:TWPCharAttrStack; DontCheckObjects:Boolean; CheckOnlyThisObject:Boolean; cw:Char)

Function SetHOTStyle(start_par:TParagraph; end_par:TParagraph; start_posinpar:Integer; end_posinpar:Integer; HotMode:Integer) : Boolean

Function ShowCursor : Boolean

Function TextHeight(Resolution:Integer) : Integer

Function TextWidth(Resolution:Integer) : Integer

Function UpdateCodePage : Integer

Events

BeforeDestroyPaintPage : TWPBeforeDestroyPaintPage= TWPBeforeDestroyPaintPage

OnActivatingHotStyle : TWPActivatingHotStyle= TWPActivatingHotStyle

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

OnChangeScrollPosition : TWPChangeScrollPositionEvent= TWPChangeScrollPositionEvent

OnCustomLinePaintAfter : TWPVirtPagePaintEvent= TWPVirtPagePaintEvent

OnCustomLinePaintBefore : TWPVirtPagePaintEvent= TWPVirtPagePaintEvent

OnDeactivateHotStyle : TWPDeactivateHotStyle= TWPDeactivateHotStyle

OnDrawUnderline : TWPOnDrawUnderlineEvent= TWPOnDrawUnderlineEvent

OnFillPaperColorOnScreen : TWPInternFillPaperColorOnScreenEvent= TWPInternFillPaperColorOnScreenEvent

OnGetPageGapText : string= string

OnHyperlinkObjGetText : TWPOnTextObjGetTextEvent= TWPOnTextObjGetTextEvent

OnInitPage : TWPOnInitPage= TWPOnInitPage

OnMakeFootnoteNr : WideString= WideString

OnMeasureObjectEvent : TWPMeasureObjectEvent= TWPMeasureObjectEvent

This event is used for internal porposes. It makes it possible to override the default code which works with embedded objects. You can also use the OnTextObjectGetTextEx event instead. OnMeasureObjectEvent will be always triggered immediately before OnTextObjectGetTextEx.

OnPaintDesktopBackground : TWPOnPaintDesktopBackground= TWPOnPaintDesktopBackground

OnPaintExternPage : TWPOnPaintExternPageEvent= TWPOnPaintExternPageEvent

OnPaintTextFrameRect : TWPPaintTextFrameRect= TWPPaintTextFrameRect

OnPaintWatermark : TWPOnPaintWatermarkEvent= TWPOnPaintWatermarkEvent

OnTextObjectPaint : TWPTextObjectPaintEvent= TWPTextObjectPaintEvent

OnTextObjectPaintCalc : TWPTextObjectPaintCalcEvent= TWPTextObjectPaintCalcEvent

OnTextObjGetText : TWPOnTextObjGetTextEvent= TWPOnTextObjGetTextEvent

Used or referenced by

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