// ------------------------------------------------------------------------------ // // 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.Runtime.CompilerServices; using System.Runtime.InteropServices; using HexaGen.Runtime; using System.Numerics; namespace Dalamud.Bindings.ImGui { public unsafe partial class ImGui { /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize) { fixed (byte* plabel = &label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) { fixed (byte* plabel = &label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { fixed (byte* plabel = &label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, void* userData) { fixed (byte* plabel = &label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = &label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, void* userData) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, void* userData) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ref byte label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = &label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); return ret != 0; } } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); return ret != 0; } } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); return ret != 0; } } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); return ret != 0; } } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); return ret != 0; } } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); return ret != 0; } } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); return ret != 0; } } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); return ret != 0; } } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = &hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { fixed (byte* plabel = label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, callback, (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) { fixed (byte* plabel = label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize) { fixed (byte* plabel = label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) { fixed (byte* plabel = label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = label) { fixed (byte* phint = hint) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, (byte*)phint, pStr0, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr0); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, void* userData) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative((byte*)plabel, pStr0, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, callback, (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, void* userData) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(ReadOnlySpan label, string hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { fixed (byte* plabel = label) { byte* pStr0 = null; int pStrSize0 = 0; if (hint != null) { pStrSize0 = Utils.GetByteCountUTF8(hint); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(hint, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative((byte*)plabel, pStr0, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ref byte hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = &hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, (byte*)phint, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, callback, (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (ret != 0 || ((flags & ImGuiInputTextFlags.EnterReturnsTrue) != 0 && IsItemDeactivatedAfterEdit())) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, ReadOnlySpan hint, ref string buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* phint = hint) { byte* pStr1 = null; int pStrSize1 = 0; if (buf != null) { pStrSize1 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(buf, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } byte ret = InputTextWithHintNative(pStr0, (byte*)phint, pStr1, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (ret != 0) { buf = Utils.DecodeStringUTF8(pStr1); } if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (hint != null) { pStrSize1 = Utils.GetByteCountUTF8(hint); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, callback, userData); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (hint != null) { pStrSize1 = Utils.GetByteCountUTF8(hint); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, callback, (void*)(default)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (hint != null) { pStrSize1 = Utils.GetByteCountUTF8(hint); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), (void*)(default)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (hint != null) { pStrSize1 = Utils.GetByteCountUTF8(hint); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), (void*)(default)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (hint != null) { pStrSize1 = Utils.GetByteCountUTF8(hint); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, (void*)(default)); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextFlags flags, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (hint != null) { pStrSize1 = Utils.GetByteCountUTF8(hint); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, flags, (ImGuiInputTextCallback)(default), userData); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (hint != null) { pStrSize1 = Utils.GetByteCountUTF8(hint); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), (ImGuiInputTextCallback)(default), userData); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// public static bool InputTextWithHint(string label, string hint, ref byte buf, nuint bufSize, ImGuiInputTextCallback callback, void* userData) { byte* pStr0 = null; int pStrSize0 = 0; if (label != null) { pStrSize0 = Utils.GetByteCountUTF8(label); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(label, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (hint != null) { pStrSize1 = Utils.GetByteCountUTF8(hint); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(hint, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } fixed (byte* pbuf = &buf) { byte ret = InputTextWithHintNative(pStr0, pStr1, (byte*)pbuf, bufSize, (ImGuiInputTextFlags)(0), callback, userData); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret != 0; } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static int ImFormatStringNative(byte* buf, nuint bufSize, byte* fmt) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[1271])(buf, bufSize, fmt); #else return (int)((delegate* unmanaged[Cdecl])funcTable[1271])((nint)buf, bufSize, (nint)fmt); #endif } /// /// To be documented. /// public static int ImFormatString(byte* buf, nuint bufSize, byte* fmt) { int ret = ImFormatStringNative(buf, bufSize, fmt); return ret; } /// /// To be documented. /// public static int ImFormatString(ref byte buf, nuint bufSize, byte* fmt) { fixed (byte* pbuf = &buf) { int ret = ImFormatStringNative((byte*)pbuf, bufSize, fmt); return ret; } } /// /// To be documented. /// public static int ImFormatString(ref string buf, nuint bufSize, byte* fmt) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImFormatStringNative(pStr0, bufSize, fmt); buf = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImFormatString(byte* buf, nuint bufSize, ref byte fmt) { fixed (byte* pfmt = &fmt) { int ret = ImFormatStringNative(buf, bufSize, (byte*)pfmt); return ret; } } /// /// To be documented. /// public static int ImFormatString(byte* buf, nuint bufSize, ReadOnlySpan fmt) { fixed (byte* pfmt = fmt) { int ret = ImFormatStringNative(buf, bufSize, (byte*)pfmt); return ret; } } /// /// To be documented. /// public static int ImFormatString(byte* buf, nuint bufSize, string fmt) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImFormatStringNative(buf, bufSize, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImFormatString(ref byte buf, nuint bufSize, ref byte fmt) { fixed (byte* pbuf = &buf) { fixed (byte* pfmt = &fmt) { int ret = ImFormatStringNative((byte*)pbuf, bufSize, (byte*)pfmt); return ret; } } } /// /// To be documented. /// public static int ImFormatString(ref byte buf, nuint bufSize, ReadOnlySpan fmt) { fixed (byte* pbuf = &buf) { fixed (byte* pfmt = fmt) { int ret = ImFormatStringNative((byte*)pbuf, bufSize, (byte*)pfmt); return ret; } } } /// /// To be documented. /// public static int ImFormatString(ref string buf, nuint bufSize, string fmt) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (fmt != null) { pStrSize1 = Utils.GetByteCountUTF8(fmt); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(fmt, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } int ret = ImFormatStringNative(pStr0, bufSize, pStr1); buf = Utils.DecodeStringUTF8(pStr0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImFormatString(ref byte buf, nuint bufSize, string fmt) { fixed (byte* pbuf = &buf) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImFormatStringNative((byte*)pbuf, bufSize, pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImFormatString(ref string buf, nuint bufSize, ref byte fmt) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pfmt = &fmt) { int ret = ImFormatStringNative(pStr0, bufSize, (byte*)pfmt); buf = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImFormatString(ref string buf, nuint bufSize, ReadOnlySpan fmt) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pfmt = fmt) { int ret = ImFormatStringNative(pStr0, bufSize, (byte*)pfmt); buf = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static int ImFormatStringVNative(byte* buf, nuint bufSize, byte* fmt, nuint args) { #if NET5_0_OR_GREATER return ((delegate* unmanaged[Cdecl])funcTable[1272])(buf, bufSize, fmt, args); #else return (int)((delegate* unmanaged[Cdecl])funcTable[1272])((nint)buf, bufSize, (nint)fmt, args); #endif } /// /// To be documented. /// public static int ImFormatStringV(byte* buf, nuint bufSize, byte* fmt, nuint args) { int ret = ImFormatStringVNative(buf, bufSize, fmt, args); return ret; } /// /// To be documented. /// public static int ImFormatStringV(ref byte buf, nuint bufSize, byte* fmt, nuint args) { fixed (byte* pbuf = &buf) { int ret = ImFormatStringVNative((byte*)pbuf, bufSize, fmt, args); return ret; } } /// /// To be documented. /// public static int ImFormatStringV(ref string buf, nuint bufSize, byte* fmt, nuint args) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImFormatStringVNative(pStr0, bufSize, fmt, args); buf = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImFormatStringV(byte* buf, nuint bufSize, ref byte fmt, nuint args) { fixed (byte* pfmt = &fmt) { int ret = ImFormatStringVNative(buf, bufSize, (byte*)pfmt, args); return ret; } } /// /// To be documented. /// public static int ImFormatStringV(byte* buf, nuint bufSize, ReadOnlySpan fmt, nuint args) { fixed (byte* pfmt = fmt) { int ret = ImFormatStringVNative(buf, bufSize, (byte*)pfmt, args); return ret; } } /// /// To be documented. /// public static int ImFormatStringV(byte* buf, nuint bufSize, string fmt, nuint args) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImFormatStringVNative(buf, bufSize, pStr0, args); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImFormatStringV(ref byte buf, nuint bufSize, ref byte fmt, nuint args) { fixed (byte* pbuf = &buf) { fixed (byte* pfmt = &fmt) { int ret = ImFormatStringVNative((byte*)pbuf, bufSize, (byte*)pfmt, args); return ret; } } } /// /// To be documented. /// public static int ImFormatStringV(ref byte buf, nuint bufSize, ReadOnlySpan fmt, nuint args) { fixed (byte* pbuf = &buf) { fixed (byte* pfmt = fmt) { int ret = ImFormatStringVNative((byte*)pbuf, bufSize, (byte*)pfmt, args); return ret; } } } /// /// To be documented. /// public static int ImFormatStringV(ref string buf, nuint bufSize, string fmt, nuint args) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } byte* pStr1 = null; int pStrSize1 = 0; if (fmt != null) { pStrSize1 = Utils.GetByteCountUTF8(fmt); if (pStrSize1 >= Utils.MaxStackallocSize) { pStr1 = Utils.Alloc(pStrSize1 + 1); } else { byte* pStrStack1 = stackalloc byte[pStrSize1 + 1]; pStr1 = pStrStack1; } int pStrOffset1 = Utils.EncodeStringUTF8(fmt, pStr1, pStrSize1); pStr1[pStrOffset1] = 0; } int ret = ImFormatStringVNative(pStr0, bufSize, pStr1, args); buf = Utils.DecodeStringUTF8(pStr0); if (pStrSize1 >= Utils.MaxStackallocSize) { Utils.Free(pStr1); } if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } /// /// To be documented. /// public static int ImFormatStringV(ref byte buf, nuint bufSize, string fmt, nuint args) { fixed (byte* pbuf = &buf) { byte* pStr0 = null; int pStrSize0 = 0; if (fmt != null) { pStrSize0 = Utils.GetByteCountUTF8(fmt); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(fmt, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } int ret = ImFormatStringVNative((byte*)pbuf, bufSize, pStr0, args); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImFormatStringV(ref string buf, nuint bufSize, ref byte fmt, nuint args) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pfmt = &fmt) { int ret = ImFormatStringVNative(pStr0, bufSize, (byte*)pfmt, args); buf = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } /// /// To be documented. /// public static int ImFormatStringV(ref string buf, nuint bufSize, ReadOnlySpan fmt, nuint args) { byte* pStr0 = null; int pStrSize0 = 0; if (buf != null) { pStrSize0 = Math.Max(Utils.GetByteCountUTF8(buf), (int)bufSize); if (pStrSize0 >= Utils.MaxStackallocSize) { pStr0 = Utils.Alloc(pStrSize0 + 1); } else { byte* pStrStack0 = stackalloc byte[pStrSize0 + 1]; pStr0 = pStrStack0; } int pStrOffset0 = Utils.EncodeStringUTF8(buf, pStr0, pStrSize0); pStr0[pStrOffset0] = 0; } fixed (byte* pfmt = fmt) { int ret = ImFormatStringVNative(pStr0, bufSize, (byte*)pfmt, args); buf = Utils.DecodeStringUTF8(pStr0); if (pStrSize0 >= Utils.MaxStackallocSize) { Utils.Free(pStr0); } return ret; } } } }