本文整理汇总了C#中IVwSelection.AllTextSelInfo方法的典型用法代码示例。如果您正苦于以下问题:C# IVwSelection.AllTextSelInfo方法的具体用法?C# IVwSelection.AllTextSelInfo怎么用?C# IVwSelection.AllTextSelInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVwSelection
的用法示例。
在下文中一共展示了IVwSelection.AllTextSelInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AllTextSelInfo
/// <summary>
/// Get an array of SelLevInfo structs from the given selection.
/// </summary>
/// <param name="vwsel"></param>
/// <param name="cvsli"></param>
/// <param name="ihvoRoot"></param>
/// <param name="tagTextProp"></param>
/// <param name="cpropPrevious"></param>
/// <param name="ichAnchor"></param>
/// <param name="ichEnd"></param>
/// <param name="ws"></param>
/// <param name="fAssocPrev"></param>
/// <param name="ihvoEnd"></param>
/// <param name="ttp"></param>
/// <returns></returns>
public static SelLevInfo[] AllTextSelInfo(IVwSelection vwsel, int cvsli,
out int ihvoRoot, out int tagTextProp, out int cpropPrevious, out int ichAnchor,
out int ichEnd, out int ws, out bool fAssocPrev, out int ihvoEnd, out ITsTextProps ttp)
{
Debug.Assert(vwsel != null);
using (ArrayPtr rgvsliPtr = MarshalEx.ArrayToNative<SelLevInfo>(cvsli))
{
vwsel.AllTextSelInfo(out ihvoRoot, cvsli, rgvsliPtr,
out tagTextProp, out cpropPrevious, out ichAnchor, out ichEnd,
out ws, out fAssocPrev, out ihvoEnd, out ttp);
return MarshalEx.NativeToArray<SelLevInfo>(rgvsliPtr, cvsli);
}
}
示例2: spyOnSelection
private ITsTextProps spyOnSelection(IVwSelection sel)
{
// See what got selected
int ihvoRoot = 0; // first rootbox
int cvsli = sel.CLevels(true); // selection levels-1 involved
cvsli--;
int tag;
int cpropPrevious;
int ichAnchor;
int ichEnd;
int ws;
bool fAssocPrev;
int ihvoEnd1;
ITsTextProps ttp;
ArrayPtr rgvsliTemp = MarshalEx.ArrayToNative(cvsli, typeof(SelLevInfo));
sel.AllTextSelInfo(out ihvoRoot, cvsli, rgvsliTemp, out tag, out cpropPrevious,
out ichAnchor, out ichEnd, out ws, out fAssocPrev, out ihvoEnd1, out ttp);
SelLevInfo[] rgvsli = (SelLevInfo[])MarshalEx.NativeToArray(rgvsliTemp, cvsli,
typeof(SelLevInfo));
// use the debugger to look at the vars. Can't get into ttp here.
return ttp;
}