|
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{
namespace UI.Controls.RichEdit
{
[Guid("8CC497C2-A1DF-11CE-8098-00AA0047BE5D")]
[SupportedOSPlatform("windows6.0.6000")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct ITextRange
:IVTable<ITextRange,ITextRange.Vtbl>,IComIID {
/// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/>
internal unsafe winmdroot.Foundation.HRESULT QueryInterface(in global::System.Guid riid, out void* ppvObject)
{
fixed (void** ppvObjectLocal = &ppvObject)
{
fixed (global::System.Guid* riidLocal = &riid)
{
winmdroot.Foundation.HRESULT __result = this.QueryInterface(riidLocal, ppvObjectLocal);
return __result;
}
}
}
public unsafe winmdroot.Foundation.HRESULT QueryInterface(global::System.Guid* riid, void** ppvObject)
{
return ((delegate *unmanaged [Stdcall]<ITextRange*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((ITextRange*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<ITextRange*,uint>)lpVtbl[1])((ITextRange*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<ITextRange*,uint>)lpVtbl[2])((ITextRange*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="GetTypeInfoCount(uint*)"/>
internal unsafe void GetTypeInfoCount(out uint pctinfo)
{
fixed (uint* pctinfoLocal = &pctinfo)
{
this.GetTypeInfoCount(pctinfoLocal);
}
}
public unsafe void GetTypeInfoCount(uint* pctinfo)
{
((delegate *unmanaged [Stdcall]<ITextRange*,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((ITextRange*)Unsafe.AsPointer(ref this), pctinfo).ThrowOnFailure();
}
public unsafe void GetTypeInfo(uint iTInfo, uint lcid, winmdroot.System.Com.ITypeInfo** ppTInfo)
{
((delegate *unmanaged [Stdcall]<ITextRange*,uint ,uint ,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((ITextRange*)Unsafe.AsPointer(ref this), iTInfo, lcid, ppTInfo).ThrowOnFailure();
}
/// <inheritdoc cref="GetIDsOfNames(global::System.Guid*, winmdroot.Foundation.PWSTR*, uint, uint, int*)"/>
internal unsafe void GetIDsOfNames(in global::System.Guid riid, ReadOnlySpan<winmdroot.Foundation.PWSTR> rgszNames, uint lcid, Span<int> rgDispId)
{
fixed (int* rgDispIdLocal = rgDispId)
{
fixed (winmdroot.Foundation.PWSTR* rgszNamesLocal = rgszNames)
{
fixed (global::System.Guid* riidLocal = &riid)
{
if (rgszNames.Length != rgDispId.Length) throw new ArgumentException();
this.GetIDsOfNames(riidLocal, rgszNamesLocal, (uint )rgDispId.Length, lcid, rgDispIdLocal);
}
}
}
}
public unsafe void GetIDsOfNames(global::System.Guid* riid, winmdroot.Foundation.PWSTR* rgszNames, uint cNames, uint lcid, int* rgDispId)
{
((delegate *unmanaged [Stdcall]<ITextRange*,global::System.Guid* ,winmdroot.Foundation.PWSTR* ,uint ,uint ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((ITextRange*)Unsafe.AsPointer(ref this), riid, rgszNames, cNames, lcid, rgDispId).ThrowOnFailure();
}
/// <inheritdoc cref="Invoke(int, global::System.Guid*, uint, winmdroot.System.Com.DISPATCH_FLAGS, winmdroot.System.Com.DISPPARAMS*, winmdroot.System.Variant.VARIANT*, winmdroot.System.Com.EXCEPINFO*, uint*)"/>
internal unsafe void Invoke(int dispIdMember, in global::System.Guid riid, uint lcid, winmdroot.System.Com.DISPATCH_FLAGS wFlags, in winmdroot.System.Com.DISPPARAMS pDispParams, winmdroot.System.Variant.VARIANT* pVarResult, winmdroot.System.Com.EXCEPINFO* pExcepInfo, uint* puArgErr)
{
fixed (winmdroot.System.Com.DISPPARAMS* pDispParamsLocal = &pDispParams)
{
fixed (global::System.Guid* riidLocal = &riid)
{
this.Invoke(dispIdMember, riidLocal, lcid, wFlags, pDispParamsLocal, pVarResult, pExcepInfo, puArgErr);
}
}
}
public unsafe void Invoke(int dispIdMember, global::System.Guid* riid, uint lcid, winmdroot.System.Com.DISPATCH_FLAGS wFlags, winmdroot.System.Com.DISPPARAMS* pDispParams, [Optional] winmdroot.System.Variant.VARIANT* pVarResult, [Optional] winmdroot.System.Com.EXCEPINFO* pExcepInfo, [Optional] uint* puArgErr)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,global::System.Guid* ,uint ,winmdroot.System.Com.DISPATCH_FLAGS ,winmdroot.System.Com.DISPPARAMS* ,winmdroot.System.Variant.VARIANT* ,winmdroot.System.Com.EXCEPINFO* ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((ITextRange*)Unsafe.AsPointer(ref this), dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetText(ITextRange* pThis, winmdroot.Foundation.BSTR* pbstr)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetText(pbstr);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the plain text in this range. The Text property is the default property of the ITextRange interface.</summary>
/// <param name="pbstr">
/// <para>Type: <b>BSTR*</b> The text.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-gettext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The <b>ITextRange::GetText</b> method returns the plain text in the range. The Text property is the default property for <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>; this is, it is automatically invoked for a range, as in the following Microsoft Visual Basic for Applications (VBA) example. <c>print range</c> Some of the examples below use this fact. The <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-settext">ITextRange::SetText</a> method substitutes <i>bstr</i> for the range text. For processing a single character, the Char property is more efficient than the Text property and does not require creating a single character range for storing a character. If the range is degenerate, the Text property lets you insert text easily. You can also delete the text in a range, as shown in the following VBA examples.</para>
/// <para><c>range.delete</c> <c>range = ""</c> You can use the <b>Text</b> property to copy plain text from one place to another, simply by setting one range equal to another. (This is quite different from the <b>Duplicate</b> property; for more information, see <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-getduplicate">ITextRange::GetDuplicate</a>). The following Microsoft Visual Basic example statement sets the text in the range1 to that in range2. <c>range1 = range2 ' Replace range1's text by range2's</c> The ranges can be in different stories or even in different applications. However, they do imply copying the text first into a <b>BSTR</b> and then from that string to the target location. For large amounts of text, the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-copy">ITextRange::Copy</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-paste">ITextRange::Paste</a> methods can be faster, since they can perform the copy directly from source to target and with any format supported by the source and target. The text returned by the Text property is given in Unicode. The end-of-paragraph mark may be given by 0x2029 (the Unicode Paragraph Separator), or by carriage return/line feed (CR/LF) (0xd, 0xa), or by a carriage return alone, depending on the original file. Microsoft Word uses a carriage return alone, unless it reads another choice in from a file, the clipboard, or an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a>. The placeholder for an embedded object is given by the special character, <b>WCH_EMBEDDING</b>, which has the Unicode value 0xFFFC.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-gettext#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetText(winmdroot.Foundation.BSTR* pbstr)
{
return ((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((ITextRange*)Unsafe.AsPointer(ref this), pbstr);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetText(ITextRange* pThis, winmdroot.Foundation.BSTR bstr)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetText(bstr);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sets the text in this range.</summary>
/// <param name="bstr">
/// <para>Type: <b>BSTR</b> Text that replaces the current text in this range. If null, the current text is deleted.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-settext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><b>ITextRange::SetText</b> replaces the text in the range with the new text. In contrast, <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextselection-typetext">TypeText</a> replaces the selection with the text <i>bstr</i> and leaves the selection as an insertion point just following the inserted text, just as if you had typed the text in. For UI selection behavior, see <b>TypeText</b>. If, after you call <b>ITextRange::SetText</b>, you call <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-gettext">ITextRange::GetText</a>, you get back the same text that you set with the <b>ITextRange::SetText</b> method (unless some other range has changed that text in between the calls).</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-settext#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public void SetText(winmdroot.Foundation.BSTR bstr)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.BSTR ,winmdroot.Foundation.HRESULT>)lpVtbl[8])((ITextRange*)Unsafe.AsPointer(ref this), bstr).ThrowOnFailure();
}
/// <inheritdoc cref="GetChar(int*)"/>
internal unsafe void GetChar(out int pChar)
{
fixed (int* pCharLocal = &pChar)
{
this.GetChar(pCharLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetChar(ITextRange* pThis, int* pChar)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetChar(pChar);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the character at the start position of the range.</summary>
/// <param name="pChar">
/// <para>Type: <b>long*</b> The start character position of the range.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getchar#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If <i>pChar</i> is null, the method fails and it returns E_INVALIDARG.</para>
/// </returns>
/// <remarks>
/// <para>The following Microsoft Visual Basic example sets <i>ch</i> equal to the character at the start of the range.</para>
/// <para><c>ch = r.Char</c> Similarly, <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-setchar">ITextRange::SetChar</a> overwrites the character at the start of the range with the specified character. The characters retrieved and set by these methods are <b>LONG</b> variables, which hide the way that they are stored in the backing store (as bytes, words, variable-length, and so forth), and they do not require using a <b>BSTR</b>. The Char property, which can do most things that a characters collection can, has two big advantages: </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getchar#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetChar(int* pChar)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[9])((ITextRange*)Unsafe.AsPointer(ref this), pChar).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetChar(ITextRange* pThis, int Char)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetChar(Char);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sets the character at the starting position of the range.</summary>
/// <param name="Char">
/// <para>Type: <b>long</b> New value for character at the starting position.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setchar#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><b>ITextRange::SetChar</b> lets you specify the precise character code to use. However, string literals with similar looking glyphs can be misleading. The characters set by this method are <b>LONG</b> instead of a <b>BSTR</b>. This hides the way that they are stored in the backing store, (as bytes, words, variable-length, and so forth). Frequently on systems that do not have automatic word-wrapping, documents have hard carriage returns inserted just for line breaks. The following code shows a simple, but not perfect, way to convert such hard carriage returns back to blanks for the story that is associated with the range r.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setchar#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public void SetChar(int Char)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,winmdroot.Foundation.HRESULT>)lpVtbl[10])((ITextRange*)Unsafe.AsPointer(ref this), Char).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetDuplicate(ITextRange* pThis, winmdroot.UI.Controls.RichEdit.ITextRange** ppRange)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetDuplicate(ppRange);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets a duplicate of this range object.</summary>
/// <param name="ppRange">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>**</b> The duplicate of the range.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getduplicate#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>To create an insertion point in order to traverse a range, first duplicate the range and then collapse the duplicate at its start character position. Note, a range is characterized by start and end character positions, and the story it belongs to. Even if the range is actually an <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextselection">ITextSelection</a>, the duplicate returned is an <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>. For an example, see the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-findtext">ITextRange::FindText</a> method.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getduplicate#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetDuplicate(winmdroot.UI.Controls.RichEdit.ITextRange** ppRange)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange** ,winmdroot.Foundation.HRESULT>)lpVtbl[11])((ITextRange*)Unsafe.AsPointer(ref this), ppRange).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetFormattedText(ITextRange* pThis, winmdroot.UI.Controls.RichEdit.ITextRange** ppRange)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetFormattedText(ppRange);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets an ITextRange object with the specified range's formatted text.</summary>
/// <param name="ppRange">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>**</b> The <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> object with the formatted text.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getformattedtext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>This method, which amounts to an alias for the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-getduplicate">ITextRange::GetDuplicate</a> method, is included to be Microsoft Visual Basic for Applications (VBA)-friendly. The method returns the formatted text in a range. If the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> does not belong to the same Text Object Model (TOM) engine, call <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-queryinterface(q)">IUnknown::QueryInterface</a> for an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> interface. Among the formats typically supported by <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> are <b>CF_TEXT</b> and <b>CF_RTF</b>. In addition, private formats can be used to reference a text solution's own internal rich-text formats. The following Microsoft Visual Basic example uses the <b>FormattedText</b> property to replace the text in a range2, by the formatted text in range1.</para>
/// <para><c>range2.FormattedText = range1.FormattedText</c></para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getformattedtext#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetFormattedText(winmdroot.UI.Controls.RichEdit.ITextRange** ppRange)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange** ,winmdroot.Foundation.HRESULT>)lpVtbl[12])((ITextRange*)Unsafe.AsPointer(ref this), ppRange).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetFormattedText(ITextRange* pThis, [Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetFormattedText(pRange);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sets the formatted text of this range text to the formatted text of the specified range.</summary>
/// <param name="pRange">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>*</b> The formatted text to replace this range's text.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setformattedtext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> does not belong to the same Text Object Model (TOM) engine, call <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-queryinterface(q)">IUnknown::QueryInterface</a> for an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> interface. Among the formats typically supported by the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> are CF_TEXT and CF_RTF. In addition, private formats can be used to reference a text solution's own internal rich-text formats. The following Microsoft Visual Basic example uses the <b>FormattedText</b> property to replace the text in range2 with the formatted text in range1. <c>range2.FormattedText = range1.FormattedText</c></para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setformattedtext#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void SetFormattedText([Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange* ,winmdroot.Foundation.HRESULT>)lpVtbl[13])((ITextRange*)Unsafe.AsPointer(ref this), pRange).ThrowOnFailure();
}
/// <inheritdoc cref="GetStart(int*)"/>
internal unsafe void GetStart(out int pcpFirst)
{
fixed (int* pcpFirstLocal = &pcpFirst)
{
this.GetStart(pcpFirstLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetStart(ITextRange* pThis, int* pcpFirst)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetStart(pcpFirst);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the start character position of the range.</summary>
/// <param name="pcpFirst">
/// <para>Type: <b>long*</b> The start character position.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getstart#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If <i>pcpFirst</i> is null, the method fails and it returns E_INVALIDARG.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getstart">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetStart(int* pcpFirst)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[14])((ITextRange*)Unsafe.AsPointer(ref this), pcpFirst).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetStart(ITextRange* pThis, int cpFirst)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetStart(cpFirst);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sets the character position for the start of this range.</summary>
/// <param name="cpFirst">
/// <para>Type: <b>long</b> The new character position for the start of the range.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setstart#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para>Note that if <i>cpFirst</i> is greater than the range's end position, this method sets the end position equal to <i>cpFirst</i>, making the range an insertion point. If this range is the selection, the start position becomes the active end and is scrolled into view if the display isn't frozen.</para>
/// <para><a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-setend">ITextRange::SetEnd</a> sets the range's end position, and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-setrange">ITextRange::SetRange</a> sets both range ends simultaneously. The following example shows how to convert a nondegenerate range into a degenerate one (insertion point). <c>range.End = range.Start</c> Similarly, <c>range.Start = range.End</c> converts the range into an insertion point at the end position. The following example adds 1 to the end position, if it is not at the end of the story. <c>range.End = range.End + 1</c> This also makes the end position the active end of the range, and it can turn a degenerate range into a nondegenerate one.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setstart#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public void SetStart(int cpFirst)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,winmdroot.Foundation.HRESULT>)lpVtbl[15])((ITextRange*)Unsafe.AsPointer(ref this), cpFirst).ThrowOnFailure();
}
/// <inheritdoc cref="GetEnd(int*)"/>
internal unsafe void GetEnd(out int pcpLim)
{
fixed (int* pcpLimLocal = &pcpLim)
{
this.GetEnd(pcpLimLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetEnd(ITextRange* pThis, int* pcpLim)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetEnd(pcpLim);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the end character position of the range.</summary>
/// <param name="pcpLim">
/// <para>Type: <b>long*</b> The end character position.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getend#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If <i>pcpLim</i> is null, the method fails and it returns E_INVALIDARG.</para>
/// </returns>
/// <remarks>
/// <para>Although a pointer to a range remains valid when the text is edited, this is not the case for the character position. A character position is volatile; that is, it becomes invalid as soon as text is inserted or deleted before the character position. Be careful about using methods that return character position values, especially if the values are to be stored for any duration. This method is similar to the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-getstart">ITextRange::GetStart</a> method which gets the start character position of the range.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getend#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetEnd(int* pcpLim)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[16])((ITextRange*)Unsafe.AsPointer(ref this), pcpLim).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetEnd(ITextRange* pThis, int cpLim)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetEnd(cpLim);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sets the end position of the range.</summary>
/// <param name="cpLim">
/// <para>Type: <b>long</b> The new end position.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setend#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para>If the new end position is less than the start position, this method also sets the start position to <i>cp</i>; that is, the range becomes an insertion point. If this range is actually the selection, the end position becomes the active end and, if the display is not frozen, it is scrolled into view.</para>
/// <para><a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-setstart">ITextRange::SetStart</a> sets the range's start position and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-setrange">ITextRange::SetRange</a> sets both range ends simultaneously. To convert a nondegenerate range, r, into a degenerate one (insertion point) at the start position, use <c>r.End = r.Start</c> Similarly, r.Start = r.End converts r into an insertion point at the end position. To add 1 to the end position, unless it is at the end of the story, use: <c>r.End = r.End + 1</c> This also makes end position the active end, and it can turn a degenerate range into a nondegenerate one.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setend#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public void SetEnd(int cpLim)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,winmdroot.Foundation.HRESULT>)lpVtbl[17])((ITextRange*)Unsafe.AsPointer(ref this), cpLim).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetFont(ITextRange* pThis, winmdroot.UI.Controls.RichEdit.ITextFont** ppFont)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetFont(ppFont);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets an ITextFont object with the character attributes of the specified range.</summary>
/// <param name="ppFont">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextfont">ITextFont</a>**</b> The pointer to an <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextfont">ITextFont</a> object.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getfont#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If <i>ppFont</i> is null, the method fails and it returns E_INVALIDARG.</para>
/// </returns>
/// <remarks>For plain-text controls, these objects do not vary from range to range, but in rich-text solutions, they do. See the section on <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextfont">ITextFont</a> for further details.</remarks>
public unsafe void GetFont(winmdroot.UI.Controls.RichEdit.ITextFont** ppFont)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextFont** ,winmdroot.Foundation.HRESULT>)lpVtbl[18])((ITextRange*)Unsafe.AsPointer(ref this), ppFont).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetFont(ITextRange* pThis, [Optional] winmdroot.UI.Controls.RichEdit.ITextFont* pFont)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetFont(pFont);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sets this range's character attributes to those of the specified ITextFont object.</summary>
/// <param name="pFont">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextfont">ITextFont</a>*</b> A font object with the desired character format.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setfont#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>For occasional format changes, use the <b>ITextRange::SetFont</b> method. However, to make a number of character formatting changes, it is more efficient to use a font duplicate. This is because every time you execute a statement like <c>range.font.bold = tomTrue</c>, a font object is allocated and freed. However, a font duplicate can be allocated once and used many times. Furthermore, you can save the font duplicate, reset it to the default or undefined states with the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextfont-reset">Reset</a> method, and give it values as needed for your rich-text processing. For sample code that shows how to use font duplicates, see <a href="https://docs.microsoft.com/windows/desktop/Controls/using-the-text-object-model">Using a Font Duplicate</a>.</remarks>
public unsafe void SetFont([Optional] winmdroot.UI.Controls.RichEdit.ITextFont* pFont)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextFont* ,winmdroot.Foundation.HRESULT>)lpVtbl[19])((ITextRange*)Unsafe.AsPointer(ref this), pFont).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetPara(ITextRange* pThis, winmdroot.UI.Controls.RichEdit.ITextPara** ppPara)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetPara(ppPara);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets an ITextPara object with the paragraph attributes of the specified range.</summary>
/// <param name="ppPara">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextpara">ITextPara</a>**</b> The pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextpara">ITextPara</a> object.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getpara#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If <i>ppPara</i> is null, the method fails and it returns E_INVALIDARG.</para>
/// </returns>
/// <remarks>For plain-text controls, these objects do not vary from range to range, but in rich-text solutions, they do. See the section on <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextpara">ITextPara</a> for further details.</remarks>
public unsafe void GetPara(winmdroot.UI.Controls.RichEdit.ITextPara** ppPara)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextPara** ,winmdroot.Foundation.HRESULT>)lpVtbl[20])((ITextRange*)Unsafe.AsPointer(ref this), ppPara).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetPara(ITextRange* pThis, [Optional] winmdroot.UI.Controls.RichEdit.ITextPara* pPara)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetPara(pPara);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sets the paragraph attributes of this range to those of the specified ITextPara object.</summary>
/// <param name="pPara">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextpara">ITextPara</a>*</b> The paragraph object with the desired paragraph format.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setpara#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setpara">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void SetPara([Optional] winmdroot.UI.Controls.RichEdit.ITextPara* pPara)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextPara* ,winmdroot.Foundation.HRESULT>)lpVtbl[21])((ITextRange*)Unsafe.AsPointer(ref this), pPara).ThrowOnFailure();
}
/// <inheritdoc cref="GetStoryLength(int*)"/>
internal unsafe void GetStoryLength(out int pCount)
{
fixed (int* pCountLocal = &pCount)
{
this.GetStoryLength(pCountLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetStoryLength(ITextRange* pThis, int* pCount)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetStoryLength(pCount);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the count of characters in the range's story.</summary>
/// <param name="pCount">
/// <para>Type: <b>long*</b> The count of characters in the range's story.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getstorylength#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If <i>pCount</i> is null, the method fails and it returns E_INVALIDARG.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getstorylength">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetStoryLength(int* pCount)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[22])((ITextRange*)Unsafe.AsPointer(ref this), pCount).ThrowOnFailure();
}
/// <inheritdoc cref="GetStoryType(int*)"/>
internal unsafe void GetStoryType(out int pValue)
{
fixed (int* pValueLocal = &pValue)
{
this.GetStoryType(pValueLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetStoryType(ITextRange* pThis, int* pValue)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetStoryType(pValue);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Get the type of the range's story.</summary>
/// <param name="pValue">Type: <b>long*</b></param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If <i>pValue</i> is null, the method fails and it returns E_INVALIDARG.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getstorytype">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetStoryType(int* pValue)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[23])((ITextRange*)Unsafe.AsPointer(ref this), pValue).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Collapse(ITextRange* pThis, int bStart)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Collapse(bStart);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Collapses the specified text range into a degenerate point at either the beginning or end of the range.</summary>
/// <param name="bStart">
/// <para>Type: <b>long</b> Flag specifying the end to collapse at. It can be one of the following. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-collapse#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> This method returns an <b>HRESULT</b> value. If successful, it returns <b>S_OK</b>. Otherwise, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-collapse">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public void Collapse(int bStart)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,winmdroot.Foundation.HRESULT>)lpVtbl[24])((ITextRange*)Unsafe.AsPointer(ref this), bStart).ThrowOnFailure();
}
/// <inheritdoc cref="Expand(int, int*)"/>
internal unsafe void Expand(int Unit, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
this.Expand(Unit, pDeltaLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Expand(ITextRange* pThis, int Unit, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Expand(Unit, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Expands this range so that any partial units it contains are completely contained.</summary>
/// <param name="Unit">
/// <para>Type: <b>long</b> Unit to include, if it is partially within the range. The default value is <c>tomWord</c>. For a list of the other <i>Unit</i> values, see the discussion under <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-expand#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The count of characters added to the range. The value can be null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-expand#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>For example, if an insertion point is at the beginning, the end, or within a word, <b>ITextRange::Expand</b> expands the range to include that word. If the range already includes one word and part of another, <b>ITextRange::Expand</b> expands the range to include both words. <b>ITextRange::Expand</b> expands the range to include the visible portion of the range's story.</remarks>
public unsafe void Expand(int Unit, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[25])((ITextRange*)Unsafe.AsPointer(ref this), Unit, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="GetIndex(int, int*)"/>
internal unsafe void GetIndex(int Unit, out int pIndex)
{
fixed (int* pIndexLocal = &pIndex)
{
this.GetIndex(Unit, pIndexLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetIndex(ITextRange* pThis, int Unit, int* pIndex)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetIndex(Unit, pIndex);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves the story index of the Unit parameter at the specified range Start character position.</summary>
/// <param name="Unit">
/// <para>Type: <b>long</b> Unit that is indexed. For a list of possible <i>Unit</i> values, see the discussion under <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getindex#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pIndex">
/// <para>Type: <b>long*</b> The index value. The value is zero if <i>Unit</i> does not exist.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getindex#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The <b>ITextRange::GetIndex</b> method retrieves the story index of a word, line, sentence, paragraph, and so forth, at the range Start. <i>Unit</i> specifies which kind of entity to index, such as words (<b>tomWord</b>), lines (<b>tomLine</b>), sentences (<b>tomSentence</b>), or paragraphs (<b>tomParagraph</b>). For example, <b>ITextRange::GetIndex</b> sets <i>pIndex</i> equal to the line number of the first line in the range. For a range at the end of the story, <b>ITextRange::GetIndex</b>, returns the number of <i>Unit</i>s in the story. Thus, you can get the number of words, lines, objects, and so forth, in a story. The index value returned by the <b>ITextRange::GetIndex</b> method is not valid if the text is subsequently edited. Thus, users should be careful about using methods that return index values, especially if the values are to be stored for any duration. This is in contrast to a pointer to a range, which does remain valid when the text is edited.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getindex#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetIndex(int Unit, int* pIndex)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[26])((ITextRange*)Unsafe.AsPointer(ref this), Unit, pIndex).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetIndex(ITextRange* pThis, int Unit, int Index, int Extend)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetIndex(Unit, Index, Extend);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Changes this range to the specified unit of the story.</summary>
/// <param name="Unit">
/// <para>Type: <b>long</b> Unit used to index the range. For a list of unit values, see <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setindex#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Index">
/// <para>Type: <b>long</b> Index for the <i>Unit</i>. This range is relocated to the <i>Unit</i> that has this index number. If positive, the numbering of <i>Unit</i>s begins at the start of the story and proceeds forward. If negative, the numbering begins at the end of the story and proceeds backward. The start of the story corresponds to an <i>Index</i> of 1 for all units that exist, and the last unit in the story corresponds to an <i>Index</i> of -1.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setindex#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Extend">
/// <para>Type: <b>long</b> Flag that indicates the extent of the range. If zero (the default), the range is collapsed to an insertion point at the start position of the specified <i>Unit</i>. If nonzero, the range is set to the entire <i>Unit</i>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setindex#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>This method allows an application to work with line-oriented text, such as programs, in a convenient way. For example, <c>SetIndex(tomLine, 10, 0)</c> converts a range to an insertion point at the start of the tenth line.</remarks>
public void SetIndex(int Unit, int Index, int Extend)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int ,winmdroot.Foundation.HRESULT>)lpVtbl[27])((ITextRange*)Unsafe.AsPointer(ref this), Unit, Index, Extend).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetRange(ITextRange* pThis, int cpAnchor, int cpActive)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetRange(cpAnchor, cpActive);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Adjusts the range endpoints to the specified values.</summary>
/// <param name="cpAnchor">
/// <para>Type: <b>long</b> The character position for the anchor end of the range.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setrange#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="cpActive">
/// <para>Type: <b>long</b> The character position for the active end of the range.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setrange#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para>This method sets the range's start position to <c>min(cpActive, cpAnchor)</code>, and the end position to <code>max(cpActive, cpAnchor)</c>. If the range is a nondegenerate selection, <i>cpAnchor</i> is the active end, and <i>cpAnchor</i> is the anchor end. If the range is a degenerate selection, the selection is displayed at the start of the line, rather than at the end of the previous line. This method removes any other subranges this range may have. To preserve the current subranges, use <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange2-setactivesubrange">ITextRange2::SetActiveSubrange</a>.</para>
/// <para>If the text range is a selection, you can set the attributes of the selection by using the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextselection-setflags">ITextSelection::SetFlags</a> method.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setrange#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public void SetRange(int cpAnchor, int cpActive)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,winmdroot.Foundation.HRESULT>)lpVtbl[28])((ITextRange*)Unsafe.AsPointer(ref this), cpAnchor, cpActive).ThrowOnFailure();
}
/// <inheritdoc cref="InRange(winmdroot.UI.Controls.RichEdit.ITextRange*, int*)"/>
internal unsafe void InRange(winmdroot.UI.Controls.RichEdit.ITextRange* pRange, out int pValue)
{
fixed (int* pValueLocal = &pValue)
{
this.InRange(pRange, pValueLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT InRange(ITextRange* pThis, [Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange, int* pValue)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.InRange(pRange, pValue);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Determines whether this range is within or at the same text as a specified range.</summary>
/// <param name="pRange">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>*</b> Text that is compared to the current range.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-inrange#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pValue">
/// <para>Type: <b>long*</b> The comparison result. The pointer can be null. The method returns <i>pB</i> is <b>tomTrue</b> only if the range is in or at the same text as <i>pRange</i>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-inrange#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para>For range2 to be contained in range1, both ranges must be in the same story, and the limits of range2 must satisfy either of the following statements. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-inrange#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void InRange([Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange, int* pValue)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange* ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[29])((ITextRange*)Unsafe.AsPointer(ref this), pRange, pValue).ThrowOnFailure();
}
/// <inheritdoc cref="InStory(winmdroot.UI.Controls.RichEdit.ITextRange*, int*)"/>
internal unsafe void InStory(winmdroot.UI.Controls.RichEdit.ITextRange* pRange, out int pValue)
{
fixed (int* pValueLocal = &pValue)
{
this.InStory(pRange, pValueLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT InStory(ITextRange* pThis, [Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange, int* pValue)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.InStory(pRange, pValue);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Determines whether this range's story is the same as a specified range's story.</summary>
/// <param name="pRange">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>*</b> The <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> object whose story is compared to this range's story.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-instory#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pValue">
/// <para>Type: <b>long*</b> The comparison result. The pointer can be null. The <i>pB</i> parameter receives <b>tomTrue</b> if this range's story is the same as that of the <i>pRange</i>; otherwise it receives <b>tomFalse</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-instory#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the two stories are the same, the method returns <b>S_OK</b>. Otherwise, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-instory">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void InStory([Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange, int* pValue)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange* ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[30])((ITextRange*)Unsafe.AsPointer(ref this), pRange, pValue).ThrowOnFailure();
}
/// <inheritdoc cref="IsEqual(winmdroot.UI.Controls.RichEdit.ITextRange*, int*)"/>
internal unsafe void IsEqual(winmdroot.UI.Controls.RichEdit.ITextRange* pRange, out int pValue)
{
fixed (int* pValueLocal = &pValue)
{
this.IsEqual(pRange, pValueLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT IsEqual(ITextRange* pThis, [Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange, int* pValue)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.IsEqual(pRange, pValue);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Determines whether this range has the same character positions and story as those of a specified range.</summary>
/// <param name="pRange">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>*</b> The <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> object that is compared to this range.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-isequal#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pValue">
/// <para>Type: <b>long*</b> The comparison result. The pointer can be null. The <i>pB</i> parameter receives <b>tomTrue</b> if this range points at the same text (has the same start and end character positions and story) as <i>pRange</i>; otherwise it returns <b>tomFalse</b>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-isequal#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the ranges have the same character positions and story, the method returns <b>S_OK</b>. Otherwise, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para>The <b>ITextRange::IsEqual</b> method returns <b>tomTrue</b> only if the range points at the same text as <i>pRange</i>. See <a href="https://docs.microsoft.com/windows/desktop/Controls/about-text-object-model">Finding Rich Text</a> for code that compares two different pieces of text to see if they contain the same plain text and the same character formatting.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-isequal#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void IsEqual([Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange, int* pValue)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange* ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[31])((ITextRange*)Unsafe.AsPointer(ref this), pRange, pValue).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Select(ITextRange* pThis)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Select();
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sets the start and end positions, and story values of the active selection, to those of this range.</summary>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para>The active end of the new selection is at the end position. The caret for an ambiguous character position is displayed at the beginning of the line.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-select#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public void Select()
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.HRESULT>)lpVtbl[32])((ITextRange*)Unsafe.AsPointer(ref this)).ThrowOnFailure();
}
/// <inheritdoc cref="StartOf(int, int, int*)"/>
internal unsafe winmdroot.Foundation.HRESULT StartOf(int Unit, int Extend, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
winmdroot.Foundation.HRESULT __result = this.StartOf(Unit, Extend, pDeltaLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT StartOf(ITextRange* pThis, int Unit, int Extend, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.StartOf(Unit, Extend, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves the range ends to the start of the first overlapping Unit in the range.</summary>
/// <param name="Unit">
/// <para>Type: <b>long</b> Unit to use in the move operation. For a list of <i>Unit</i> values, see the discussion under <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-startof#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Extend">Type: <b>long</b></param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> Pointer to a variable that receives the number of characters that the start position is moved. It can be null. On return, <i>pDelta</i> is the signed number of characters that the insertion point or start position is moved. This value is always less than or equal to zero, because the motion is always toward the beginning of the story.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-startof#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If the range is an insertion point on a boundary between <i>Unit</i>s, <b>ITextRange::StartOf</b> does not change the start position. The <b>ITextRange::StartOf</b> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-endof">ITextRange::EndOf</a> methods differ from the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextselection-homekey">HomeKey</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextselection-endkey">EndKey</a> methods in that the latter extend from the active end, whereas <b>ITextRange::StartOf</b> extends from the start position and <b>ITextRange::EndOf</b> extends from the end position.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-startof#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT StartOf(int Unit, int Extend, int* pDelta)
{
return ((delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[33])((ITextRange*)Unsafe.AsPointer(ref this), Unit, Extend, pDelta);
}
/// <inheritdoc cref="EndOf(int, int, int*)"/>
internal unsafe winmdroot.Foundation.HRESULT EndOf(int Unit, int Extend, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
winmdroot.Foundation.HRESULT __result = this.EndOf(Unit, Extend, pDeltaLocal);
return __result;
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT EndOf(ITextRange* pThis, int Unit, int Extend, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.EndOf(Unit, Extend, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves this range's ends to the end of the last overlapping Unit in the range.</summary>
/// <param name="Unit">
/// <para>Type: <b>long</b> Unit to use. Default value: <i>tomWord</i>. For a list of the other <i>Unit</i> values, see the discussion under <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-endof#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Extend">
/// <para>Type: <b>long</b> Indicator of how the shifting of the range ends is to proceed. It can be one of the following.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-endof#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The count of characters that End is moved past. The value of the pointer can be null. On return, the value of <i>pDelta</i> is the number of characters the insertion point or End is moved <i>plus</i> 1 if a collapse occurs to the entry End. If the range includes the final CR (carriage return) (at the end of the story) and <i>Extend</i> = tomMove, then <i>pDelta</i> is set to –1, to indicate that the collapse occurred <i>before</i> the end of the range (because an insertion point cannot exist beyond the final CR).</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-endof#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>For comparison, the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-startof">ITextRange::StartOf</a> method moves the range ends to the beginning of the first overlapping <i>Unit</i> in the range. Note, the <b>ITextRange::StartOf</b> and <b>ITextRange::EndOf</b> methods differ from the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextselection-homekey">HomeKey</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextselection-endkey">EndKey</a> methods in that the latter extend from the active end, whereas <b>ITextRange::StartOf</b> extends from Start and <b>ITextRange::EndOf</b> extends from End. If the range is an insertion point on a boundary between <i>Unit</i>s, <b>ITextRange::EndOf</b> does not change End. In particular, calling <b>ITextRange::EndOf</b> (<i>tomCharacter</i>, *, *) does not change End except for an insertion point at the beginning of a story.</remarks>
public unsafe winmdroot.Foundation.HRESULT EndOf(int Unit, int Extend, int* pDelta)
{
return ((delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[34])((ITextRange*)Unsafe.AsPointer(ref this), Unit, Extend, pDelta);
}
/// <inheritdoc cref="Move(int, int, int*)"/>
internal unsafe void Move(int Unit, int Count, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
this.Move(Unit, Count, pDeltaLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Move(ITextRange* pThis, int Unit, int Count, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Move(Unit, Count, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves the insertion point forward or backward a specified number of units. If the range is nondegenerate, the range is collapsed to an insertion point at either end, depending on Count, and then is moved.</summary>
/// <param name="Unit">
/// <para>Type: <b>long</b> Unit to use. The default value is <b>tomCharacter</b>. For information on other values, see the discussion in <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-move#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Number of <i>Unit</i>s to move past. The default value is 1. If <i>Count</i> is greater than zero, motion is forward—toward the end of the story—and if <i>Count</i> is less than zero, motion is backward—toward the beginning. If <i>Count</i> is zero, the range is unchanged.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-move#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The actual number of <i>Unit</i>s the insertion point moves past. The pointer can be <b>NULL</b>. For more information, see the Remarks section.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-move#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds in moving the insertion point, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If the range is degenerate (an insertion point), this method tries to move the insertion point <i>Count</i> <i>Unit</i>s. If the range is nondegenerate and <i>Count</i> is greater than zero, this method collapses the range at the end character position, moves the resulting insertion point forward to a <i>Unit</i> boundary (if it is not already at one), and then tries to move <i>Count</i> - 1 <i>Unit</i>s forward. If the range is nondegenerate and <i>Count</i> is less than zero, this method collapses the range at the start character position, moves the resulting insertion point backward to a <i>Unit</i> boundary (if it isn't already at one), and then tries to move |<i>Count</i>| - 1 <i>Unit</i>s backward. Thus, in both cases, collapsing a nondegenerate range to an insertion point, whether moving to the start or end of the <i>Unit</i> following the collapse, counts as a <i>Unit</i>. The <b>ITextRange::Move</b> method returns <i>pDelta</i> = number of <i>Unit</i>s actually moved. This method never moves the insertion point beyond the story of this range. If <i>Count</i><i>Unit</i>s would move the insertion point before the beginning of the story, it is moved to the story beginning and <i>pDelta</i> is set accordingly. Similarly, if <i>Count</i> <i>Unit</i>s would move it beyond the end of the story, it is moved to the story end. The <b>ITextRange::Move</b> method works similarly to the UI-oriented <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextselection-moveleft">MoveLeft</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextselection-moveright">MoveRight</a> methods, except that the direction of motion is logical rather than geometrical. That is, with <b>ITextRange::Move</b> the direction is either toward the end or toward the start of the story. Depending on the language, moving toward the end of the story could be moving to the left or to the right. To get a feel for <i>Count</i>, press Ctrl+Right Arrow in a Microsoft Word document for a variety of selections. In left-to-right text, this keystroke behaves the same as <c>Move(tomWord, 1)</code>, and <code>MoveRight(tomWord, 1)</c>. <i>Count</i> corresponds to the number of times you press Ctrl+Right Arrow. For example, if you press Ctrl+Right Arrow for the selections shown in both of the following figures, you end up with an insertion point at character position 8, since this command collapses the selections at their end character positions (7 and 8, respectively) and moves to the next <b>tomWord</b> boundary. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-move#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void Move(int Unit, int Count, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[35])((ITextRange*)Unsafe.AsPointer(ref this), Unit, Count, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="MoveStart(int, int, int*)"/>
internal unsafe void MoveStart(int Unit, int Count, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
this.MoveStart(Unit, Count, pDeltaLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT MoveStart(ITextRange* pThis, int Unit, int Count, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.MoveStart(Unit, Count, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves the start position of the range the specified number of units in the specified direction.</summary>
/// <param name="Unit">
/// <para>Type: <b>long</b> Unit used in the move. The default value is <b>tomCharacter</b>. For a list of the other <i>Unit</i> values, see the discussion under <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestart#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Number of units to move. The default value is 1. If <i>Count</i> is greater than zero, motion is forward—toward the end of the story—and if <i>Count</i> is less than zero, motion is backward—toward the beginning. If <i>Count</i> is zero, the start position is unchanged.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestart#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The actual number of units that the end is moved. The value can be null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestart#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If the new start follows the old end, the new end is set equal to the new start. The motion described by <b>ITextRange::MoveStart</b> is logical rather than geometric. That is, motion is toward the end or toward the start of a story. Depending on the language, moving to the end of the story could be moving left or moving right. For more information, see <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-move">ITextRange::Move</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestart#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void MoveStart(int Unit, int Count, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[36])((ITextRange*)Unsafe.AsPointer(ref this), Unit, Count, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="MoveEnd(int, int, int*)"/>
internal unsafe void MoveEnd(int Unit, int Count, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
this.MoveEnd(Unit, Count, pDeltaLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT MoveEnd(ITextRange* pThis, int Unit, int Count, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.MoveEnd(Unit, Count, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves the end position of the range.</summary>
/// <param name="Unit">
/// <para>Type: <b>long</b> The units by which to move the end of the range. The default value is <b>tomCharacter</b>. For a list of the other unit values, see <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveend#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> The number of units to move past. The default value is 1. If <i>Count</i> is greater than zero, motion is forward—toward the end of the story—and if <i>Count</i> is less than zero, motion is backward—toward the beginning. If <i>Count</i> is zero, the end position is unchanged.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveend#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The actual number of units that the end position of the range is moved past. The value can be null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveend#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If the new end position precedes the old start position, the new start position is set equal to the new end position; that is, it becomes a degenerate range or an insertion point. The motion described by <b>ITextRange::MoveEnd</b> is logical rather than geometric. That is, motion is toward the end or toward the start of a story. Depending on the language, moving to the end of the story could be moving left or moving right. For more information, see <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-move">ITextRange::Move</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveend#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void MoveEnd(int Unit, int Count, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[37])((ITextRange*)Unsafe.AsPointer(ref this), Unit, Count, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="MoveWhile(winmdroot.System.Variant.VARIANT*, int, int*)"/>
internal unsafe void MoveWhile(in winmdroot.System.Variant.VARIANT Cset, int Count, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
fixed (winmdroot.System.Variant.VARIANT* CsetLocal = &Cset)
{
this.MoveWhile(CsetLocal, Count, pDeltaLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT MoveWhile(ITextRange* pThis, winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.MoveWhile(Cset, Count, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Starts at a specified end of a range and searches while the characters belong to the set specified by Cset and while the number of characters is less than or equal to Count.</summary>
/// <param name="Cset">
/// <para>Type: <b>VARIANT*</b> The character set to use in the match. This could be an explicit string of characters or a character-set index. For more information, see <a href="https://docs.microsoft.com/windows/desktop/Controls/about-text-object-model">Character Match Sets</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movewhile#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Maximum number of characters to move past. The default value is <b>tomForward</b>, which searches to the end of the story. If <i>Count</i> is less than zero, the search starts at the start position and goes backward — toward the beginning of the story. If <i>Count</i> is greater than zero, the search starts at the end position and goes forward — toward the end of the story.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movewhile#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The actual count of characters end is moved. This parameter can be null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movewhile#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>The motion described by <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-moveuntil">ITextRange::MoveUntil</a> is logical rather than geometric. That is, motion is toward the end or toward the start of a story. Depending on the language, moving to the end of the story could be moving left or moving right. For more information, see the discussion in <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> and the Remarks section of <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-move">ITextRange::Move</a>. The <b>ITextRange::MoveWhile</b> method is similar to <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-moveuntil">ITextRange::MoveUntil</a>, but <b>MoveWhile</b> searches as long as it finds members of the set specified by <i>Cset</i>, and there is no additional increment to the value <i>pDelta</i>. The <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-movestartwhile">ITextRange::MoveStartWhile</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-moveendwhile">ITextRange::MoveEndWhile</a> methods move the start and end, respectively, just past all contiguous characters that are found in set of characters specified by the <i>Cset</i> parameter. The <b>VARIANT</b> type is primarily intended to be used with <b>IDispatch</b> scenarios like Microsoft Visual Basic for Applications (VBA), but it can be readily used from C or C++ as well. The following C++ code illustrates how to initialize and use the <b>VARIANT</b> argument for matching a span of digits in the range r.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movewhile#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void MoveWhile(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[38])((ITextRange*)Unsafe.AsPointer(ref this), Cset, Count, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="MoveStartWhile(winmdroot.System.Variant.VARIANT*, int, int*)"/>
internal unsafe void MoveStartWhile(in winmdroot.System.Variant.VARIANT Cset, int Count, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
fixed (winmdroot.System.Variant.VARIANT* CsetLocal = &Cset)
{
this.MoveStartWhile(CsetLocal, Count, pDeltaLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT MoveStartWhile(ITextRange* pThis, winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.MoveStartWhile(Cset, Count, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves the start position of the range either Count characters, or just past all contiguous characters that are found in the set of characters specified by Cset, whichever is less.</summary>
/// <param name="Cset">
/// <para>Type: <b>VARIANT*</b> The character set to use in the match. This could be an explicit string of characters or a character-set index. For more information, see <a href="https://docs.microsoft.com/windows/desktop/Controls/about-text-object-model">Character Match Sets</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestartwhile#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Maximum number of characters to move past. The default value is <b>tomForward</b>, which searches to the end of the story. If <i>Count</i> is greater than zero, the search is forward—toward the end of the story—and if <i>Count</i> is less than zero, search is backward—toward the beginning. If <i>Count</i> is zero, the start position is unchanged.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestartwhile#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The actual count of characters that the start position is moved. This parameter can be null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestartwhile#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If the new start follows the old end, the new end is set equal to the new start. The motion described by <b>ITextRange::MoveStartWhile</b> is logical rather than geometric. That is, motion is toward the end or toward the start of a story. Depending on the language, moving to the end of the story could be moving left or moving right. For more information, see <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-move">ITextRange::Move</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestartwhile#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void MoveStartWhile(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[39])((ITextRange*)Unsafe.AsPointer(ref this), Cset, Count, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="MoveEndWhile(winmdroot.System.Variant.VARIANT*, int, int*)"/>
internal unsafe void MoveEndWhile(in winmdroot.System.Variant.VARIANT Cset, int Count, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
fixed (winmdroot.System.Variant.VARIANT* CsetLocal = &Cset)
{
this.MoveEndWhile(CsetLocal, Count, pDeltaLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT MoveEndWhile(ITextRange* pThis, winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.MoveEndWhile(Cset, Count, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves the end of the range either Count characters or just past all contiguous characters that are found in the set of characters specified by Cset, whichever is less.</summary>
/// <param name="Cset">
/// <para>Type: <b>VARIANT*</b> The character set to use in the match. This could be an explicit string of characters or a character-set index. For more information, see <a href="https://docs.microsoft.com/windows/desktop/Controls/about-text-object-model">Character Match Sets</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveendwhile#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Maximum number of characters to move past. The default value is <b>tomForward</b>, which searches to the end of the story. If <i>Count</i> is greater than zero, the search moves forward (toward the end of the story). If <i>Count</i> is less than zero, the search moves backward (toward the beginning of the story). If <i>Count</i> is zero, the end position is unchanged.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveendwhile#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The actual number of characters that the end is moved. The value can be null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveendwhile#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If the new end precedes the old start, the new start is set equal to the new end. The motion described by <b>ITextRange::MoveEndWhile</b> is logical rather than geometric. That is, motion is toward the end or toward the start of a story. Depending on the language, moving to the end of the story could be moving left or moving right. For more information, see <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-move">ITextRange::Move</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveendwhile#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void MoveEndWhile(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[40])((ITextRange*)Unsafe.AsPointer(ref this), Cset, Count, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="MoveUntil(winmdroot.System.Variant.VARIANT*, int, int*)"/>
internal unsafe void MoveUntil(in winmdroot.System.Variant.VARIANT Cset, int Count, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
fixed (winmdroot.System.Variant.VARIANT* CsetLocal = &Cset)
{
this.MoveUntil(CsetLocal, Count, pDeltaLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT MoveUntil(ITextRange* pThis, winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.MoveUntil(Cset, Count, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Searches up to Count characters for the first character in the set of characters specified by Cset. If a character is found, the range is collapsed to that point. The start of the search and the direction are also specified by Count.</summary>
/// <param name="Cset">
/// <para>Type: <b>VARIANT*</b> The character set used in the match. This could be an explicit string of characters or a character-set index. For more information, see <a href="https://docs.microsoft.com/windows/desktop/Controls/about-text-object-model">Character Match Sets</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveuntil#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Maximum number of characters to move past. The default value is <b>tomForward</b>, which searches to the end of the story. If <i>Count</i> is less than zero, the search is backward starting at the start position. If <i>Count</i> is greater than zero, the search is forward starting at the end.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveuntil#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The number of characters the insertion point is moved, plus 1 for a match if <i>Count</i> is greater than zero, and –1 for a match if <i>Count</i> less than zero. The pointer can be null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveuntil#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If no character is matched, the range is unchanged. The motion described by <b>ITextRange::MoveUntil</b> is logical rather than geometric. That is, motion is toward the end or toward the start of a story. Depending on the language, moving to the end of the story could be moving left or moving right. For more information, see the discussion in <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> and the Remarks section of <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-move">ITextRange::Move</a>. The <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-movestartuntil">ITextRange::MoveStartUntil</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-moveenduntil">ITextRange::MoveEndUntil</a> methods move the start and end, respectively, until it finds the first character that is also in the set specified by the <i>Cset</i> parameter. The <b>ITextRange::MoveUntil</b> method is similar to <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-movewhile">ITextRange::MoveWhile</a>, but there are two differences. First, <b>MoveUntil</b> moves an insertion point <i>until</i> it finds the first character that belongs to the character set specified by <i>Cset</i>. Second, in <b>MoveUntil</b> the character matched counts as an additional character in the value returned in <i>pDelta</i>. This lets you know that the character at one end of the range or the other belongs to the <i>Cset</i> even though the insertion point stays at one of the range ends. For example, suppose the range, r, is an insertion point. To see if the character at r (that is, given by r.<a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-getchar">GetChar</a>()) is in <i>Cset</i>, call</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveuntil#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void MoveUntil(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[41])((ITextRange*)Unsafe.AsPointer(ref this), Cset, Count, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="MoveStartUntil(winmdroot.System.Variant.VARIANT*, int, int*)"/>
internal unsafe void MoveStartUntil(in winmdroot.System.Variant.VARIANT Cset, int Count, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
fixed (winmdroot.System.Variant.VARIANT* CsetLocal = &Cset)
{
this.MoveStartUntil(CsetLocal, Count, pDeltaLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT MoveStartUntil(ITextRange* pThis, winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.MoveStartUntil(Cset, Count, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves the start position of the range the position of the first character found that is in the set of characters specified by Cset, provided that the character is found within Count characters of the start position.</summary>
/// <param name="Cset">
/// <para>Type: <b>VARIANT*</b> The character set to use in the match. This could be an explicit string of characters or a character-set index. For more information, see <a href="https://docs.microsoft.com/windows/desktop/Controls/about-text-object-model">Character Match Sets</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestartuntil#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Maximum number of characters to move past. The default value is <b>tomForward</b>, which searches to the end of the story. If <i>Count</i> is greater than zero, the search is forward—toward the end of the story—and if <i>Count</i> is less than zero, search is backward—toward the beginning. If <i>Count</i> is zero, the start position is unchanged.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestartuntil#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The actual number of characters the start of the range is moved, plus 1 for a match if <i>Count</i> is greater than zero, and –1 for a match if <i>Count</i> is less than zero. The value can be null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestartuntil#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If no character from <i>Cset</i> is found within <i>Count</i> positions of the start position, the range is left unchanged. If the new start follows the old end, the new end is set equal to the new start. The motion described by <b>ITextRange::MoveStartUntil</b> is logical rather than geometric. That is, motion is toward the end or toward the start of a story. Depending on the language, moving to the end of the story could be moving left or moving right. For more information, see <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-move">ITextRange::Move</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-movestartuntil#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void MoveStartUntil(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[42])((ITextRange*)Unsafe.AsPointer(ref this), Cset, Count, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="MoveEndUntil(winmdroot.System.Variant.VARIANT*, int, int*)"/>
internal unsafe void MoveEndUntil(in winmdroot.System.Variant.VARIANT Cset, int Count, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
fixed (winmdroot.System.Variant.VARIANT* CsetLocal = &Cset)
{
this.MoveEndUntil(CsetLocal, Count, pDeltaLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT MoveEndUntil(ITextRange* pThis, winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.MoveEndUntil(Cset, Count, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Moves the range's end to the character position of the first character found that is in the set of characters specified by Cset, provided that the character is found within Count characters of the range's end.</summary>
/// <param name="Cset">
/// <para>Type: <b>VARIANT*</b> The character set to use in the match. This could be an explicit string of characters or a character-set index. For more information, see <a href="https://docs.microsoft.com/windows/desktop/Controls/about-text-object-model">Character Match Sets</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveenduntil#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Maximum number of characters to move past. The default value is <b>tomForward</b>, which searches to the end of the story. If <i>Count</i> is greater than zero, the search moves forward (toward the end of the story). If <i>Count</i> is less than zero, the search moves backward (toward the beginning of the story). If <i>Count</i> is zero, the end position is unchanged.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveenduntil#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The actual number of characters that the range end is moved, plus 1 for a match if <i>Count</i> is greater than zero, and –1 for a match if <i>Count</i> is less than zero. The value can be null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveenduntil#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If no character from the set specified by <i>Cset</i> is found within <i>Count</i> positions of the range's end, the range is left unchanged. If the new end precedes the old start, the new start is set equal to the new end. The motion described by <b>ITextRange::MoveEndUntil</b> is logical rather than geometric. That is, motion is toward the end or toward the start of a story. Depending on the language, moving to the end of the story could be moving left or moving right. For more information, see <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-move">ITextRange::Move</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-moveenduntil#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void MoveEndUntil(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[43])((ITextRange*)Unsafe.AsPointer(ref this), Cset, Count, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="FindText(winmdroot.Foundation.BSTR, int, winmdroot.UI.Controls.RichEdit.tomConstants, int*)"/>
internal unsafe void FindText(winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, out int pLength)
{
fixed (int* pLengthLocal = &pLength)
{
this.FindText(bstr, Count, Flags, pLengthLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT FindText(ITextRange* pThis, winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, int* pLength)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.FindText(bstr, Count, Flags, pLength);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Searches up to Count characters for the text given by bstr. The starting position and direction are also specified by Count, and the matching criteria are given by Flags.</summary>
/// <param name="bstr">
/// <para>Type: <b>BSTR</b> String to find.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Maximum number of characters to search. It can be one of the following.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Flags">Type: <b>long</b></param>
/// <param name="pLength">
/// <para>Type: <b>long*</b> The length of string matched.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtext#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns S_FALSE. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>.</para>
/// </returns>
/// <remarks>
/// <para>The <b>ITextRange::FindText</b> method can also match special characters by using a caret (^) followed by a special letter. For a list of special characters, see the Special list available in the Microsoft Word <b>Find and Replace</b> dialog box. For example, <c>^p</code> matches the next paragraph mark. Note, <code>^c</code> can be used to represent the Clipboard contents in the string to be replaced. Thus, using <code>^c</c> in the find string enables you to search for rich text. For more details, see the Word Help files. As a comparison with the <b>ITextRange::FindText</b> method, the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-findtextstart">ITextRange::FindTextStart</a> method searches forward or backward from the range's Start <i>cp</i>, and the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-findtextend">ITextRange::FindTextEnd</a> method searches forward or backward from the range's End <i>cp</i>. For more details, see the descriptions of these methods. The following are several code snippets that show the <b>ITextRange::FindText</b> methods. Example #1. The following Microsoft Visual Basic for Applications (VBA) program prints all the /* ... */ comments in a story identified by the range r.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtext#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void FindText(winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, int* pLength)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.BSTR ,int ,winmdroot.UI.Controls.RichEdit.tomConstants ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[44])((ITextRange*)Unsafe.AsPointer(ref this), bstr, Count, Flags, pLength).ThrowOnFailure();
}
/// <inheritdoc cref="FindTextStart(winmdroot.Foundation.BSTR, int, winmdroot.UI.Controls.RichEdit.tomConstants, int*)"/>
internal unsafe void FindTextStart(winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, out int pLength)
{
fixed (int* pLengthLocal = &pLength)
{
this.FindTextStart(bstr, Count, Flags, pLengthLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT FindTextStart(ITextRange* pThis, winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, int* pLength)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.FindTextStart(bstr, Count, Flags, pLength);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Searches up to Count characters for the string, bstr, starting at the range's Start cp (cpFirst).</summary>
/// <param name="bstr">
/// <para>Type: <b>BSTR</b> The string to search for.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtextstart#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Maximum number of characters to search. It can be one of the following.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtextstart#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Flags">Type: <b>long</b></param>
/// <param name="pLength">
/// <para>Type: <b>long*</b> The length of the matched string.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtextstart#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtextstart">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void FindTextStart(winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, int* pLength)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.BSTR ,int ,winmdroot.UI.Controls.RichEdit.tomConstants ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[45])((ITextRange*)Unsafe.AsPointer(ref this), bstr, Count, Flags, pLength).ThrowOnFailure();
}
/// <inheritdoc cref="FindTextEnd(winmdroot.Foundation.BSTR, int, winmdroot.UI.Controls.RichEdit.tomConstants, int*)"/>
internal unsafe void FindTextEnd(winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, out int pLength)
{
fixed (int* pLengthLocal = &pLength)
{
this.FindTextEnd(bstr, Count, Flags, pLengthLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT FindTextEnd(ITextRange* pThis, winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, int* pLength)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.FindTextEnd(bstr, Count, Flags, pLength);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Searches up to Count characters for the string, bstr, starting from the range's End cp.</summary>
/// <param name="bstr">
/// <para>Type: <b>BSTR</b> String to search for.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtextend#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Maximum number of characters to search. It can be one of the following.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtextend#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Flags">Type: <b>long</b></param>
/// <param name="pLength">
/// <para>Type: <b>long*</b> The length of string matched.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtextend#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-findtextend">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void FindTextEnd(winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, int* pLength)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.BSTR ,int ,winmdroot.UI.Controls.RichEdit.tomConstants ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[46])((ITextRange*)Unsafe.AsPointer(ref this), bstr, Count, Flags, pLength).ThrowOnFailure();
}
/// <inheritdoc cref="Delete(int, int, int*)"/>
internal unsafe void Delete(int Unit, int Count, out int pDelta)
{
fixed (int* pDeltaLocal = &pDelta)
{
this.Delete(Unit, Count, pDeltaLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Delete(ITextRange* pThis, int Unit, int Count, int* pDelta)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Delete(Unit, Count, pDelta);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Mimics the DELETE and BACKSPACE keys, with and without the CTRL key depressed.</summary>
/// <param name="Unit">
/// <para>Type: <b>long</b> Unit to use. <i>Unit</i> can be <i>tomCharacter</i> (the default value) or <i>tomWord</i>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-delete#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Count">
/// <para>Type: <b>long</b> Number of <i>Unit</i>s to delete. If <i>Count</i>= zero, it deletes the text in the range only. If <i>Count</i> is greater than zero, <b>ITextRange::Delete</b> acts as if the DELETE key was pressed <i>Count</i> times. If <i>Count</i> is less than zero, it acts as if the BACKSPACE key was pressed <i>Count</i> times. The default value is 1. For more information, see the Remarks.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-delete#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDelta">
/// <para>Type: <b>long*</b> The count of units deleted. It can be null. The <i>pDelta</i> parameter is set equal to the number of <i>Unit</i>s deleted. Deleting the text in a nondegenerate range counts as one <i>Unit</i>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-delete#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> This method returns an <b>HRESULT</b> value. If successful, it returns <b>S_OK</b>. Otherwise it returns one of the following values. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>If <i>Count</i> = zero, this method deletes the text in the range, that is, it deletes nothing if the range is only an insertion point. If <i>Count</i> is not zero, and the range is an insertion point (that is, degenerate), | <i>Count</i>| (absolute value of <i>Count</i>) <i>Unit</i>s are deleted in the logical direction given by the sign of <i>Count</i>, where a positive value is the direction toward the end of the story, and a negative value is toward the start of the story. If <i>Count</i> is not zero, and the range is nondegenerate (contains text), the text in the range is deleted (regardless of the values of <i>Unit </i> and <i>Count</i>), thereby creating an insertion point. Then, | <i>Count</i>| - 1 <i>Unit</i>s are deleted in the logical direction given by the sign of <i>Count</i>. The text in the range can also be deleted by assigning a null string to the range (executing statement r = where r is the range). However, <b>ITextRange::Delete</b> does not require allocating a <b>BSTR</b>. Deleting the end-of-paragraph mark (CR) results in the special behavior of the Microsoft Word UI. Four cases are of particular interest: </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-delete#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void Delete(int Unit, int Count, int* pDelta)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[47])((ITextRange*)Unsafe.AsPointer(ref this), Unit, Count, pDelta).ThrowOnFailure();
}
/// <inheritdoc cref="Cut(winmdroot.System.Variant.VARIANT*)"/>
internal unsafe void Cut(out winmdroot.System.Variant.VARIANT pVar)
{
fixed (winmdroot.System.Variant.VARIANT* pVarLocal = &pVar)
{
this.Cut(pVarLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Cut(ITextRange* pThis, winmdroot.System.Variant.VARIANT* pVar)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Cut(pVar);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Cuts the plain or rich text to a data object or to the Clipboard, depending on the pVar parameter.</summary>
/// <param name="pVar">
/// <para>Type: <b>VARIANT*</b> The cut text. <i>pVar</i>->ppunkVal is the out parameter for an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> object, provided that the following conditions exist:</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-cut#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> This method returns an <b>HRESULT</b> value. If successful, it returns <b>S_OK</b>. Otherwise it returns one of the following values. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-cut">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void Cut(winmdroot.System.Variant.VARIANT* pVar)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT>)lpVtbl[48])((ITextRange*)Unsafe.AsPointer(ref this), pVar).ThrowOnFailure();
}
/// <inheritdoc cref="Copy(winmdroot.System.Variant.VARIANT*)"/>
internal unsafe void Copy(out winmdroot.System.Variant.VARIANT pVar)
{
fixed (winmdroot.System.Variant.VARIANT* pVarLocal = &pVar)
{
this.Copy(pVarLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Copy(ITextRange* pThis, winmdroot.System.Variant.VARIANT* pVar)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Copy(pVar);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Copies the text to a data object.</summary>
/// <param name="pVar">
/// <para>Type: <b>VARIANT*</b> The copied text. <i>pVar</i>->ppunkVal is the out parameter for an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> provided that the following conditions exist:</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-copy#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> This method returns an <b>HRESULT</b> value. If successful, it returns <b>S_OK</b>. Otherwise, it returns <b>E_OUTOFMEMORY</b>.</para>
/// </returns>
/// <remarks>
/// <para>The <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-cut">ITextRange::Cut</a>, <b>ITextRange::Copy</b>, and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-paste">ITextRange::Paste</a> methods let you perform the usual <b>Cut</b>, <b>Copy</b>, and <b>Paste</b> operations on a range object using an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a>, thereby not changing the contents of the clipboard. Among clipboard formats typically supported are <b>CF_TEXT</b> and <b>CF_RTF</b>. In addition, private clipboard formats can be used to reference a text solution's own internal rich text formats. To copy and replace plain text, you can use the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-gettext">ITextRange::GetText</a> <b></b> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-settext">ITextRange::SetText</a> <b></b> methods. To copy formatted text from range r1 to range r2 without using the clipboard, you can use <b>Copy</b> and <b>Paste</b> and also the <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-getformattedtext">ITextRange::GetFormattedText</a> and <a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-setformattedtext">ITextRange::SetFormattedText</a> methods, as shown in the following Microsoft Visual Basic example: <c>r2.GetFormattedText = r1.GetFormattedText</c></para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-copy#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void Copy(winmdroot.System.Variant.VARIANT* pVar)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT>)lpVtbl[49])((ITextRange*)Unsafe.AsPointer(ref this), pVar).ThrowOnFailure();
}
/// <inheritdoc cref="Paste(winmdroot.System.Variant.VARIANT*, int)"/>
internal unsafe void Paste(in winmdroot.System.Variant.VARIANT pVar, int Format)
{
fixed (winmdroot.System.Variant.VARIANT* pVarLocal = &pVar)
{
this.Paste(pVarLocal, Format);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Paste(ITextRange* pThis, winmdroot.System.Variant.VARIANT* pVar, int Format)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Paste(pVar, Format);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Pastes text from a specified data object.</summary>
/// <param name="pVar">
/// <para>Type: <b>VARIANT*</b> The <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> to paste. However, the contents of the clipboard are used if any of the following are true.</para>
/// <para><i>pVar</i> is null <i>pVar</i> punkVal is null <i>pVar</i> is not <b>VT_UNKNOWN</b> <i>pVar</i> punkVal does not return an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> when queried for one</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-paste#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Format">
/// <para>Type: <b>long</b> The clipboard format to use in the paste operation. Zero is best format, which usually is RTF, but <b>CF_UNICODETEXT</b> and other formats are also possible. The default value is zero. For more information, see <a href="https://docs.microsoft.com/windows/desktop/dataxchg/clipboard-formats">Clipboard Formats</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-paste#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>For more information, see<a href="https://docs.microsoft.com/windows/desktop/api/tom/nf-tom-itextrange-copy">ITextRange::Copy</a>.</remarks>
public unsafe void Paste(winmdroot.System.Variant.VARIANT* pVar, int Format)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,winmdroot.Foundation.HRESULT>)lpVtbl[50])((ITextRange*)Unsafe.AsPointer(ref this), pVar, Format).ThrowOnFailure();
}
/// <inheritdoc cref="CanPaste(winmdroot.System.Variant.VARIANT*, int, int*)"/>
internal unsafe void CanPaste(in winmdroot.System.Variant.VARIANT pVar, int Format, out int pValue)
{
fixed (int* pValueLocal = &pValue)
{
fixed (winmdroot.System.Variant.VARIANT* pVarLocal = &pVar)
{
this.CanPaste(pVarLocal, Format, pValueLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT CanPaste(ITextRange* pThis, winmdroot.System.Variant.VARIANT* pVar, int Format, int* pValue)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.CanPaste(pVar, Format, pValue);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Determines if a data object can be pasted, using a specified format, into the current range.</summary>
/// <param name="pVar">
/// <para>Type: <b>VARIANT*</b> The <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> to be pasted. However, the Clipboard contents are checked for pasting if any of the following are true:</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-canpaste#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Format">
/// <para>Type: <b>long</b> Clipboard format that is used. Zero represents the best format, which usually is RTF, but <b>CF_UNICODETEXT</b> and other formats are also possible. The default value is zero.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-canpaste#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pValue">
/// <para>Type: <b>long*</b> A <a href="https://docs.microsoft.com/windows/desktop/Controls/about-text-object-model">tomBool</a> value that is <b>tomTrue</b> only if the data object identified by <i>pVar</i> can be pasted, using the specified format, into the range. This parameter can null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-canpaste#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns the following COM error codes. For more information on COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-canpaste">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void CanPaste(winmdroot.System.Variant.VARIANT* pVar, int Format, int* pValue)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[51])((ITextRange*)Unsafe.AsPointer(ref this), pVar, Format, pValue).ThrowOnFailure();
}
/// <inheritdoc cref="CanEdit(int*)"/>
internal unsafe void CanEdit(out int pValue)
{
fixed (int* pValueLocal = &pValue)
{
this.CanEdit(pValueLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT CanEdit(ITextRange* pThis, int* pValue)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.CanEdit(pValue);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Determines whether the specified range can be edited.</summary>
/// <param name="pValue">
/// <para>Type: <b>long*</b> A <a href="https://docs.microsoft.com/windows/desktop/Controls/about-text-object-model">tomBool</a> value indicating whether the range can be edited. It is <b>tomTrue</b> only if the specified range can be edited. The pointer can be null.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-canedit#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If the range can be edited, the method succeeds and returns <b>S_OK</b>. If the range cannot be edited, the method fails and returns <b>S_FALSE</b>. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>.</para>
/// </returns>
/// <remarks>The range cannot be edited if any part of it is protected or if the document is read-only.</remarks>
public unsafe void CanEdit(int* pValue)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[52])((ITextRange*)Unsafe.AsPointer(ref this), pValue).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT ChangeCase(ITextRange* pThis, winmdroot.UI.Controls.RichEdit.tomConstants Type)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.ChangeCase(Type);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Changes the case of letters in this range according to the Type parameter.</summary>
/// <param name="Type">
/// <para>Type: <b>long</b> Type of case change. The default value is <i>tomLower</i>. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-changecase#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> This method returns an <b>HRESULT</b> value. If successful, it returns <b>S_OK</b>. Otherwise, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-changecase">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public void ChangeCase(winmdroot.UI.Controls.RichEdit.tomConstants Type)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.tomConstants ,winmdroot.Foundation.HRESULT>)lpVtbl[53])((ITextRange*)Unsafe.AsPointer(ref this), Type).ThrowOnFailure();
}
/// <inheritdoc cref="GetPoint(winmdroot.UI.Controls.RichEdit.tomConstants, int*, int*)"/>
internal unsafe void GetPoint(winmdroot.UI.Controls.RichEdit.tomConstants Type, out int px, out int py)
{
fixed (int* pyLocal = &py)
{
fixed (int* pxLocal = &px)
{
this.GetPoint(Type, pxLocal, pyLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetPoint(ITextRange* pThis, winmdroot.UI.Controls.RichEdit.tomConstants Type, int* px, int* py)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetPoint(Type, px, py);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves screen coordinates for the start or end character position in the text range, along with the intra-line position.</summary>
/// <param name="Type">
/// <para>Type: <b>long</b> Flag that indicates the position to retrieve. This parameter can include one value from each of the following tables. The default value is tomStart + TA_BASELINE + TA_LEFT. <a id="tomAllowOffClient"></a> <a id="tomallowoffclient"></a> <a id="TOMALLOWOFFCLIENT"></a></para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getpoint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="px">
/// <para>Type: <b>long*</b> The x-coordinate.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getpoint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="py">
/// <para>Type: <b>long*</b> The y-coordinate.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getpoint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>The <b>ITextRange::GetPoint</b> method gives <a href="https://docs.microsoft.com/windows/desktop/api/tom/nn-tom-itextrange">ITextRange</a> the ability to emulate UI-pointer commands; it is also handy for accessibility purposes.</remarks>
public unsafe void GetPoint(winmdroot.UI.Controls.RichEdit.tomConstants Type, int* px, int* py)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.tomConstants ,int* ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[54])((ITextRange*)Unsafe.AsPointer(ref this), Type, px, py).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetPoint(ITextRange* pThis, int x, int y, winmdroot.UI.Controls.RichEdit.tomConstants Type, int Extend)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetPoint(x, y, Type, Extend);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Changes the range based on a specified point at or up through (depending on Extend) the point (x, y) aligned according to Type.</summary>
/// <param name="x">
/// <para>Type: <b>long</b> Horizontal coordinate of the specified point, in absolute screen coordinates.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setpoint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="y">
/// <para>Type: <b>long</b> Vertical coordinate of the specified point, in absolute screen coordinates.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setpoint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Type">
/// <para>Type: <b>long</b> The end to move to the specified point. It can be one of the following.</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setpoint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="Extend">
/// <para>Type: <b>long</b> How to set the endpoints of the range. If <i>Extend</i> is zero (the default), the range is an insertion point at the specified point (or at the nearest point with selectable text). If <i>Extend</i> is 1, the end specified by <i>Type</i> is moved to the point and the other end is left alone.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-setpoint#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns <b>S_OK</b>.</para>
/// </returns>
/// <remarks>An application can use the specified point in the <a href="https://docs.microsoft.com/windows/desktop/api/winuser/nf-winuser-windowfrompoint">WindowFromPoint</a> function to get the handle of the window, which usually can be used to find the client-rectangle coordinates (although a notable exception is with <a href="https://docs.microsoft.com/windows/desktop/Controls/windowless-rich-edit-controls">Windowless Controls</a>).</remarks>
public void SetPoint(int x, int y, winmdroot.UI.Controls.RichEdit.tomConstants Type, int Extend)
{
((delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,winmdroot.UI.Controls.RichEdit.tomConstants ,int ,winmdroot.Foundation.HRESULT>)lpVtbl[55])((ITextRange*)Unsafe.AsPointer(ref this), x, y, Type, Extend).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT ScrollIntoView(ITextRange* pThis, int Value)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.ScrollIntoView(Value);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Scrolls the specified range into view.</summary>
/// <param name="Value">
/// <para>Type: <b>long</b> Flag specifying the end to scroll into view. It can be one of the following. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-scrollintoview#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> The method returns an <b>HRESULT</b> value. If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns S_FALSE.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-scrollintoview">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public winmdroot.Foundation.HRESULT ScrollIntoView(int Value)
{
return ((delegate *unmanaged [Stdcall]<ITextRange*,int ,winmdroot.Foundation.HRESULT>)lpVtbl[56])((ITextRange*)Unsafe.AsPointer(ref this), Value);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetEmbeddedObject(ITextRange* pThis, winmdroot.System.Com.IUnknown** ppObject)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetEmbeddedObject(ppObject);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Retrieves a pointer to the embedded object at the start of the specified range, that is, at cpFirst. The range must either be an insertion point or it must select only the embedded object.</summary>
/// <param name="ppObject">
/// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nn-unknwn-iunknown">IUnknown</a>**</b> The pointer to the object.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/tom/nf-tom-itextrange-getembeddedobject#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If the method succeeds, it returns <b>S_OK</b>. If the method fails, it returns one of the following error codes. For more information about COM error codes, see <a href="https://docs.microsoft.com/windows/desktop/com/error-handling-in-com">Error Handling in COM</a>. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>If the start of this range does not have an embedded object or if the range selects more than a single object, <i>ppObject</i> is set equal to <b>NULL</b>.</remarks>
public unsafe void GetEmbeddedObject(winmdroot.System.Com.IUnknown** ppObject)
{
((delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Com.IUnknown** ,winmdroot.Foundation.HRESULT>)lpVtbl[57])((ITextRange*)Unsafe.AsPointer(ref this), ppObject).ThrowOnFailure();
}
internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv)
where T : unmanaged
{
var hr = this.QueryInterface(typeof(T).GUID, out void* pv);
if (hr.Succeeded)
{
ppv = (T*)pv;
}
else
{
ppv = null;
}
return hr;
}
internal struct Vtbl
{
internal delegate *unmanaged [Stdcall]<ITextRange*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<ITextRange*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<ITextRange*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<ITextRange*,uint* ,winmdroot.Foundation.HRESULT> GetTypeInfoCount_4;
internal delegate *unmanaged [Stdcall]<ITextRange*,uint ,uint ,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT> GetTypeInfo_5;
internal delegate *unmanaged [Stdcall]<ITextRange*,global::System.Guid* ,winmdroot.Foundation.PWSTR* ,uint ,uint ,int* ,winmdroot.Foundation.HRESULT> GetIDsOfNames_6;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,global::System.Guid* ,uint ,winmdroot.System.Com.DISPATCH_FLAGS ,winmdroot.System.Com.DISPPARAMS* ,winmdroot.System.Variant.VARIANT* ,winmdroot.System.Com.EXCEPINFO* ,uint* ,winmdroot.Foundation.HRESULT> Invoke_7;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.BSTR* ,winmdroot.Foundation.HRESULT> GetText_8;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.BSTR ,winmdroot.Foundation.HRESULT> SetText_9;
internal delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT> GetChar_10;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,winmdroot.Foundation.HRESULT> SetChar_11;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange** ,winmdroot.Foundation.HRESULT> GetDuplicate_12;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange** ,winmdroot.Foundation.HRESULT> GetFormattedText_13;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange* ,winmdroot.Foundation.HRESULT> SetFormattedText_14;
internal delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT> GetStart_15;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,winmdroot.Foundation.HRESULT> SetStart_16;
internal delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT> GetEnd_17;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,winmdroot.Foundation.HRESULT> SetEnd_18;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextFont** ,winmdroot.Foundation.HRESULT> GetFont_19;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextFont* ,winmdroot.Foundation.HRESULT> SetFont_20;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextPara** ,winmdroot.Foundation.HRESULT> GetPara_21;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextPara* ,winmdroot.Foundation.HRESULT> SetPara_22;
internal delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT> GetStoryLength_23;
internal delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT> GetStoryType_24;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,winmdroot.Foundation.HRESULT> Collapse_25;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int* ,winmdroot.Foundation.HRESULT> Expand_26;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int* ,winmdroot.Foundation.HRESULT> GetIndex_27;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int ,winmdroot.Foundation.HRESULT> SetIndex_28;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,winmdroot.Foundation.HRESULT> SetRange_29;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange* ,int* ,winmdroot.Foundation.HRESULT> InRange_30;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange* ,int* ,winmdroot.Foundation.HRESULT> InStory_31;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.ITextRange* ,int* ,winmdroot.Foundation.HRESULT> IsEqual_32;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.HRESULT> Select_33;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT> StartOf_34;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT> EndOf_35;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT> Move_36;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT> MoveStart_37;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT> MoveEnd_38;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT> MoveWhile_39;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT> MoveStartWhile_40;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT> MoveEndWhile_41;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT> MoveUntil_42;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT> MoveStartUntil_43;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT> MoveEndUntil_44;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.BSTR ,int ,winmdroot.UI.Controls.RichEdit.tomConstants ,int* ,winmdroot.Foundation.HRESULT> FindText_45;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.BSTR ,int ,winmdroot.UI.Controls.RichEdit.tomConstants ,int* ,winmdroot.Foundation.HRESULT> FindTextStart_46;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.Foundation.BSTR ,int ,winmdroot.UI.Controls.RichEdit.tomConstants ,int* ,winmdroot.Foundation.HRESULT> FindTextEnd_47;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,int* ,winmdroot.Foundation.HRESULT> Delete_48;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT> Cut_49;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,winmdroot.Foundation.HRESULT> Copy_50;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,winmdroot.Foundation.HRESULT> Paste_51;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Variant.VARIANT* ,int ,int* ,winmdroot.Foundation.HRESULT> CanPaste_52;
internal delegate *unmanaged [Stdcall]<ITextRange*,int* ,winmdroot.Foundation.HRESULT> CanEdit_53;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.tomConstants ,winmdroot.Foundation.HRESULT> ChangeCase_54;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.UI.Controls.RichEdit.tomConstants ,int* ,int* ,winmdroot.Foundation.HRESULT> GetPoint_55;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,int ,winmdroot.UI.Controls.RichEdit.tomConstants ,int ,winmdroot.Foundation.HRESULT> SetPoint_56;
internal delegate *unmanaged [Stdcall]<ITextRange*,int ,winmdroot.Foundation.HRESULT> ScrollIntoView_57;
internal delegate *unmanaged [Stdcall]<ITextRange*,winmdroot.System.Com.IUnknown** ,winmdroot.Foundation.HRESULT> GetEmbeddedObject_58;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->GetText_8 = &GetText;
vtable->SetText_9 = &SetText;
vtable->GetChar_10 = &GetChar;
vtable->SetChar_11 = &SetChar;
vtable->GetDuplicate_12 = &GetDuplicate;
vtable->GetFormattedText_13 = &GetFormattedText;
vtable->SetFormattedText_14 = &SetFormattedText;
vtable->GetStart_15 = &GetStart;
vtable->SetStart_16 = &SetStart;
vtable->GetEnd_17 = &GetEnd;
vtable->SetEnd_18 = &SetEnd;
vtable->GetFont_19 = &GetFont;
vtable->SetFont_20 = &SetFont;
vtable->GetPara_21 = &GetPara;
vtable->SetPara_22 = &SetPara;
vtable->GetStoryLength_23 = &GetStoryLength;
vtable->GetStoryType_24 = &GetStoryType;
vtable->Collapse_25 = &Collapse;
vtable->Expand_26 = &Expand;
vtable->GetIndex_27 = &GetIndex;
vtable->SetIndex_28 = &SetIndex;
vtable->SetRange_29 = &SetRange;
vtable->InRange_30 = &InRange;
vtable->InStory_31 = &InStory;
vtable->IsEqual_32 = &IsEqual;
vtable->Select_33 = &Select;
vtable->StartOf_34 = &StartOf;
vtable->EndOf_35 = &EndOf;
vtable->Move_36 = &Move;
vtable->MoveStart_37 = &MoveStart;
vtable->MoveEnd_38 = &MoveEnd;
vtable->MoveWhile_39 = &MoveWhile;
vtable->MoveStartWhile_40 = &MoveStartWhile;
vtable->MoveEndWhile_41 = &MoveEndWhile;
vtable->MoveUntil_42 = &MoveUntil;
vtable->MoveStartUntil_43 = &MoveStartUntil;
vtable->MoveEndUntil_44 = &MoveEndUntil;
vtable->FindText_45 = &FindText;
vtable->FindTextStart_46 = &FindTextStart;
vtable->FindTextEnd_47 = &FindTextEnd;
vtable->Delete_48 = &Delete;
vtable->Cut_49 = &Cut;
vtable->Copy_50 = &Copy;
vtable->Paste_51 = &Paste;
vtable->CanPaste_52 = &CanPaste;
vtable->CanEdit_53 = &CanEdit;
vtable->ChangeCase_54 = &ChangeCase;
vtable->GetPoint_55 = &GetPoint;
vtable->SetPoint_56 = &SetPoint;
vtable->ScrollIntoView_57 = &ScrollIntoView;
vtable->GetEmbeddedObject_58 = &GetEmbeddedObject;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{8cc497c2-a1df-11ce-8098-00aa0047be5d}</value>
internal static readonly Guid IID_Guid = new Guid(0x8CC497C2, 0xA1DF, 0x11CE, 0x80, 0x98, 0x00, 0xAA, 0x00, 0x47, 0xBE, 0x5D);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0xC2,0x97,0xC4,0x8C,0xDF,0xA1,0xCE,0x11,0x80,0x98,0x00,0xAA,0x00,0x47,0xBE,0x5D };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("8CC497C2-A1DF-11CE-8098-00AA0047BE5D"),InterfaceType(ComInterfaceType.InterfaceIsDual),ComImport()]
[SupportedOSPlatform("windows6.0.6000")]
internal interface Interface
{
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetText(winmdroot.Foundation.BSTR* pbstr);
[PreserveSig()]
winmdroot.Foundation.HRESULT SetText(winmdroot.Foundation.BSTR bstr);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetChar(int* pChar);
[PreserveSig()]
winmdroot.Foundation.HRESULT SetChar(int Char);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetDuplicate(winmdroot.UI.Controls.RichEdit.ITextRange** ppRange);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetFormattedText(winmdroot.UI.Controls.RichEdit.ITextRange** ppRange);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT SetFormattedText([Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetStart(int* pcpFirst);
[PreserveSig()]
winmdroot.Foundation.HRESULT SetStart(int cpFirst);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetEnd(int* pcpLim);
[PreserveSig()]
winmdroot.Foundation.HRESULT SetEnd(int cpLim);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetFont(winmdroot.UI.Controls.RichEdit.ITextFont** ppFont);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT SetFont([Optional] winmdroot.UI.Controls.RichEdit.ITextFont* pFont);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetPara(winmdroot.UI.Controls.RichEdit.ITextPara** ppPara);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT SetPara([Optional] winmdroot.UI.Controls.RichEdit.ITextPara* pPara);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetStoryLength(int* pCount);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetStoryType(int* pValue);
[PreserveSig()]
winmdroot.Foundation.HRESULT Collapse(int bStart);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Expand(int Unit, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetIndex(int Unit, int* pIndex);
[PreserveSig()]
winmdroot.Foundation.HRESULT SetIndex(int Unit, int Index, int Extend);
[PreserveSig()]
winmdroot.Foundation.HRESULT SetRange(int cpAnchor, int cpActive);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT InRange([Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange, int* pValue);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT InStory([Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange, int* pValue);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT IsEqual([Optional] winmdroot.UI.Controls.RichEdit.ITextRange* pRange, int* pValue);
[PreserveSig()]
winmdroot.Foundation.HRESULT Select();
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT StartOf(int Unit, int Extend, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT EndOf(int Unit, int Extend, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Move(int Unit, int Count, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT MoveStart(int Unit, int Count, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT MoveEnd(int Unit, int Count, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT MoveWhile(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT MoveStartWhile(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT MoveEndWhile(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT MoveUntil(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT MoveStartUntil(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT MoveEndUntil(winmdroot.System.Variant.VARIANT* Cset, int Count, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT FindText(winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, int* pLength);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT FindTextStart(winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, int* pLength);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT FindTextEnd(winmdroot.Foundation.BSTR bstr, int Count, winmdroot.UI.Controls.RichEdit.tomConstants Flags, int* pLength);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Delete(int Unit, int Count, int* pDelta);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Cut(winmdroot.System.Variant.VARIANT* pVar);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Copy(winmdroot.System.Variant.VARIANT* pVar);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT Paste(winmdroot.System.Variant.VARIANT* pVar, int Format);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT CanPaste(winmdroot.System.Variant.VARIANT* pVar, int Format, int* pValue);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT CanEdit(int* pValue);
[PreserveSig()]
winmdroot.Foundation.HRESULT ChangeCase(winmdroot.UI.Controls.RichEdit.tomConstants Type);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetPoint(winmdroot.UI.Controls.RichEdit.tomConstants Type, int* px, int* py);
[PreserveSig()]
winmdroot.Foundation.HRESULT SetPoint(int x, int y, winmdroot.UI.Controls.RichEdit.tomConstants Type, int Extend);
[PreserveSig()]
winmdroot.Foundation.HRESULT ScrollIntoView(int Value);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetEmbeddedObject(winmdroot.System.Com.IUnknown** ppObject);
}
}
}
}
|