// ------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ using System; using System.Diagnostics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using HexaGen.Runtime; using System.Numerics; namespace Dalamud.Bindings.ImGui { /// /// To be documented. /// [StructLayout(LayoutKind.Sequential)] public partial struct ImGuiInputTextCallbackData { /// /// To be documented. /// public ImGuiInputTextFlags EventFlag; /// /// To be documented. /// public ImGuiInputTextFlags Flags; /// /// To be documented. /// public unsafe void* UserData; /// /// To be documented. /// public ushort EventChar; /// /// To be documented. /// public ImGuiKey EventKey; /// /// To be documented. /// public unsafe byte* Buf; /// /// To be documented. /// public int BufTextLen; /// /// To be documented. /// public int BufSize; /// /// To be documented. /// public byte BufDirty; /// /// To be documented. /// public int CursorPos; /// /// To be documented. /// public int SelectionStart; /// /// To be documented. /// public int SelectionEnd; /// /// To be documented. /// public unsafe ImGuiInputTextCallbackData(ImGuiInputTextFlags eventFlag = default, ImGuiInputTextFlags flags = default, void* userData = default, ushort eventChar = default, ImGuiKey eventKey = default, byte* buf = default, int bufTextLen = default, int bufSize = default, bool bufDirty = default, int cursorPos = default, int selectionStart = default, int selectionEnd = default) { EventFlag = eventFlag; Flags = flags; UserData = userData; EventChar = eventChar; EventKey = eventKey; Buf = buf; BufTextLen = bufTextLen; BufSize = bufSize; BufDirty = bufDirty ? (byte)1 : (byte)0; CursorPos = cursorPos; SelectionStart = selectionStart; SelectionEnd = selectionEnd; } /// /// To be documented. /// public unsafe void ClearSelection() { fixed (ImGuiInputTextCallbackData* @this = &this) { ImGui.ClearSelectionNative(@this); } } /// /// To be documented. /// public unsafe void DeleteChars(int pos, int bytesCount) { fixed (ImGuiInputTextCallbackData* @this = &this) { ImGui.DeleteCharsNative(@this, pos, bytesCount); } } /// /// To be documented. /// public unsafe void Destroy() { fixed (ImGuiInputTextCallbackData* @this = &this) { ImGui.DestroyNative(@this); } } /// /// To be documented. /// public unsafe bool HasSelection() { fixed (ImGuiInputTextCallbackData* @this = &this) { byte ret = ImGui.HasSelectionNative(@this); return ret != 0; } } /// /// To be documented. /// public unsafe void InsertChars(int pos, byte* text, byte* textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { ImGui.InsertCharsNative(@this, pos, text, textEnd); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, byte* text) { fixed (ImGuiInputTextCallbackData* @this = &this) { ImGui.InsertCharsNative(@this, pos, text, (byte*)(default)); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ref byte text, byte* textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptext = &text) { ImGui.InsertCharsNative(@this, pos, (byte*)ptext, textEnd); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ref byte text) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptext = &text) { ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)(default)); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ReadOnlySpan text, byte* textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptext = text) { ImGui.InsertCharsNative(@this, pos, (byte*)ptext, textEnd); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ReadOnlySpan text) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptext = text) { ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)(default)); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, string text, byte* textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { byte* pStr0 = null; int pStrSize0 = 0; if (text != null) { pStrSize0 = Utils.GetByteCountUTF8(text); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImGui.InsertCharsNative(@this, pos, pStr0, textEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, string text) { fixed (ImGuiInputTextCallbackData* @this = &this) { byte* pStr0 = null; int pStrSize0 = 0; if (text != null) { pStrSize0 = Utils.GetByteCountUTF8(text); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImGui.InsertCharsNative(@this, pos, pStr0, (byte*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, byte* text, ref byte textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptextEnd = &textEnd) { ImGui.InsertCharsNative(@this, pos, text, (byte*)ptextEnd); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, byte* text, ReadOnlySpan textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptextEnd = textEnd) { ImGui.InsertCharsNative(@this, pos, text, (byte*)ptextEnd); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, byte* text, string textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { byte* pStr0 = null; int pStrSize0 = 0; if (textEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(textEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImGui.InsertCharsNative(@this, pos, text, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ref byte text, ref byte textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptext = &text) { fixed (byte* ptextEnd = &textEnd) { ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)ptextEnd); } } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ReadOnlySpan text, ReadOnlySpan textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptext = text) { fixed (byte* ptextEnd = textEnd) { ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)ptextEnd); } } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, string text, string textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { byte* pStr0 = null; int pStrSize0 = 0; if (text != null) { pStrSize0 = Utils.GetByteCountUTF8(text); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (textEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(textEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } ImGui.InsertCharsNative(@this, pos, pStr0, pStr1); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ref byte text, ReadOnlySpan textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptext = &text) { fixed (byte* ptextEnd = textEnd) { ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)ptextEnd); } } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ref byte text, string textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptext = &text) { byte* pStr0 = null; int pStrSize0 = 0; if (textEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(textEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImGui.InsertCharsNative(@this, pos, (byte*)ptext, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ReadOnlySpan text, ref byte textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptext = text) { fixed (byte* ptextEnd = &textEnd) { ImGui.InsertCharsNative(@this, pos, (byte*)ptext, (byte*)ptextEnd); } } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ReadOnlySpan text, string textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { fixed (byte* ptext = text) { byte* pStr0 = null; int pStrSize0 = 0; if (textEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(textEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImGui.InsertCharsNative(@this, pos, (byte*)ptext, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, string text, ref byte textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { byte* pStr0 = null; int pStrSize0 = 0; if (text != null) { pStrSize0 = Utils.GetByteCountUTF8(text); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* ptextEnd = &textEnd) { ImGui.InsertCharsNative(@this, pos, pStr0, (byte*)ptextEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, string text, ReadOnlySpan textEnd) { fixed (ImGuiInputTextCallbackData* @this = &this) { byte* pStr0 = null; int pStrSize0 = 0; if (text != null) { pStrSize0 = Utils.GetByteCountUTF8(text); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* ptextEnd = textEnd) { ImGui.InsertCharsNative(@this, pos, pStr0, (byte*)ptextEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } } /// /// To be documented. /// public unsafe void SelectAll() { fixed (ImGuiInputTextCallbackData* @this = &this) { ImGui.SelectAllNative(@this); } } } /// /// To be documented. /// #if NET5_0_OR_GREATER [DebuggerDisplay("{DebuggerDisplay,nq}")] #endif public unsafe struct ImGuiInputTextCallbackDataPtr : IEquatable { public ImGuiInputTextCallbackDataPtr(ImGuiInputTextCallbackData* handle) { Handle = handle; } public ImGuiInputTextCallbackData* Handle; public bool IsNull => Handle == null; public static ImGuiInputTextCallbackDataPtr Null => new ImGuiInputTextCallbackDataPtr(null); public ImGuiInputTextCallbackData this[int index] { get => Handle[index]; set => Handle[index] = value; } public static implicit operator ImGuiInputTextCallbackDataPtr(ImGuiInputTextCallbackData* handle) => new ImGuiInputTextCallbackDataPtr(handle); public static implicit operator ImGuiInputTextCallbackData*(ImGuiInputTextCallbackDataPtr handle) => handle.Handle; public static bool operator ==(ImGuiInputTextCallbackDataPtr left, ImGuiInputTextCallbackDataPtr right) => left.Handle == right.Handle; public static bool operator !=(ImGuiInputTextCallbackDataPtr left, ImGuiInputTextCallbackDataPtr right) => left.Handle != right.Handle; public static bool operator ==(ImGuiInputTextCallbackDataPtr left, ImGuiInputTextCallbackData* right) => left.Handle == right; public static bool operator !=(ImGuiInputTextCallbackDataPtr left, ImGuiInputTextCallbackData* right) => left.Handle != right; public bool Equals(ImGuiInputTextCallbackDataPtr other) => Handle == other.Handle; /// public override bool Equals(object obj) => obj is ImGuiInputTextCallbackDataPtr handle && Equals(handle); /// public override int GetHashCode() => ((nuint)Handle).GetHashCode(); #if NET5_0_OR_GREATER private string DebuggerDisplay => string.Format("ImGuiInputTextCallbackDataPtr [0x{0}]", ((nuint)Handle).ToString("X")); #endif /// /// To be documented. /// public ref ImGuiInputTextFlags EventFlag => ref Unsafe.AsRef(&Handle->EventFlag); /// /// To be documented. /// public ref ImGuiInputTextFlags Flags => ref Unsafe.AsRef(&Handle->Flags); /// /// To be documented. /// public void* UserData { get => Handle->UserData; set => Handle->UserData = value; } /// /// To be documented. /// public ref ushort EventChar => ref Unsafe.AsRef(&Handle->EventChar); /// /// To be documented. /// public ref ImGuiKey EventKey => ref Unsafe.AsRef(&Handle->EventKey); /// /// To be documented. /// public byte* Buf { get => Handle->Buf; set => Handle->Buf = value; } /// /// To be documented. /// public ref int BufTextLen => ref Unsafe.AsRef(&Handle->BufTextLen); /// /// To be documented. /// public ref int BufSize => ref Unsafe.AsRef(&Handle->BufSize); /// /// To be documented. /// public ref bool BufDirty => ref Unsafe.AsRef(&Handle->BufDirty); /// /// To be documented. /// public ref int CursorPos => ref Unsafe.AsRef(&Handle->CursorPos); /// /// To be documented. /// public ref int SelectionStart => ref Unsafe.AsRef(&Handle->SelectionStart); /// /// To be documented. /// public ref int SelectionEnd => ref Unsafe.AsRef(&Handle->SelectionEnd); /// /// To be documented. /// public unsafe void ClearSelection() { ImGui.ClearSelectionNative(Handle); } /// /// To be documented. /// public unsafe void DeleteChars(int pos, int bytesCount) { ImGui.DeleteCharsNative(Handle, pos, bytesCount); } /// /// To be documented. /// public unsafe void Destroy() { ImGui.DestroyNative(Handle); } /// /// To be documented. /// public unsafe bool HasSelection() { byte ret = ImGui.HasSelectionNative(Handle); return ret != 0; } /// /// To be documented. /// public unsafe void InsertChars(int pos, byte* text, byte* textEnd) { ImGui.InsertCharsNative(Handle, pos, text, textEnd); } /// /// To be documented. /// public unsafe void InsertChars(int pos, byte* text) { ImGui.InsertCharsNative(Handle, pos, text, (byte*)(default)); } /// /// To be documented. /// public unsafe void InsertChars(int pos, ref byte text, byte* textEnd) { fixed (byte* ptext = &text) { ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, textEnd); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ref byte text) { fixed (byte* ptext = &text) { ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)(default)); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ReadOnlySpan text, byte* textEnd) { fixed (byte* ptext = text) { ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, textEnd); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ReadOnlySpan text) { fixed (byte* ptext = text) { ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)(default)); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, string text, byte* textEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (text != null) { pStrSize0 = Utils.GetByteCountUTF8(text); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImGui.InsertCharsNative(Handle, pos, pStr0, textEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, string text) { byte* pStr0 = null; int pStrSize0 = 0; if (text != null) { pStrSize0 = Utils.GetByteCountUTF8(text); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImGui.InsertCharsNative(Handle, pos, pStr0, (byte*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, byte* text, ref byte textEnd) { fixed (byte* ptextEnd = &textEnd) { ImGui.InsertCharsNative(Handle, pos, text, (byte*)ptextEnd); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, byte* text, ReadOnlySpan textEnd) { fixed (byte* ptextEnd = textEnd) { ImGui.InsertCharsNative(Handle, pos, text, (byte*)ptextEnd); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, byte* text, string textEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (textEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(textEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImGui.InsertCharsNative(Handle, pos, text, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ref byte text, ref byte textEnd) { fixed (byte* ptext = &text) { fixed (byte* ptextEnd = &textEnd) { ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)ptextEnd); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ReadOnlySpan text, ReadOnlySpan textEnd) { fixed (byte* ptext = text) { fixed (byte* ptextEnd = textEnd) { ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)ptextEnd); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, string text, string textEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (text != null) { pStrSize0 = Utils.GetByteCountUTF8(text); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (textEnd != null) { pStrSize1 = Utils.GetByteCountUTF8(textEnd); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } ImGui.InsertCharsNative(Handle, pos, pStr0, pStr1); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ref byte text, ReadOnlySpan textEnd) { fixed (byte* ptext = &text) { fixed (byte* ptextEnd = textEnd) { ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)ptextEnd); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ref byte text, string textEnd) { fixed (byte* ptext = &text) { byte* pStr0 = null; int pStrSize0 = 0; if (textEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(textEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ReadOnlySpan text, ref byte textEnd) { fixed (byte* ptext = text) { fixed (byte* ptextEnd = &textEnd) { ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, (byte*)ptextEnd); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, ReadOnlySpan text, string textEnd) { fixed (byte* ptext = text) { byte* pStr0 = null; int pStrSize0 = 0; if (textEnd != null) { pStrSize0 = Utils.GetByteCountUTF8(textEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } ImGui.InsertCharsNative(Handle, pos, (byte*)ptext, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, string text, ref byte textEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (text != null) { pStrSize0 = Utils.GetByteCountUTF8(text); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* ptextEnd = &textEnd) { ImGui.InsertCharsNative(Handle, pos, pStr0, (byte*)ptextEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public unsafe void InsertChars(int pos, string text, ReadOnlySpan textEnd) { byte* pStr0 = null; int pStrSize0 = 0; if (text != null) { pStrSize0 = Utils.GetByteCountUTF8(text); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* ptextEnd = textEnd) { ImGui.InsertCharsNative(Handle, pos, pStr0, (byte*)ptextEnd); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } } } /// /// To be documented. /// public unsafe void SelectAll() { ImGui.SelectAllNative(Handle); } } }