TWPRTFDataCursor Object
Properties Methods

Unit
WPRTEDefs

Declaration
TWPRTFDataCursor = class(TObject)

Hierarchy
TObject <--TWPRTFDataCursor

Subclasses
None

Description
The cursor (text insertion mark) is supported by the class TWPRTFDataCursor. You can reference WPRichText1.TextCursor to access this object.
The same class also manages the standard selection and the special paragraph selection which is used inside of tables.

Note about multi view: Since all references have to be managed we do not support more than one TWPRTFDataCursor for the text. So when the focus changes to a different editor the selection has to be removed and the cursor position has to be stored. You can use markers to store the cursor position and selection!

The TWPRTFDataCursor is created by the RTFData-Collection which holds all blocks of one text. (Body, header, footer, footnotes ...)

The RTF-Engine either display one block or the text body block with overlay from the other TWPRTFDataBlock objects (WYSIWYG header+footer display). Many RTFEngines can be attached to the same RTF text - see TWPRTFStroge.
Note
All attached RTF engines attached to the same TWPRTFDataCollection use the same cursor object.


TWPRTFDataCursor implements the QuickNDirty cursor movement routines CPMoveNext which makes it easy to access the complete text char by char. You can access this functions using WPRichText.CP.MoveNext. The Cursor also publishes the 'FirstPar' property which is the first paragraph in the list where the cursor AND the selection is.
To move the cursor to a certain paragraph 'MoveTo' is used. Please also note the support for markers (similar to numeric bookmarks) - a good example for the use of these is the implementation of ReplaceTokens.

Introduced Properties
active_line 
 active_page 
block_e_cp 
block_e_lin 
block_s_cp 
block_s_lin 
Char 
 CPAttr 
 CurrentCharAttr 
cursor_pos 
cursor_pos_x 
DisableTextSelection 
 EndTagOfObjAtCP 
 Finder 
FirstPar 
HasFieldSelection 
 Hot_ParID 
Inserting 
 IsSpace 
 IsWordDelimiter 
 LastPar 
LockSelection 
Moved 
 NextObjAtCP 
 NoManualChange 
 ObjAfterSelection 
ObjAtCP 
ObjBeforeCP 
 ObjBeforeSelection 
 ObjEndSelection 
 ObjStartSelection 
Position 
 PrevObjAtCP 
RTFData 
 RTFDataCollection 
RTFEngine 
 RTFProps 
SelectedObject 
 SelectedTextAttr 
 SelectionContents 
SelectText 
 SelLength 
 SelStart 
 WritingTextAttr 

Introduced Methods
ApplyChangesRec  For intern use only.
CallForSelectedText 
ClearSelection 
ClearTextInbetween 
CollectAllMarker 
CollectMarker 
CPMoveBack 
CPMoveNext 
Create 
CurrAttribute 
Destroy 
DisableForms 
DropMarker 
DropMarkerAt 
DropMarkerAtSelEnd 
DropMarkerAtSelStart 
DropMarkerPosition 
EnableForms 
Find 
GetBlockEnd 
GetBlockStart 
GetCharAttr 
GetSelectedCells 
GetSelectedParTree 
GetSelPosLen 
GetSelText 
GetSelTextW 
GotoMarker 
HideSelection 
IsSelected 
IsSelectionProtected 
IsTextSelected 
LockGetCharAttr 
MoveBack 
MoveDownLine 
MoveDownPar 
MoveNext 
MoveTo 
MoveUpLine 
MoveUpPar 
NextHotId 
SelectFromHere 
SelectionExtend 
SelectionShiftStart 
SelectLine 
SelectMarker 
SelectMarkerStartLen 
SelectParagraph 
SelectThisCell 
SelectThisColumn 
SelectThisRow 
SelectThisTable 
SelectToHere 
SelectWord  Select the word at this position.
SetSelPosLen 
SpeedSelectFromTo 


Copyright (C) by WPCUBED GmbH - Munich
http://www.wpcubed.com