Class TWPRTFEnginePaint
Hierarchy
System.TObject | System.Classes.TPersistent | System.Classes.TComponent | Vcl.Controls.TControl | Vcl.Controls.TGraphicControl | WPRTEDefs.TWPRTFEngineBasis | WPRTEEdit.TWPRTFEngineEdit | TWPRTFEnginePaint
Subclasses
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
Property _RTLSupport : Boolean
Property bPaintInGray : Boolean
Property DeskColor : TColor
Property DeskColorTo : TColor
Property DeskGradientHorizontal : Boolean
Property DisableBackgroundOnBWPrinter : Boolean
Methods
Procedure BroadcastMsg(Sender:TWPRTFDataCollectionBase; Code:Integer; Param:TObject)
Procedure DoFreeNotifyDynamicObject(Sender:TObject)
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 Get_RTLMode : Boolean
Function GetCursorXYWH(X:Integer; Y:Integer; W:Integer; H:Integer; par:TParagraph; posinpar:Integer) : Boolean
Function GetDeskColor : TColor
Function GetDeskColorTo : TColor
Function GetFrameColor(textobj:TWPTextObj; defColor:TColor; PaintMode:TWPPaintModes) : TColor
Function GetReferenceCanvas : TCanvas
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 InitializePaintPages : Integer
Function MapFont(fn:string) : string
Function MoveCursor(PaintPageNr:Integer; X:Integer; Y:Integer; DontLeaveDataBlock:Boolean) : Boolean
Function PageIsSelected(PageNr:Integer) : Boolean
Procedure PaintDesktopBackground(Outcanvas:TCanvas; PaintRect:TRect)
Function PaintDesktopPrepareExView(PaintDesktopModes:TWPPaintDesktopModes) : TWPPaintModes
Function RefreshAniImages(toCanvas:TCanvas; x:Integer; y:Integer) : Boolean
Procedure Set_RTLMode(x:Boolean)
Procedure SetCanvasAttrIntern(InputValues:TWPFontCacheInput; aCanvas:TCanvas)
Function ShowCursor : Boolean
Procedure StartPaint(ThisDoubleBuffer:TBitmap)
Function TextHeight(Resolution:Integer) : Integer
Function TextWidth(Resolution:Integer) : Integer
Function UpdateCodePage : Integer
Events
BeforeDestroyPaintPage : TWPBeforeDestroyPaintPage= procedure( Sender: TObject; RTF - Engine RTFEngine: TWPRTFEngineEdit; var ExternPageRef: TObject; var WatermarkRef: TObject) of object;
OnActivatingHotStyle : TWPActivatingHotStyle= procedure(Sender: TObject; par: TParagraph; posinpar: Integer) of object;
OnChangedTopOffset : TNotifyEvent= procedure (Sender : TObject) of Object
OnChangeScrollPosition : TWPChangeScrollPositionEvent= TWPChangeScrollPositionEvent = procedure( Sender: TObject; RTFEngine: TWPRTFEngineEdit; HorzScroll: Boolean; var Ignore: Boolean) of object;
OnCustomLinePaintAfter : TWPVirtPagePaintEvent= TWPVirtPagePaintEvent = procedure(Sender: TObject; RTFEngine: TWPRTFEngineBasis; param: TWPVirtPagePaintParam; EndOfPageRun: Boolean) of object;
OnCustomLinePaintBefore : TWPVirtPagePaintEvent= TWPVirtPagePaintEvent = procedure(Sender: TObject; RTFEngine: TWPRTFEngineBasis; param: TWPVirtPagePaintParam; EndOfPageRun: Boolean) of object;
OnDeactivateHotStyle : TWPDeactivateHotStyle= procedure(Sender: TObject) of object;
OnDrawUnderline : TWPOnDrawUnderlineEvent= procedure( Sender : TObject; Engine: TWPRTFEnginePaint; Stage : TWPDrawStage; Canvas: TCanvas; R : TRect; SpecialTextFlags: TWPSpecialCharacterAttrKinds; BaseY : Integer; var LineMode : Integer; var LineColor: TColor; PaintMode : TWPPaintModes; xres,yres : Integer; par : TParagraph; posinpar : Integer; var Ignore : Boolean ) of Object;
OnFillPaperColorOnScreen : TWPInternFillPaperColorOnScreenEvent= procedure( Sender : TObject; Canvas : TCanvas; r : TRect; PaintPageNr : Integer; PaintMode : TWPPaintModes; var Handled : Boolean) of Object;
OnGetPageGapText : string= string
OnHyperlinkObjGetText : TWPOnTextObjGetTextEvent= procedure( RefCanvas: TCanvas; TXTObject: TWPTextObj; var PrintString: WideString; var WidthInPix: Integer; var HeightInPix: Integer; var PaintObject: TWPTextObj; Xres, YRes: Integer) of object;
OnInitPage : TWPOnInitPage= TWPOnInitPage = procedure( Sender: TObject; { The 'Parent' Object of the RTF - Engine, usually the TWPRichText } RTFEngine: TWPRTFEngineEdit; paintpagenr: Integer; { the number of the paint page (this is not the RTF page) } rtfpagenr: Integer; { the RTF page which will be used if ExternPageRef stayes to be nil } var ExternPageRef: TObject; { assign an object here to disable RTF text for this page } var WatermarkRef: TObject; { assign data required to paint a watermark } var PaperColor: TColor; var pagewidth, pageheight, marginleft, margintop, marginright, marginbottom: Integer) of object;
OnMakeFootnoteNr : WideString= WideString
OnMeasureObjectEvent : TWPMeasureObjectEvent= TWPMeasureObjectEvent = procedure( Sender: TObject; Par: TParagraph; PosInPar: Integer; PageNumber: Integer; xoff, maxx, yoff, maxy: Integer; curr_page: TWPVirtPage; var w, h: Integer; var PaintObject: TWPTextObj; PaintCanvas: TCanvas; SectionID: Integer; var LockWidth: Boolean; RefCanvas: TCanvas; var NewString: WideString; var Handled: Boolean) of object;
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.