C# Class SIL.FieldWorks.SharpViews.SharpViewsTests.MockSegment

Inheritance: ILgSegment
Exibir arquivo Open project: sillsdev/FieldWorks Class Usage Examples

Public Properties

Property Type Description
DrawRangeLeft int
DrawRangeRight int
NextPositionOfRange PositionOfRangeResult
PointToCharClickPosition Point
PointToCharIchBase int
PointToCharRcDst Rect
PointToCharRcSrc Rect
PointToCharVg IVwGraphics

Private Properties

Property Type Description
OnPointToCharReturn void

Public Methods

Method Description
ArrowKeyPosition ( int ichBase, IVwGraphics _vg, int &_ich, bool &_fAssocPrev, bool fRight, bool fMovingIn, bool &_fResult ) : void
BoundingRect ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst ) : Rect
DoBoundariesCoincide ( int ichBase, IVwGraphics _vg, bool fBoundaryEnd, bool fBoundaryRight ) : bool
DrawInsertionPoint ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst, int ich, bool fAssocPrev, bool fOn, LgIPDrawMode dm ) : void
DrawRange ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst, int ichMin, int ichLim, int ydTop, int ydBottom, bool bOn, bool fIsLastLineOfSelection ) : Rect
DrawText ( int ichBase, IVwGraphics vg, Rect rcSrc, Rect rcDst, int &dxdWidth ) : void
DrawTextNoBackground ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst, int &dxdWidth ) : void

This method is used for something like a font testing program. Review (SharonC): should it be in a separate interface? HRESULT GetGlyphsAndPositions( [in] int ichBase, [in] IVwGraphics pvg, [in] RECT rcSrc, as for DrawText [in] RECT rcDst, [in] int cchMax, [out] int pcchRet, [out, size_is(cchMax)] OLECHAR prgchGlyphs, [out, size_is(cchMax)] int prgxd, [out, size_is(cchMax)] int prgyd); This method is intended for debugging only. Eventually we can get rid of it, but it seems like it is useful to keep around for a while. HRESULT GetCharData( [in] int ichBase, [in] int cchMax, [out, size_is(cchMax)] OLECHAR prgch, [out] int pcchRet); Should do exactly the same as DrawText would do if all background colors were transparent. That is, no background is ever painted.

ExtendSelectionPosition ( int ichBase, IVwGraphics _vg, int &_ich, bool fAssocPrevMatch, bool fAssocPrevNeeded, int ichAnchor, bool fRight, bool fMovingIn, bool &_fRet ) : void
Extent ( int ichBase, IVwGraphics vg, int &x, int &y ) : void
GetActualWidth ( int ichBase, IVwGraphics vg, Rect rcSrc, Rect rcDst, int &dxdWidth ) : void
GetCharPlacement ( int ichBase, IVwGraphics _vg, int ichMin, int ichLim, Rect rcSrc, Rect rcDst, bool fSkipSpace, int cxdMax, int &_cxd, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgxdLefts, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgxdRights, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgydUnderTops ) : void
IsValidInsertionPoint ( int ichBase, IVwGraphics _vg, int ich ) : LgIpValidResult
MockSegment ( int len, int width, int ws, LgEndSegmentType est ) : System
PointToChar ( int ichBase, IVwGraphics vg, Rect rcSrc, Rect rcDst, Point tdClickPosition, int &ich, bool &assocPrev ) : void
PositionOfRange ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst, int ichMin, int ichLim, int ydTop, int ydBottom, bool fIsLastLineOfSelection, Rect &rsBounds ) : bool
PositionsOfIP ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst, int ich, bool fAssocPrev, LgIPDrawMode dm, Rect &rectPrimary, Rect &rectSecondary, bool &fPrimaryHere, bool &fSecHere ) : void
Recompute ( int ichBase, IVwGraphics _vg ) : void
SetDirectionDepth ( int ichwBase, int nNewDepth ) : void
get_Ascent ( int ichBase, IVwGraphics _vg ) : int
get_AscentOverhang ( int ichBase, IVwGraphics _vg ) : int
get_DescentOverhang ( int ichBase, IVwGraphics _vg ) : int
get_DirectionDepth ( int ichBase, int &_nDepth ) : bool
get_EndBreakWeight ( int ichBase, IVwGraphics _vg ) : LgLineBreak
get_Height ( int ichBase, IVwGraphics _vg ) : int
get_LeftOverhang ( int ichBase, IVwGraphics _vg ) : int
get_Lim ( int ichBase ) : int
get_LimInterest ( int ichBase ) : int
get_RightOverhang ( int ichBase, IVwGraphics _vg ) : int
get_RightToLeft ( int ichBase ) : bool
get_StartBreakWeight ( int ichBase, IVwGraphics _vg ) : LgLineBreak
get_Stretch ( int ichBase ) : int
get_Width ( int ichBase, IVwGraphics _vg ) : int
get_WritingSystem ( int ichBase ) : int
set_EndLine ( int ichBase, IVwGraphics _vg, bool fNewVal ) : void
set_StartLine ( int ichBase, IVwGraphics _vg, bool fNewVal ) : void
set_Stretch ( int ichBase, int xs ) : void

Private Methods

Method Description
OnPointToCharReturn ( int offset, bool assocPrev ) : void

Method Details

ArrowKeyPosition() public method

public ArrowKeyPosition ( int ichBase, IVwGraphics _vg, int &_ich, bool &_fAssocPrev, bool fRight, bool fMovingIn, bool &_fResult ) : void
ichBase int
_vg IVwGraphics
_ich int
_fAssocPrev bool
fRight bool
fMovingIn bool
_fResult bool
return void

BoundingRect() public method

public BoundingRect ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst ) : Rect
ichBase int
_vg IVwGraphics
rcSrc Rect
rcDst Rect
return Rect

DoBoundariesCoincide() public method

public DoBoundariesCoincide ( int ichBase, IVwGraphics _vg, bool fBoundaryEnd, bool fBoundaryRight ) : bool
ichBase int
_vg IVwGraphics
fBoundaryEnd bool
fBoundaryRight bool
return bool

DrawInsertionPoint() public method

public DrawInsertionPoint ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst, int ich, bool fAssocPrev, bool fOn, LgIPDrawMode dm ) : void
ichBase int
_vg IVwGraphics
rcSrc Rect
rcDst Rect
ich int
fAssocPrev bool
fOn bool
dm LgIPDrawMode
return void

DrawRange() public method

public DrawRange ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst, int ichMin, int ichLim, int ydTop, int ydBottom, bool bOn, bool fIsLastLineOfSelection ) : Rect
ichBase int
_vg IVwGraphics
rcSrc Rect
rcDst Rect
ichMin int
ichLim int
ydTop int
ydBottom int
bOn bool
fIsLastLineOfSelection bool
return Rect

DrawText() public method

public DrawText ( int ichBase, IVwGraphics vg, Rect rcSrc, Rect rcDst, int &dxdWidth ) : void
ichBase int
vg IVwGraphics
rcSrc Rect
rcDst Rect
dxdWidth int
return void

DrawTextNoBackground() public method

This method is used for something like a font testing program. Review (SharonC): should it be in a separate interface? HRESULT GetGlyphsAndPositions( [in] int ichBase, [in] IVwGraphics pvg, [in] RECT rcSrc, as for DrawText [in] RECT rcDst, [in] int cchMax, [out] int pcchRet, [out, size_is(cchMax)] OLECHAR prgchGlyphs, [out, size_is(cchMax)] int prgxd, [out, size_is(cchMax)] int prgyd); This method is intended for debugging only. Eventually we can get rid of it, but it seems like it is useful to keep around for a while. HRESULT GetCharData( [in] int ichBase, [in] int cchMax, [out, size_is(cchMax)] OLECHAR prgch, [out] int pcchRet); Should do exactly the same as DrawText would do if all background colors were transparent. That is, no background is ever painted.
public DrawTextNoBackground ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst, int &dxdWidth ) : void
ichBase int
_vg IVwGraphics
rcSrc Rect
rcDst Rect
dxdWidth int
return void

ExtendSelectionPosition() public method

public ExtendSelectionPosition ( int ichBase, IVwGraphics _vg, int &_ich, bool fAssocPrevMatch, bool fAssocPrevNeeded, int ichAnchor, bool fRight, bool fMovingIn, bool &_fRet ) : void
ichBase int
_vg IVwGraphics
_ich int
fAssocPrevMatch bool
fAssocPrevNeeded bool
ichAnchor int
fRight bool
fMovingIn bool
_fRet bool
return void

Extent() public method

public Extent ( int ichBase, IVwGraphics vg, int &x, int &y ) : void
ichBase int
vg IVwGraphics
x int
y int
return void

GetActualWidth() public method

public GetActualWidth ( int ichBase, IVwGraphics vg, Rect rcSrc, Rect rcDst, int &dxdWidth ) : void
ichBase int
vg IVwGraphics
rcSrc Rect
rcDst Rect
dxdWidth int
return void

GetCharPlacement() public method

public GetCharPlacement ( int ichBase, IVwGraphics _vg, int ichMin, int ichLim, Rect rcSrc, Rect rcDst, bool fSkipSpace, int cxdMax, int &_cxd, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgxdLefts, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgxdRights, SIL.FieldWorks.Common.COMInterfaces.ArrayPtr _rgydUnderTops ) : void
ichBase int
_vg IVwGraphics
ichMin int
ichLim int
rcSrc Rect
rcDst Rect
fSkipSpace bool
cxdMax int
_cxd int
_rgxdLefts SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_rgxdRights SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
_rgydUnderTops SIL.FieldWorks.Common.COMInterfaces.ArrayPtr
return void

IsValidInsertionPoint() public method

public IsValidInsertionPoint ( int ichBase, IVwGraphics _vg, int ich ) : LgIpValidResult
ichBase int
_vg IVwGraphics
ich int
return LgIpValidResult

MockSegment() public method

public MockSegment ( int len, int width, int ws, LgEndSegmentType est ) : System
len int
width int
ws int
est LgEndSegmentType
return System

PointToChar() public method

public PointToChar ( int ichBase, IVwGraphics vg, Rect rcSrc, Rect rcDst, Point tdClickPosition, int &ich, bool &assocPrev ) : void
ichBase int
vg IVwGraphics
rcSrc Rect
rcDst Rect
tdClickPosition Point
ich int
assocPrev bool
return void

PositionOfRange() public method

public PositionOfRange ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst, int ichMin, int ichLim, int ydTop, int ydBottom, bool fIsLastLineOfSelection, Rect &rsBounds ) : bool
ichBase int
_vg IVwGraphics
rcSrc Rect
rcDst Rect
ichMin int
ichLim int
ydTop int
ydBottom int
fIsLastLineOfSelection bool
rsBounds Rect
return bool

PositionsOfIP() public method

public PositionsOfIP ( int ichBase, IVwGraphics _vg, Rect rcSrc, Rect rcDst, int ich, bool fAssocPrev, LgIPDrawMode dm, Rect &rectPrimary, Rect &rectSecondary, bool &fPrimaryHere, bool &fSecHere ) : void
ichBase int
_vg IVwGraphics
rcSrc Rect
rcDst Rect
ich int
fAssocPrev bool
dm LgIPDrawMode
rectPrimary Rect
rectSecondary Rect
fPrimaryHere bool
fSecHere bool
return void

Recompute() public method

public Recompute ( int ichBase, IVwGraphics _vg ) : void
ichBase int
_vg IVwGraphics
return void

SetDirectionDepth() public method

public SetDirectionDepth ( int ichwBase, int nNewDepth ) : void
ichwBase int
nNewDepth int
return void

get_Ascent() public method

public get_Ascent ( int ichBase, IVwGraphics _vg ) : int
ichBase int
_vg IVwGraphics
return int

get_AscentOverhang() public method

public get_AscentOverhang ( int ichBase, IVwGraphics _vg ) : int
ichBase int
_vg IVwGraphics
return int

get_DescentOverhang() public method

public get_DescentOverhang ( int ichBase, IVwGraphics _vg ) : int
ichBase int
_vg IVwGraphics
return int

get_DirectionDepth() public method

public get_DirectionDepth ( int ichBase, int &_nDepth ) : bool
ichBase int
_nDepth int
return bool

get_EndBreakWeight() public method

public get_EndBreakWeight ( int ichBase, IVwGraphics _vg ) : LgLineBreak
ichBase int
_vg IVwGraphics
return LgLineBreak

get_Height() public method

public get_Height ( int ichBase, IVwGraphics _vg ) : int
ichBase int
_vg IVwGraphics
return int

get_LeftOverhang() public method

public get_LeftOverhang ( int ichBase, IVwGraphics _vg ) : int
ichBase int
_vg IVwGraphics
return int

get_Lim() public method

public get_Lim ( int ichBase ) : int
ichBase int
return int

get_LimInterest() public method

public get_LimInterest ( int ichBase ) : int
ichBase int
return int

get_RightOverhang() public method

public get_RightOverhang ( int ichBase, IVwGraphics _vg ) : int
ichBase int
_vg IVwGraphics
return int

get_RightToLeft() public method

public get_RightToLeft ( int ichBase ) : bool
ichBase int
return bool

get_StartBreakWeight() public method

public get_StartBreakWeight ( int ichBase, IVwGraphics _vg ) : LgLineBreak
ichBase int
_vg IVwGraphics
return LgLineBreak

get_Stretch() public method

public get_Stretch ( int ichBase ) : int
ichBase int
return int

get_Width() public method

public get_Width ( int ichBase, IVwGraphics _vg ) : int
ichBase int
_vg IVwGraphics
return int

get_WritingSystem() public method

public get_WritingSystem ( int ichBase ) : int
ichBase int
return int

set_EndLine() public method

public set_EndLine ( int ichBase, IVwGraphics _vg, bool fNewVal ) : void
ichBase int
_vg IVwGraphics
fNewVal bool
return void

set_StartLine() public method

public set_StartLine ( int ichBase, IVwGraphics _vg, bool fNewVal ) : void
ichBase int
_vg IVwGraphics
fNewVal bool
return void

set_Stretch() public method

public set_Stretch ( int ichBase, int xs ) : void
ichBase int
xs int
return void

Property Details

DrawRangeLeft public_oe property

These two allow us to control where the segment will consider to be the left and right of any selection it is told to draw.
public int DrawRangeLeft
return int

DrawRangeRight public_oe property

public int DrawRangeRight
return int

NextPositionOfRange public_oe property

public PositionOfRangeResult NextPositionOfRange
return PositionOfRangeResult

PointToCharClickPosition public_oe property

public Point PointToCharClickPosition
return Point

PointToCharIchBase public_oe property

public int PointToCharIchBase
return int

PointToCharRcDst public_oe property

public Rect PointToCharRcDst
return Rect

PointToCharRcSrc public_oe property

public Rect PointToCharRcSrc
return Rect

PointToCharVg public_oe property

public IVwGraphics PointToCharVg
return IVwGraphics