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

파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
s_mockedSelectionHelper SelectionHelper

Private Properties

프로퍼티 타입 설명
AppendLevel void
ContraryLimit SelLimitType
GetIndex int
GetSelEndInfo bool
GetSelInfo SelInfo
GetSelectionProps void
GetWsOfSelection int
InsertLevel void
IsEnd bool
MakeRangeSelection IVwSelection
OnRootSiteDisposed void
RemoveLevel void
RemoveLevelAt void

공개 메소드들

메소드 설명
AppendLevel ( int tag, int ihvo, int ws ) : void

Appends a selection level for the specified tag.

Create ( IVwRootSite rootSite ) : SelectionHelper

Create a SelectionHelper with the information about the current selection.

Create ( IVwSelection vwSel, IVwRootSite rootSite ) : SelectionHelper

Create a SelectionHelper with the information about the current selection.

GetAssocPrev ( SelLimitType type ) : bool

Indicates whether of not the insertion point should be associated with the characters immediately preceding it in the view (default) or not.

GetCurrSelectionProps ( ITsTextProps &vttp, IVwPropertyStore &vvps ) : void

Gets the selection props for the current selection

GetFirstWsOfSelection ( IVwSelection vwsel ) : int

Retrieve the first language writing system used by the given selection.

ENHANCE JohnT: Should this be a COM method for IVwSelection?

GetHardAndSoftCharProps ( IVwSelection vwSel, ITsTextProps &vttp, IVwPropertyStore &vvpsSoft, int &cttp ) : void

This is like GetSelectionProps, except that the vvpsSoft items include all formatting MINUS the hard formatting in the text properties (ie, those derived by the view constructor and styles).

GetIch ( SelLimitType type ) : int

Gets the 0-based index of the character for the given limit of the selection.

GetIhvoRoot ( SelLimitType type ) : int

Gets the index of the root object for the given limit of the selection. This is 0 for views that don't display mutliple root objects).

GetLevelForTag ( int tag ) : int

Returns the level number of the specified tag for this selection. NOTE: This version only searches the anchor for the specified tag.

GetLevelForTag ( int tag, SelLimitType limitType ) : int

Returns the level number of the specified tag for this selection.

GetLevelInfo ( SelLimitType type ) : SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]

Gets the array of VwSelLevInfo. Array elements should indicate the chain of objects that needs to be traversed to get from the root object to object where the selection is to be made. The tag for item n should be the flid in which the children of the root object are owned. The 0th element of this array must have its tag value set to BaseStText.StTextTags.kflidParagraphs. This is set automatically whenever the array is resized using Cvsli.

GetLevelInfoForTag ( int tag ) : SIL.FieldWorks.Common.COMInterfaces.SelLevInfo

Returns the selection level info for the specified tag found in the level info for this selection. NOTE: This version only searches the anchor for the specified tag.

GetLevelInfoForTag ( int tag, SelLimitType limitType ) : SIL.FieldWorks.Common.COMInterfaces.SelLevInfo

Returns the selection level info for the specified tag found in the level info for this selection.

GetLevelInfoForTag ( int tag, SIL.FieldWorks.Common.COMInterfaces.SelLevInfo &selLevInfo ) : bool

Retrieves the selection level info for the specified tag found in the level info for this selection. NOTE: This version only searches the anchor for the specified tag.

GetLevelInfoForTag ( int tag, SelLimitType limitType, SIL.FieldWorks.Common.COMInterfaces.SelLevInfo &selLevInfo ) : bool

Retrieves the selection level info for the specified tag found in the level info for this selection.

GetLocation ( ) : Point

Get the location of the selection TODO: Make this work in PrintLayout view

GetNumberOfLevels ( SelLimitType type ) : int

Gets the number of levels needed to traverse the view objects to reach the given limit of the selection.

GetNumberOfPreviousProps ( SelLimitType type ) : int

Gets the number of previous elements for the given limit of the selection

GetParaProps ( IVwSelection vwSel, IVwPropertyStore &vvps, int &cvps ) : void

Gets the paragraph properties for the specified IVwSelection

GetSelProps ( SelLimitType type ) : ITsTextProps

Get the text props associated with the given end of the selection.

GetSelectionInfo ( IVwSelection vwSel, IVwRootSite rootSite ) : SelectionHelper

Gets all information about a selection by calling IVwSelection.AllTextSelInfo.

GetTextPropId ( SelLimitType type ) : int

Gets the text property that occurs at the indicated end of the selection.

GetTss ( SelLimitType limit ) : ITsString

Get the TsString of the property where the given selection limit is located. This gets the entire TSS of the paragraph, not just the selected portion.

GetWritingSystem ( SelLimitType type ) : int

Get the writing system associated with the insertion point.

Note: If you need the writing system for the selection, you should use GetFirstWsOfSelection.

GetWsOfEntireSelection ( IVwSelection vwsel ) : int

Retrieve the language writing system used by the given selection. If the selection has no writing system or contains more than one writing system, zero is returned.

ENHANCE JohnT (DaveO): This should this be a COM method for IVwSelection

InsertLevel ( int iLev, int tag, int ihvo, int ws ) : void

Appends a selection level for the specified tag.

IsEditable ( ITsTextProps ttp, IVwPropertyStore vps ) : bool

Determine if text that belongs to ttp and vps is editable.

IsEditable ( IVwSelection sel ) : bool

Determine if selection is editable

IsFlidInLevelInfo ( int flid, SelLimitType limitType ) : bool

Determines whether the specified flid is located in the level info for the selection

MakeBest ( IVwRootSite rootsite, bool fMakeVisible ) : IVwSelection

The requested anchor and endpoint may be beyond the end of the string. Try to make a selection as near the end of the string as possible.

MakeBest ( bool fMakeVisible ) : IVwSelection

The requested anchor and endpoint may be beyond the end of the string. Try to make a selection as near the end of the string as possible.

MakeRangeSelection ( IVwRootBox rootBox, bool fInstall ) : IVwSelection

Make a range selection based upon our saved selection info. NOTE: Installing the selection may trigger side effects that will invalidate the selection. Callers should check to make sure the selection is still valid before using it.

ReduceSelectionToIp ( IVwRootSite rootSite, SelLimitType limit, bool fMakeVisible ) : SelectionHelper

Reduce a range selection to a simple insertion point, specifying which limit of the range selection to use as the position for the new IP.

ReduceSelectionToIp ( IVwRootSite rootSite, SelLimitType limit, bool fMakeVisible, bool fInstall ) : SelectionHelper

Reduce a range selection to a simple insertion point, specifying which limit of the range selection to use as the position for the new IP.

ReduceSelectionToIp ( SelLimitType limit, bool fMakeVisible, bool fInstall ) : SelectionHelper

Gets a (new) selection helper that represents an insertion point at the specified limit of this selection

ReduceToIp ( SelLimitType limit, bool fMakeVisible, bool fInstall ) : IVwSelection

This is the workhorse that actually reduces a range selection to a simple insertion point, given the specified index to indicate the limit where the IP is to be created.

ReduceToIp ( SelLimitType limit ) : void

Reduces this selection to an insertion point at the specified limit. Will not install or make visible.

RemoveLevel ( int tag ) : void

Removes the selection level for the specified tag.

RemoveLevelAt ( int ilev ) : void

Remove the specified level from the SelLevInfo for both ends.

RestoreScrollPos ( ) : void

Scrolls the selection to its original scroll position.

RestoreSelectionAndScrollPos ( ) : bool

Makes a selection then scrolls the window so the IP is at the same vertical position it was when this selection helper object was created. This method is used mainly after reconstructing a view. After reconstruction, the desire is to not only have the IP back in the data where it was before reconstruction, but to have the same number of pixels between the IP and the top of the view. This method does it's best to do this.

SelectionHelper ( ) : System

The default constructor must be followed by a call to SetSelection before it will really be useful

SelectionHelper ( SelectionHelper src ) : System

Copy constructor

SetAssocPrev ( SelLimitType type, bool value ) : void

Indicates whether of not the insertion point should be associated with the characters immediately preceding it in the view (default) or not.

SetIPAfterUOW ( ) : void

Make an insertion point based upon our saved anchor selection info. It will not be set until after the unit of work.

SetIPAfterUOW ( IVwRootSite rootSite ) : void

Make an insertion point based upon our saved anchor selection info. It will not be set until after the unit of work.

SetIch ( SelLimitType type, int value ) : void

Sets the 0-based index of the character for the given limit of the selection. If appropriate records that the end of the selection has been set explicitly.

SetIhvoRoot ( SelLimitType type, int value ) : void

Sets the index of the root object for the given limit of the selection. This is 0 for views that don't display mutliple root objects).

SetLevelInfo ( SelLimitType type, SIL.FieldWorks.Common.COMInterfaces.SelLevInfo value ) : void

Sets the array of SelLevInfo.

SetNumberOfLevels ( SelLimitType type, int value ) : void

Sets the number of levels needed to traverse the view objects to reach the given limit of the selection.

SetNumberOfPreviousProps ( SelLimitType type, int value ) : void

Sets the number of previous elements for the given limit of the selection

SetSelProps ( SelLimitType type, ITsTextProps value ) : void

Set the text props associated with the given end of the selection.

SetSelection ( IVwRootSite rootSite ) : IVwSelection

Sets the selection

SetSelection ( IVwRootSite rootSite, bool fInstall, bool fMakeVisible ) : IVwSelection

Sets the selection by calling IVwRootBox.MakeRangeSelection.

SetSelection ( IVwRootSite rootSite, bool fInstall, bool fMakeVisible, VwScrollSelOpts scrollOption ) : IVwSelection

Sets the selection by calling IVwRootBox.MakeRangeSelection.

SetSelection ( bool fMakeVisible ) : IVwSelection

Sets and install the selection in the previously supplied rootsite.

SetSelection ( bool fInstall, bool fMakeVisible ) : IVwSelection

Sets the selection by calling IVwRootBox.MakeRangeSelection.

SetTextPropId ( SelLimitType type, int tagTextProp ) : void

Sets the text property that occurs at the indicated end of the selection.

SetWritingSystem ( SelLimitType type, int value ) : void

Set the writing system associated with the insertion point.

Note: If you need the writing system for the selection, you should use GetFirstWsOfSelection.

UpdateScrollLocation ( ) : void

Updates the internal scroll location for this selection to be up-to-date, if possible.

보호된 메소드들

메소드 설명
SelectionHelper ( IVwSelection vwSel, IVwRootSite rootSite ) : System

Create a selection helper based on an existing selection

비공개 메소드들

메소드 설명
AppendLevel ( int tag, int ihvo, int ws, SelLimitType type ) : void

Appends a selection level for the specified tag.

ContraryLimit ( SelLimitType limit ) : SelLimitType

Returns the contrary limit

GetIndex ( SelLimitType type ) : int

Returns the index used for the appropriate limit type

GetSelEndInfo ( bool fEnd ) : bool

Get information about the selection

GetSelInfo ( SelLimitType type ) : SelInfo

Gets the internal selection info for the requested end of the selection.

GetSelectionProps ( IVwSelection vwSel, ITsTextProps &vttp, IVwPropertyStore &vvps, int &cttp ) : void
GetWsOfSelection ( IVwSelection vwsel, bool fStopAtFirstWs ) : int

This is the implementation for GetWsOfEntireSelection and GetFirstWsOfSelection. It retrieves the language writing system used by the given selection.

ENHANCE JohnT: Should this be a COM method for IVwSelection?

InsertLevel ( int iLev, int tag, int ihvo, int ws, SelLimitType type ) : void

Appends a selection level for the specified tag.

IsEnd ( SelLimitType type ) : bool

Determines whether the specified type is the end.

MakeRangeSelection ( IVwRootSite rootSite, bool fInstall ) : IVwSelection

Make a range selection based upon our saved selection info. NOTE: Installing the selection may trigger side effects that will invalidate the selection. Callers should check to make sure the selection is still valid before using it.

OnRootSiteDisposed ( object sender, EventArgs e ) : void

Called when the root site gets disposed. We can't use m_rootSite any more.

RemoveLevel ( int tag, SelLimitType type ) : void

Removes the selection level for the specified tag.

RemoveLevelAt ( int iLevel, SelLimitType type ) : void

메소드 상세

AppendLevel() 공개 메소드

Appends a selection level for the specified tag.
public AppendLevel ( int tag, int ihvo, int ws ) : void
tag int The tag.
ihvo int The index of the object to insert in the appended level
ws int HVO of the writing system, if the property is a Multitext
리턴 void

Create() 공개 정적인 메소드

Create a SelectionHelper with the information about the current selection.
public static Create ( IVwRootSite rootSite ) : SelectionHelper
rootSite IVwRootSite The root site
리턴 SelectionHelper

Create() 공개 정적인 메소드

Create a SelectionHelper with the information about the current selection.
public static Create ( IVwSelection vwSel, IVwRootSite rootSite ) : SelectionHelper
vwSel IVwSelection The selection to create a SelectionHelper object from or /// null to create it from the given RootSite
rootSite IVwRootSite The root site
리턴 SelectionHelper

GetAssocPrev() 공개 메소드

Indicates whether of not the insertion point should be associated with the characters immediately preceding it in the view (default) or not.
public GetAssocPrev ( SelLimitType type ) : bool
type SelLimitType Which end of the selection
리턴 bool

GetCurrSelectionProps() 공개 메소드

Gets the selection props for the current selection
public GetCurrSelectionProps ( ITsTextProps &vttp, IVwPropertyStore &vvps ) : void
vttp ITsTextProps Returned array of ITsTextProps in the selection
vvps IVwPropertyStore Returned array of IVwPropertyStores in the selection
리턴 void

GetFirstWsOfSelection() 공개 정적인 메소드

Retrieve the first language writing system used by the given selection.
ENHANCE JohnT: Should this be a COM method for IVwSelection?
public static GetFirstWsOfSelection ( IVwSelection vwsel ) : int
vwsel IVwSelection The selection
리턴 int

GetHardAndSoftCharProps() 공개 정적인 메소드

This is like GetSelectionProps, except that the vvpsSoft items include all formatting MINUS the hard formatting in the text properties (ie, those derived by the view constructor and styles).
public static GetHardAndSoftCharProps ( IVwSelection vwSel, ITsTextProps &vttp, IVwPropertyStore &vvpsSoft, int &cttp ) : void
vwSel IVwSelection The view Selection
vttp ITsTextProps Returned array of ITsTextProps in the selection
vvpsSoft IVwPropertyStore Returned array of IVwPropertyStores in the selection
cttp int Returned count of properties
리턴 void

GetIch() 공개 메소드

Gets the 0-based index of the character for the given limit of the selection.
public GetIch ( SelLimitType type ) : int
type SelLimitType
리턴 int

GetIhvoRoot() 공개 메소드

Gets the index of the root object for the given limit of the selection. This is 0 for views that don't display mutliple root objects).
public GetIhvoRoot ( SelLimitType type ) : int
type SelLimitType Anchor or End
리턴 int

GetLevelForTag() 공개 메소드

Returns the level number of the specified tag for this selection. NOTE: This version only searches the anchor for the specified tag.
public GetLevelForTag ( int tag ) : int
tag int The field tag to search for /// (i.e. BaseStText.StTextTags.kflidParagraphs)
리턴 int

GetLevelForTag() 공개 메소드

Returns the level number of the specified tag for this selection.
public GetLevelForTag ( int tag, SelLimitType limitType ) : int
tag int The field tag to search for /// (i.e. BaseStText.StTextTags.kflidParagraphs)
limitType SelLimitType The limit of the selection to search for the specified tag ///
리턴 int

GetLevelInfo() 공개 메소드

Gets the array of VwSelLevInfo. Array elements should indicate the chain of objects that needs to be traversed to get from the root object to object where the selection is to be made. The tag for item n should be the flid in which the children of the root object are owned. The 0th element of this array must have its tag value set to BaseStText.StTextTags.kflidParagraphs. This is set automatically whenever the array is resized using Cvsli.
public GetLevelInfo ( SelLimitType type ) : SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]
type SelLimitType type
리턴 SIL.FieldWorks.Common.COMInterfaces.SelLevInfo[]

GetLevelInfoForTag() 공개 메소드

Returns the selection level info for the specified tag found in the level info for this selection. NOTE: This version only searches the anchor for the specified tag.
Thrown if the specified tag is not found in the level /// info for the Anchor of the selection
public GetLevelInfoForTag ( int tag ) : SIL.FieldWorks.Common.COMInterfaces.SelLevInfo
tag int The field tag to search for /// (i.e. BaseStText.StTextTags.kflidParagraphs)
리턴 SIL.FieldWorks.Common.COMInterfaces.SelLevInfo

GetLevelInfoForTag() 공개 메소드

Returns the selection level info for the specified tag found in the level info for this selection.
Thrown if the specified tag is not found in the level /// info of the selection
public GetLevelInfoForTag ( int tag, SelLimitType limitType ) : SIL.FieldWorks.Common.COMInterfaces.SelLevInfo
tag int The field tag to search for /// (i.e. BaseStText.StTextTags.kflidParagraphs)
limitType SelLimitType The limit of the selection to search for the specified tag ///
리턴 SIL.FieldWorks.Common.COMInterfaces.SelLevInfo

GetLevelInfoForTag() 공개 메소드

Retrieves the selection level info for the specified tag found in the level info for this selection. NOTE: This version only searches the anchor for the specified tag.
public GetLevelInfoForTag ( int tag, SIL.FieldWorks.Common.COMInterfaces.SelLevInfo &selLevInfo ) : bool
tag int The field tag to search for /// (i.e. BaseStText.StTextTags.kflidParagraphs)
selLevInfo SIL.FieldWorks.Common.COMInterfaces.SelLevInfo The level info for the specified tag, if found; undefined /// otherwise
리턴 bool

GetLevelInfoForTag() 공개 메소드

Retrieves the selection level info for the specified tag found in the level info for this selection.
public GetLevelInfoForTag ( int tag, SelLimitType limitType, SIL.FieldWorks.Common.COMInterfaces.SelLevInfo &selLevInfo ) : bool
tag int The field tag to search for /// (i.e. BaseStText.StTextTags.kflidParagraphs)
limitType SelLimitType The limit of the selection to search for the specified tag ///
selLevInfo SIL.FieldWorks.Common.COMInterfaces.SelLevInfo The level info for the specified tag, if found; undefined /// otherwise
리턴 bool

GetLocation() 공개 메소드

Get the location of the selection TODO: Make this work in PrintLayout view
public GetLocation ( ) : Point
리턴 Point

GetNumberOfLevels() 공개 메소드

Gets the number of levels needed to traverse the view objects to reach the given limit of the selection.
public GetNumberOfLevels ( SelLimitType type ) : int
type SelLimitType
리턴 int

GetNumberOfPreviousProps() 공개 메소드

Gets the number of previous elements for the given limit of the selection
public GetNumberOfPreviousProps ( SelLimitType type ) : int
type SelLimitType Anchor or End
리턴 int

GetParaProps() 공개 정적인 메소드

Gets the paragraph properties for the specified IVwSelection
public static GetParaProps ( IVwSelection vwSel, IVwPropertyStore &vvps, int &cvps ) : void
vwSel IVwSelection The view Selection
vvps IVwPropertyStore Returned array of IVwPropertyStores in the selection
cvps int Returned count of IVwPropertyStores
리턴 void

GetSelProps() 공개 메소드

Get the text props associated with the given end of the selection.
public GetSelProps ( SelLimitType type ) : ITsTextProps
type SelLimitType Which end of the selection
리턴 ITsTextProps

GetSelectionInfo() 공개 정적인 메소드

Gets all information about a selection by calling IVwSelection.AllTextSelInfo.
public static GetSelectionInfo ( IVwSelection vwSel, IVwRootSite rootSite ) : SelectionHelper
vwSel IVwSelection The selection to get info for, or null to get current /// selection.
rootSite IVwRootSite The root site
리턴 SelectionHelper

GetTextPropId() 공개 메소드

Gets the text property that occurs at the indicated end of the selection.
public GetTextPropId ( SelLimitType type ) : int
type SelLimitType
리턴 int

GetTss() 공개 메소드

Get the TsString of the property where the given selection limit is located. This gets the entire TSS of the paragraph, not just the selected portion.
public GetTss ( SelLimitType limit ) : ITsString
limit SelLimitType the part of the selection where tss is to be retrieved (top, /// bottom, end, anchor)
리턴 ITsString

GetWritingSystem() 공개 메소드

Get the writing system associated with the insertion point.

Note: If you need the writing system for the selection, you should use GetFirstWsOfSelection.

public GetWritingSystem ( SelLimitType type ) : int
type SelLimitType Which end of the selection
리턴 int

GetWsOfEntireSelection() 공개 정적인 메소드

Retrieve the language writing system used by the given selection. If the selection has no writing system or contains more than one writing system, zero is returned.
ENHANCE JohnT (DaveO): This should this be a COM method for IVwSelection
public static GetWsOfEntireSelection ( IVwSelection vwsel ) : int
vwsel IVwSelection The selection
리턴 int

InsertLevel() 공개 메소드

Appends a selection level for the specified tag.
public InsertLevel ( int iLev, int tag, int ihvo, int ws ) : void
iLev int Index at which the level is to be inserted.
tag int The tag.
ihvo int The index of the object to insert in the appended level
ws int HVO of the writing system, if the property is a Multitext
리턴 void

IsEditable() 공개 정적인 메소드

Determine if text that belongs to ttp and vps is editable.
public static IsEditable ( ITsTextProps ttp, IVwPropertyStore vps ) : bool
ttp ITsTextProps
vps IVwPropertyStore
리턴 bool

IsEditable() 공개 정적인 메소드

Determine if selection is editable
public static IsEditable ( IVwSelection sel ) : bool
sel IVwSelection Selection
리턴 bool

IsFlidInLevelInfo() 공개 메소드

Determines whether the specified flid is located in the level info for the selection
public IsFlidInLevelInfo ( int flid, SelLimitType limitType ) : bool
flid int The flid.
limitType SelLimitType Type of the limit.
리턴 bool

MakeBest() 공개 메소드

The requested anchor and endpoint may be beyond the end of the string. Try to make a selection as near the end of the string as possible.
public MakeBest ( IVwRootSite rootsite, bool fMakeVisible ) : IVwSelection
rootsite IVwRootSite The rootsite that will try take the selection
fMakeVisible bool Indicates whether to scroll the selection into view ///
리턴 IVwSelection

MakeBest() 공개 메소드

The requested anchor and endpoint may be beyond the end of the string. Try to make a selection as near the end of the string as possible.
public MakeBest ( bool fMakeVisible ) : IVwSelection
fMakeVisible bool Indicates whether to scroll the selection into view ///
리턴 IVwSelection

MakeRangeSelection() 공개 메소드

Make a range selection based upon our saved selection info. NOTE: Installing the selection may trigger side effects that will invalidate the selection. Callers should check to make sure the selection is still valid before using it.
throws if unable to make an end selection
public MakeRangeSelection ( IVwRootBox rootBox, bool fInstall ) : IVwSelection
rootBox IVwRootBox
fInstall bool
리턴 IVwSelection

ReduceSelectionToIp() 공개 정적인 메소드

Reduce a range selection to a simple insertion point, specifying which limit of the range selection to use as the position for the new IP.
public static ReduceSelectionToIp ( IVwRootSite rootSite, SelLimitType limit, bool fMakeVisible ) : SelectionHelper
rootSite IVwRootSite The root site
limit SelLimitType Specify Top to place the IP at the top-most limit of the /// selection. Specify Bottom to place the IP at the bottom-most limit of the selection. /// Specify Anchor to place the IP at the point where the user initiated the selection. /// Specify End to place the IP at the point where the user completed the selection. Be /// aware the user may select text in either direction, thus the end of the selection\ /// could be visually before the anchor. For a simple insertion point or a selection /// entirely within a single StText, this parameter doesn't actually make any /// difference.
fMakeVisible bool Indicates whether to scroll the IP into view.
리턴 SelectionHelper

ReduceSelectionToIp() 공개 정적인 메소드

Reduce a range selection to a simple insertion point, specifying which limit of the range selection to use as the position for the new IP.
public static ReduceSelectionToIp ( IVwRootSite rootSite, SelLimitType limit, bool fMakeVisible, bool fInstall ) : SelectionHelper
rootSite IVwRootSite The root site
limit SelLimitType Specify Top to place the IP at the top-most limit of the /// selection. Specify Bottom to place the IP at the bottom-most limit of the selection. /// Specify Anchor to place the IP at the point where the user initiated the selection. /// Specify End to place the IP at the point where the user completed the selection. Be /// aware the user may select text in either direction, thus the end of the selection\ /// could be visually before the anchor. For a simple insertion point or a selection /// entirely within a single StText, this parameter doesn't actually make any /// difference.
fMakeVisible bool Indicates whether to scroll the IP into view.
fInstall bool True to install the created selection, false otherwise
리턴 SelectionHelper

ReduceSelectionToIp() 공개 메소드

Gets a (new) selection helper that represents an insertion point at the specified limit of this selection
public ReduceSelectionToIp ( SelLimitType limit, bool fMakeVisible, bool fInstall ) : SelectionHelper
limit SelLimitType Specify Top to place the IP at the top-most limit of the /// selection. Specify Bottom to place the IP at the bottom-most limit of the selection. /// Specify Anchor to place the IP at the point where the user initiated the selection. /// Specify End to place the IP at the point where the user completed the selection. Be /// aware the user may select text in either direction, thus the end of the selection\ /// could be visually before the anchor. For a simple insertion point or a selection /// entirely within a single StText, this parameter doesn't actually make any /// difference.
fMakeVisible bool Indicates whether to scroll the IP into view.
fInstall bool True to install the created selection, false otherwise
리턴 SelectionHelper

ReduceToIp() 공개 메소드

This is the workhorse that actually reduces a range selection to a simple insertion point, given the specified index to indicate the limit where the IP is to be created.
public ReduceToIp ( SelLimitType limit, bool fMakeVisible, bool fInstall ) : IVwSelection
limit SelLimitType The current selection limit to reduce to
fMakeVisible bool Indicates whether to scroll the IP into view.
fInstall bool True to install the created selection, false otherwise
리턴 IVwSelection

ReduceToIp() 공개 메소드

Reduces this selection to an insertion point at the specified limit. Will not install or make visible.
public ReduceToIp ( SelLimitType limit ) : void
limit SelLimitType The current selection limit to reduce to
리턴 void

RemoveLevel() 공개 메소드

Removes the selection level for the specified tag.
public RemoveLevel ( int tag ) : void
tag int The tag.
리턴 void

RemoveLevelAt() 공개 메소드

Remove the specified level from the SelLevInfo for both ends.
public RemoveLevelAt ( int ilev ) : void
ilev int
리턴 void

RestoreScrollPos() 공개 메소드

Scrolls the selection to its original scroll position.
public RestoreScrollPos ( ) : void
리턴 void

RestoreSelectionAndScrollPos() 공개 메소드

Makes a selection then scrolls the window so the IP is at the same vertical position it was when this selection helper object was created. This method is used mainly after reconstructing a view. After reconstruction, the desire is to not only have the IP back in the data where it was before reconstruction, but to have the same number of pixels between the IP and the top of the view. This method does it's best to do this.
public RestoreSelectionAndScrollPos ( ) : bool
리턴 bool

SelectionHelper() 공개 메소드

The default constructor must be followed by a call to SetSelection before it will really be useful
public SelectionHelper ( ) : System
리턴 System

SelectionHelper() 보호된 메소드

Create a selection helper based on an existing selection
protected SelectionHelper ( IVwSelection vwSel, IVwRootSite rootSite ) : System
vwSel IVwSelection
rootSite IVwRootSite
리턴 System

SelectionHelper() 공개 메소드

Copy constructor
public SelectionHelper ( SelectionHelper src ) : System
src SelectionHelper The source object
리턴 System

SetAssocPrev() 공개 메소드

Indicates whether of not the insertion point should be associated with the characters immediately preceding it in the view (default) or not.
public SetAssocPrev ( SelLimitType type, bool value ) : void
type SelLimitType Which end of the selection
value bool true to associate IP with preceding characters, otherwise /// false
리턴 void

SetIPAfterUOW() 공개 메소드

Make an insertion point based upon our saved anchor selection info. It will not be set until after the unit of work.
public SetIPAfterUOW ( ) : void
리턴 void

SetIPAfterUOW() 공개 메소드

Make an insertion point based upon our saved anchor selection info. It will not be set until after the unit of work.
public SetIPAfterUOW ( IVwRootSite rootSite ) : void
rootSite IVwRootSite
리턴 void

SetIch() 공개 메소드

Sets the 0-based index of the character for the given limit of the selection. If appropriate records that the end of the selection has been set explicitly.
public SetIch ( SelLimitType type, int value ) : void
type SelLimitType
value int
리턴 void

SetIhvoRoot() 공개 메소드

Sets the index of the root object for the given limit of the selection. This is 0 for views that don't display mutliple root objects).
public SetIhvoRoot ( SelLimitType type, int value ) : void
type SelLimitType
value int
리턴 void

SetLevelInfo() 공개 메소드

Sets the array of SelLevInfo.
public SetLevelInfo ( SelLimitType type, SIL.FieldWorks.Common.COMInterfaces.SelLevInfo value ) : void
type SelLimitType type
value SIL.FieldWorks.Common.COMInterfaces.SelLevInfo The level info
리턴 void

SetNumberOfLevels() 공개 메소드

Sets the number of levels needed to traverse the view objects to reach the given limit of the selection.
public SetNumberOfLevels ( SelLimitType type, int value ) : void
type SelLimitType
value int
리턴 void

SetNumberOfPreviousProps() 공개 메소드

Sets the number of previous elements for the given limit of the selection
public SetNumberOfPreviousProps ( SelLimitType type, int value ) : void
type SelLimitType
value int
리턴 void

SetSelProps() 공개 메소드

Set the text props associated with the given end of the selection.
public SetSelProps ( SelLimitType type, ITsTextProps value ) : void
type SelLimitType Which end of the selection
value ITsTextProps Properties to set for the selection
리턴 void

SetSelection() 공개 메소드

Sets the selection
public SetSelection ( IVwRootSite rootSite ) : IVwSelection
rootSite IVwRootSite The root site
리턴 IVwSelection

SetSelection() 공개 메소드

Sets the selection by calling IVwRootBox.MakeRangeSelection.
public SetSelection ( IVwRootSite rootSite, bool fInstall, bool fMakeVisible ) : IVwSelection
rootSite IVwRootSite The root site
fInstall bool Makes the selection the current selection
fMakeVisible bool Determines whether or not to make the selection visible. ///
리턴 IVwSelection

SetSelection() 공개 메소드

Sets the selection by calling IVwRootBox.MakeRangeSelection.
public SetSelection ( IVwRootSite rootSite, bool fInstall, bool fMakeVisible, VwScrollSelOpts scrollOption ) : IVwSelection
rootSite IVwRootSite The root site
fInstall bool Makes the selection the current selection
fMakeVisible bool Determines whether or not to make the selection visible. ///
scrollOption VwScrollSelOpts Where to scroll the selection
리턴 IVwSelection

SetSelection() 공개 메소드

Sets and install the selection in the previously supplied rootsite.
public SetSelection ( bool fMakeVisible ) : IVwSelection
fMakeVisible bool Indicates whether to scroll the selection into view ///
리턴 IVwSelection

SetSelection() 공개 메소드

Sets the selection by calling IVwRootBox.MakeRangeSelection.
public SetSelection ( bool fInstall, bool fMakeVisible ) : IVwSelection
fInstall bool Makes the selection the current selection
fMakeVisible bool Determines whether or not to make the selection visible. ///
리턴 IVwSelection

SetTextPropId() 공개 메소드

Sets the text property that occurs at the indicated end of the selection.
public SetTextPropId ( SelLimitType type, int tagTextProp ) : void
type SelLimitType Anchor or End
tagTextProp int Text property
리턴 void

SetWritingSystem() 공개 메소드

Set the writing system associated with the insertion point.

Note: If you need the writing system for the selection, you should use GetFirstWsOfSelection.

public SetWritingSystem ( SelLimitType type, int value ) : void
type SelLimitType Which end of the selection
value int Writing system
리턴 void

UpdateScrollLocation() 공개 메소드

Updates the internal scroll location for this selection to be up-to-date, if possible.
public UpdateScrollLocation ( ) : void
리턴 void

프로퍼티 상세

s_mockedSelectionHelper 공개적으로 정적으로 프로퍼티

Used for testing: holds SelectionHelper mock
public static SelectionHelper,SIL.FieldWorks.Common.RootSites s_mockedSelectionHelper
리턴 SelectionHelper