C# Class SIL.FieldWorks.XWorks.MockSelection

This class mocks the (unfortunately huge) IVwSelection. Only the first couple of methods are actually used by MacroListener, others are left unimplemented. Enhance JohnT: this would be better done with some sort of dynamic mock, so that changes to parts of the interface we don't care about won't have to be made here. But we haven't settled on a mock framework for FLEx.
Inheritance: IVwSelection
Mostra file Open project: sillsdev/FieldWorks Class Usage Examples

Public Properties

Property Type Description
AnchorHvo int
AnchorIch int
AnchorTag int
AnchorWs int
EndHvo int
EndIch int
EndTag int
EndWs int
TypeToReturn VwSelType

Public Methods

Method Description
AllSelEndInfo ( bool fEndPoint, int &_ihvoRoot, int cvlsi, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgvsli, int &_tagTextProp, int &_cpropPrevious, int &_ich, int &_ws, bool &_fAssocPrev, ITsTextProps &_pttp ) : void
AllTextSelInfo ( int &_ihvoRoot, int cvlsi, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgvsli, int &_tagTextProp, int &_cpropPrevious, int &_ichAnchor, int &_ichEnd, int &_ws, bool &_fAssocPrev, int &_ihvoEnd, ITsTextProps &_pttp ) : void
CLevels ( bool fEndPoint ) : int
CompleteEdits ( VwChangeInfo &_ci ) : bool
EndPoint ( bool fEndPoint ) : IVwSelection
ExtendToStringBoundaries ( ) : void
GetFirstParaString ( ITsString &_ptss, string bstrSep, bool &_fGotItAll ) : void
GetHardAndSoftCharProps ( int cttpMax, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpttpSel, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpvpsSoft, int &_cttp ) : void
GetHardAndSoftParaProps ( int cttpMax, ITsTextProps _rgpttpPara, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpttpHard, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpvpsSoft, int &_cttp ) : void
GetParaLocation ( Rect &_rdLoc ) : void
GetParaProps ( int cttpMax, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpvps, int &_cttp ) : void
GetSelectionProps ( int cttpMax, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpttp, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpvps, int &_cttp ) : void
GetSelectionString ( ITsString &_ptss, string bstrSep ) : void
GrowToWord ( ) : IVwSelection
Install ( ) : void
Location ( IVwGraphics _vg, Rect rcSrc, Rect rcDst, Rect &_rdPrimary, Rect &_rdSecondary, bool &_fSplit, bool &_fEndBeforeAnchor ) : void
PropInfo ( bool fEndPoint, int ilev, int &_hvoObj, int &_tag, int &_ihvo, int &_cpropPrevious, IVwPropertyStore &_pvps ) : void
ReplaceWithTsString ( ITsString _tss ) : void
SetIPLocation ( bool fTopLine, int xdPos ) : void
SetSelectionProps ( int cttp, ITsTextProps _rgpttp ) : void
SetTypingProps ( ITsTextProps _ttp ) : void
TextSelInfo ( bool fEndPoint, ITsString &ptss, int &ich, bool &fAssocPrev, int &hvoObj, int &tag, int &ws ) : void
get_BoxCount ( bool fEndPoint, int iLevel ) : int
get_BoxDepth ( bool fEndPoint ) : int
get_BoxIndex ( bool fEndPoint, int iLevel ) : int
get_BoxType ( bool fEndPoint, int iLevel ) : VwBoxType
get_Follows ( IVwSelection _sel ) : bool
get_ParagraphOffset ( bool fEndPoint ) : int

Method Details

AllSelEndInfo() public method

public AllSelEndInfo ( bool fEndPoint, int &_ihvoRoot, int cvlsi, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgvsli, int &_tagTextProp, int &_cpropPrevious, int &_ich, int &_ws, bool &_fAssocPrev, ITsTextProps &_pttp ) : void
fEndPoint bool
_ihvoRoot int
cvlsi int
_rgvsli SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_tagTextProp int
_cpropPrevious int
_ich int
_ws int
_fAssocPrev bool
_pttp ITsTextProps
return void

AllTextSelInfo() public method

public AllTextSelInfo ( int &_ihvoRoot, int cvlsi, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgvsli, int &_tagTextProp, int &_cpropPrevious, int &_ichAnchor, int &_ichEnd, int &_ws, bool &_fAssocPrev, int &_ihvoEnd, ITsTextProps &_pttp ) : void
_ihvoRoot int
cvlsi int
_rgvsli SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_tagTextProp int
_cpropPrevious int
_ichAnchor int
_ichEnd int
_ws int
_fAssocPrev bool
_ihvoEnd int
_pttp ITsTextProps
return void

CLevels() public method

public CLevels ( bool fEndPoint ) : int
fEndPoint bool
return int

CompleteEdits() public method

public CompleteEdits ( VwChangeInfo &_ci ) : bool
_ci VwChangeInfo
return bool

EndPoint() public method

public EndPoint ( bool fEndPoint ) : IVwSelection
fEndPoint bool
return IVwSelection

ExtendToStringBoundaries() public method

public ExtendToStringBoundaries ( ) : void
return void

GetFirstParaString() public method

public GetFirstParaString ( ITsString &_ptss, string bstrSep, bool &_fGotItAll ) : void
_ptss ITsString
bstrSep string
_fGotItAll bool
return void

GetHardAndSoftCharProps() public method

public GetHardAndSoftCharProps ( int cttpMax, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpttpSel, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpvpsSoft, int &_cttp ) : void
cttpMax int
_rgpttpSel SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_rgpvpsSoft SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_cttp int
return void

GetHardAndSoftParaProps() public method

public GetHardAndSoftParaProps ( int cttpMax, ITsTextProps _rgpttpPara, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpttpHard, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpvpsSoft, int &_cttp ) : void
cttpMax int
_rgpttpPara ITsTextProps
_rgpttpHard SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_rgpvpsSoft SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_cttp int
return void

GetParaLocation() public method

public GetParaLocation ( Rect &_rdLoc ) : void
_rdLoc SIL.Utils.Rect
return void

GetParaProps() public method

public GetParaProps ( int cttpMax, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpvps, int &_cttp ) : void
cttpMax int
_rgpvps SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_cttp int
return void

GetSelectionProps() public method

public GetSelectionProps ( int cttpMax, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpttp, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgpvps, int &_cttp ) : void
cttpMax int
_rgpttp SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_rgpvps SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_cttp int
return void

GetSelectionString() public method

public GetSelectionString ( ITsString &_ptss, string bstrSep ) : void
_ptss ITsString
bstrSep string
return void

GrowToWord() public method

public GrowToWord ( ) : IVwSelection
return IVwSelection

Install() public method

public Install ( ) : void
return void

Location() public method

public Location ( IVwGraphics _vg, Rect rcSrc, Rect rcDst, Rect &_rdPrimary, Rect &_rdSecondary, bool &_fSplit, bool &_fEndBeforeAnchor ) : void
_vg IVwGraphics
rcSrc SIL.Utils.Rect
rcDst SIL.Utils.Rect
_rdPrimary SIL.Utils.Rect
_rdSecondary SIL.Utils.Rect
_fSplit bool
_fEndBeforeAnchor bool
return void

PropInfo() public method

public PropInfo ( bool fEndPoint, int ilev, int &_hvoObj, int &_tag, int &_ihvo, int &_cpropPrevious, IVwPropertyStore &_pvps ) : void
fEndPoint bool
ilev int
_hvoObj int
_tag int
_ihvo int
_cpropPrevious int
_pvps IVwPropertyStore
return void

ReplaceWithTsString() public method

public ReplaceWithTsString ( ITsString _tss ) : void
_tss ITsString
return void

SetIPLocation() public method

public SetIPLocation ( bool fTopLine, int xdPos ) : void
fTopLine bool
xdPos int
return void

SetSelectionProps() public method

public SetSelectionProps ( int cttp, ITsTextProps _rgpttp ) : void
cttp int
_rgpttp ITsTextProps
return void

SetTypingProps() public method

public SetTypingProps ( ITsTextProps _ttp ) : void
_ttp ITsTextProps
return void

TextSelInfo() public method

public TextSelInfo ( bool fEndPoint, ITsString &ptss, int &ich, bool &fAssocPrev, int &hvoObj, int &tag, int &ws ) : void
fEndPoint bool
ptss ITsString
ich int
fAssocPrev bool
hvoObj int
tag int
ws int
return void

get_BoxCount() public method

public get_BoxCount ( bool fEndPoint, int iLevel ) : int
fEndPoint bool
iLevel int
return int

get_BoxDepth() public method

public get_BoxDepth ( bool fEndPoint ) : int
fEndPoint bool
return int

get_BoxIndex() public method

public get_BoxIndex ( bool fEndPoint, int iLevel ) : int
fEndPoint bool
iLevel int
return int

get_BoxType() public method

public get_BoxType ( bool fEndPoint, int iLevel ) : VwBoxType
fEndPoint bool
iLevel int
return VwBoxType

get_Follows() public method

public get_Follows ( IVwSelection _sel ) : bool
_sel IVwSelection
return bool

get_ParagraphOffset() public method

public get_ParagraphOffset ( bool fEndPoint ) : int
fEndPoint bool
return int

Property Details

AnchorHvo public_oe property

public int AnchorHvo
return int

AnchorIch public_oe property

public int AnchorIch
return int

AnchorTag public_oe property

public int AnchorTag
return int

AnchorWs public_oe property

public int AnchorWs
return int

EndHvo public_oe property

public int EndHvo
return int

EndIch public_oe property

public int EndIch
return int

EndTag public_oe property

public int EndTag
return int

EndWs public_oe property

public int EndWs
return int

TypeToReturn public_oe property

public VwSelType TypeToReturn
return VwSelType