C# 클래스 SIL.FieldWorks.SharpViews.Selections.InsertionPoint

An insertion point represents a specific position in text between two characters. It can also represent one end of a range. It is implemented as a position relative to a particular StringParaHookup, which in turn links it to a particular paragraph box and client run
상속: TextSelection
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
Associate InsertionPoint
BackspaceDeleteLineBreak void
CopyFrom void
DeleteLineBreak void
Draw void
InsertLineBreak void
InsertionPoint System
IsValidInsertionPoint bool
MoveBack InsertionPoint
MoveForward InsertionPoint
MoveUpOrDown InsertionPoint

공개 메소드들

메소드 설명
ApplyStyle ( string style ) : void

Changes the Selection's style

Backspace ( ) : void

Implement the backspace key function (delete one character, or merge two paragraphs).

CanApplyStyle ( string style ) : bool

Checks whether the Selection's style can be changed

CanDelete ( ) : bool

Return true if Delete() will delete something. Default is that it will not.

Delete ( ) : void

Delete the selected material, or whatever else is appropriate when the Delete key is pressed. (Insertion Point deletes the following character.)

ExpandToWord ( ) : RangeSelection
GetParagraphOps ( IParagraphOperations &paragraphOps, GroupHookup &parentHookup, int &index ) : bool
GetSelectionLocation ( IVwGraphics graphics, PaintTransform transform ) : Rectangle

Get the location, in the coordinates indicated by the transform, of a rectangle that contains the primary insertion point. Todo JohnT: there should be a parallel routine to get the location of the secondary rectangle.

InsertRtfString ( string input ) : bool
InsertText ( string input ) : bool

Insert the specified text at the insertion point. Enhance JohnT: normalize the string after the edit, maintaining the posititon of the IP correctly.

InsertTsString ( ITsString input ) : bool
MoveByKey ( KeyEventArgs args ) : Selection

Return the selection that should be produced by a KeyDown event with the specified arguments. If the argument does not specify a key-moving event or it is not possible to move (e.g., left arrow at start of document), return null.

NextIp ( int distance ) : InsertionPoint
RestoreData ( Selection dataToSave ) : ISelectionRestoreData
SameLocation ( InsertionPoint other ) : bool

True if the two selections are at the same place (ignoring AssociatePrevious).

ToString ( ) : string

비공개 메소드들

메소드 설명
Associate ( bool previous ) : InsertionPoint
BackspaceDeleteLineBreak ( ) : void
CopyFrom ( InsertionPoint other ) : void

Make your state equivalent to the other IP.

DeleteLineBreak ( ) : void
Draw ( IVwGraphics vg, PaintTransform ptrans ) : void
InsertLineBreak ( ) : void
InsertionPoint ( LiteralStringParaHookup hookup, int position, bool fAssocPrev ) : System
IsValidInsertionPoint ( int runIndex, int ichRun ) : bool
MoveBack ( ) : InsertionPoint
MoveForward ( ) : InsertionPoint
MoveUpOrDown ( int delta ) : InsertionPoint

Move the insertion point up or down (depending on the sign of delta). Records an x position in the selection, so further moves down from the new IP as a starting point stay aligned as nearly as possible with the start position.

메소드 상세

ApplyStyle() 공개 메소드

Changes the Selection's style
public ApplyStyle ( string style ) : void
style string
리턴 void

Backspace() 공개 메소드

Implement the backspace key function (delete one character, or merge two paragraphs).
public Backspace ( ) : void
리턴 void

CanApplyStyle() 공개 메소드

Checks whether the Selection's style can be changed
public CanApplyStyle ( string style ) : bool
style string
리턴 bool

CanDelete() 공개 메소드

Return true if Delete() will delete something. Default is that it will not.
public CanDelete ( ) : bool
리턴 bool

Delete() 공개 메소드

Delete the selected material, or whatever else is appropriate when the Delete key is pressed. (Insertion Point deletes the following character.)
public Delete ( ) : void
리턴 void

ExpandToWord() 공개 메소드

public ExpandToWord ( ) : RangeSelection
리턴 RangeSelection

GetParagraphOps() 공개 메소드

public GetParagraphOps ( IParagraphOperations &paragraphOps, GroupHookup &parentHookup, int &index ) : bool
paragraphOps IParagraphOperations
parentHookup SIL.FieldWorks.SharpViews.Hookups.GroupHookup
index int
리턴 bool

GetSelectionLocation() 공개 메소드

Get the location, in the coordinates indicated by the transform, of a rectangle that contains the primary insertion point. Todo JohnT: there should be a parallel routine to get the location of the secondary rectangle.
public GetSelectionLocation ( IVwGraphics graphics, PaintTransform transform ) : Rectangle
graphics IVwGraphics
transform PaintTransform
리턴 System.Drawing.Rectangle

InsertRtfString() 공개 메소드

public InsertRtfString ( string input ) : bool
input string
리턴 bool

InsertText() 공개 메소드

Insert the specified text at the insertion point. Enhance JohnT: normalize the string after the edit, maintaining the posititon of the IP correctly.
public InsertText ( string input ) : bool
input string
리턴 bool

InsertTsString() 공개 메소드

public InsertTsString ( ITsString input ) : bool
input ITsString
리턴 bool

MoveByKey() 공개 메소드

Return the selection that should be produced by a KeyDown event with the specified arguments. If the argument does not specify a key-moving event or it is not possible to move (e.g., left arrow at start of document), return null.
public MoveByKey ( KeyEventArgs args ) : Selection
args System.Windows.Forms.KeyEventArgs
리턴 Selection

NextIp() 공개 메소드

public NextIp ( int distance ) : InsertionPoint
distance int
리턴 InsertionPoint

RestoreData() 공개 메소드

public RestoreData ( Selection dataToSave ) : ISelectionRestoreData
dataToSave Selection
리턴 ISelectionRestoreData

SameLocation() 공개 메소드

True if the two selections are at the same place (ignoring AssociatePrevious).
public SameLocation ( InsertionPoint other ) : bool
other InsertionPoint
리턴 bool

ToString() 공개 메소드

public ToString ( ) : string
리턴 string