C# 클래스 SIL.FieldWorks.Common.RootSites.TextSelInfo

TextSelInfo is another variety of selection helper. It provides easy access to certain kinds of information in a selection. NOTE: some clients (e.g. EditingHelper.TextSelInfoBeforeEdit) depend upon the information cached in this object even after the underlying Selection has changed state.
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

공개 메소드들

메소드 설명
ContainingObject ( int level ) : int

ContainingObject info about anchor.

ContainingObject ( int level, bool fEndPoint ) : int

Level 0 returns the same object as Hvo(fEndPoint). Level 1 returns the object which contains the display of ContainingObject(0, fEndPoint). Level n returns the object which contains the display of ContainingObject(n-1, fEndPoint). Returns 0 if there was no selection or level is too large.

ContainingObjectIndex ( int level ) : int

ContainingObjectIndex info about anchor.

ContainingObjectIndex ( int level, bool fEndPoint ) : int

Level 0 returns zero. Level 1 returns the index of ContainingObject(0, fEndPoint) in property ContainingObjectTag(1, fEndPoint) of object ContainingObject(1, fEndPoint). Level n returns the index of ContainingObject(n-1, fEndPoint) in property ContainingObjectTag(n, fEndPoint) of object ContainingObject(n, fEndPoint). Returns 0 if there was no selection or level is too large (or the relevant property is atomic).

ContainingObjectTag ( int level ) : int

ContainingObjectTag info about anchor.

ContainingObjectTag ( int level, bool fEndPoint ) : int

Level 0 returns the same as Tag(fEndPoint). Level 1 returns the id of the property of ContainingObject(1, fEndPoint) which contains ContainingObject(0, fEndPoint). Level 1 returns the id of the property of ContainingObject(n, fEndPoint) which contains ContainingObject(n-1, fEndPoint). Returns 0 if there was no selection or level is too large.

Hvo ( bool fEndPoint ) : int

The id of the object that has the text property (Tag(fEndPoint) in which the selection occurs. Zero if no selection.

Levels ( bool fEndPoint ) : int

The number of layers of containing objects in the selection (Levels - 1 is the largest meaningful argument to pass to any of the containing object methods).

SelectedProperty ( bool fEndPoint ) : ITsString

The string in which the selection occurs...if there's a difference, passing true gets the end-point string, false the anchor string. Both null if no selection.

Tag ( bool fEndPoint ) : int

The id of the string property in which the selection occurs. Pass true for the property in which the end point occurs, false for anchor. Zero if no selection.

TextSelInfo ( IVwRootBox rootbox ) : System

Construct a TextSelInfo from the current selection of the root box.

TextSelInfo ( IVwSelection sel ) : System

Initializes a new instance of the T:TextSelInfo class.

WsAlt ( bool fEndPoint ) : int

The writing system alternative of the selection. Note that this is not necessarily the writing system of the selected text, or even the character adjacent to the selected end point; it identifies an alternative in a multilingual alternative property, and is zero if there is no selection or if the selected property is not multilingual.

비공개 메소드들

메소드 설명
Init ( ) : void

Do remaining initialization once we (might) have a selection.

메소드 상세

ContainingObject() 공개 메소드

ContainingObject info about anchor.
public ContainingObject ( int level ) : int
level int
리턴 int

ContainingObject() 공개 메소드

Level 0 returns the same object as Hvo(fEndPoint). Level 1 returns the object which contains the display of ContainingObject(0, fEndPoint). Level n returns the object which contains the display of ContainingObject(n-1, fEndPoint). Returns 0 if there was no selection or level is too large.
public ContainingObject ( int level, bool fEndPoint ) : int
level int
fEndPoint bool
리턴 int

ContainingObjectIndex() 공개 메소드

ContainingObjectIndex info about anchor.
public ContainingObjectIndex ( int level ) : int
level int
리턴 int

ContainingObjectIndex() 공개 메소드

Level 0 returns zero. Level 1 returns the index of ContainingObject(0, fEndPoint) in property ContainingObjectTag(1, fEndPoint) of object ContainingObject(1, fEndPoint). Level n returns the index of ContainingObject(n-1, fEndPoint) in property ContainingObjectTag(n, fEndPoint) of object ContainingObject(n, fEndPoint). Returns 0 if there was no selection or level is too large (or the relevant property is atomic).
public ContainingObjectIndex ( int level, bool fEndPoint ) : int
level int
fEndPoint bool
리턴 int

ContainingObjectTag() 공개 메소드

ContainingObjectTag info about anchor.
public ContainingObjectTag ( int level ) : int
level int
리턴 int

ContainingObjectTag() 공개 메소드

Level 0 returns the same as Tag(fEndPoint). Level 1 returns the id of the property of ContainingObject(1, fEndPoint) which contains ContainingObject(0, fEndPoint). Level 1 returns the id of the property of ContainingObject(n, fEndPoint) which contains ContainingObject(n-1, fEndPoint). Returns 0 if there was no selection or level is too large.
public ContainingObjectTag ( int level, bool fEndPoint ) : int
level int
fEndPoint bool
리턴 int

Hvo() 공개 메소드

The id of the object that has the text property (Tag(fEndPoint) in which the selection occurs. Zero if no selection.
public Hvo ( bool fEndPoint ) : int
fEndPoint bool
리턴 int

Levels() 공개 메소드

The number of layers of containing objects in the selection (Levels - 1 is the largest meaningful argument to pass to any of the containing object methods).
public Levels ( bool fEndPoint ) : int
fEndPoint bool
리턴 int

SelectedProperty() 공개 메소드

The string in which the selection occurs...if there's a difference, passing true gets the end-point string, false the anchor string. Both null if no selection.
public SelectedProperty ( bool fEndPoint ) : ITsString
fEndPoint bool
리턴 ITsString

Tag() 공개 메소드

The id of the string property in which the selection occurs. Pass true for the property in which the end point occurs, false for anchor. Zero if no selection.
public Tag ( bool fEndPoint ) : int
fEndPoint bool
리턴 int

TextSelInfo() 공개 메소드

Construct a TextSelInfo from the current selection of the root box.
public TextSelInfo ( IVwRootBox rootbox ) : System
rootbox IVwRootBox
리턴 System

TextSelInfo() 공개 메소드

Initializes a new instance of the T:TextSelInfo class.
public TextSelInfo ( IVwSelection sel ) : System
sel IVwSelection The sel.
리턴 System

WsAlt() 공개 메소드

The writing system alternative of the selection. Note that this is not necessarily the writing system of the selected text, or even the character adjacent to the selected end point; it identifies an alternative in a multilingual alternative property, and is zero if there is no selection or if the selected property is not multilingual.
public WsAlt ( bool fEndPoint ) : int
fEndPoint bool
리턴 int