// ------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// ------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using HexaGen.Runtime;
using System.Numerics;
namespace Dalamud.Bindings.ImGui
{
///
/// To be documented.
///
[StructLayout(LayoutKind.Sequential)]
public partial struct ImFontGlyphRangesBuilder
{
///
/// To be documented.
///
public ImVector UsedChars;
///
/// To be documented.
///
public unsafe ImFontGlyphRangesBuilder(ImVector usedChars = default)
{
UsedChars = usedChars;
}
///
/// To be documented.
///
public unsafe void AddChar(ushort c)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGui.AddCharNative(@this, c);
}
}
///
/// To be documented.
///
public unsafe void AddRanges(ushort* ranges)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGui.AddRangesNative(@this, ranges);
}
}
///
/// To be documented.
///
public unsafe void AddText(byte* text, byte* textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGui.AddTextNative(@this, text, textEnd);
}
}
///
/// To be documented.
///
public unsafe void AddText(byte* text)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGui.AddTextNative(@this, text, (byte*)(default));
}
}
///
/// To be documented.
///
public unsafe void AddText(ref byte text, byte* textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptext = &text)
{
ImGui.AddTextNative(@this, (byte*)ptext, textEnd);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ref byte text)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptext = &text)
{
ImGui.AddTextNative(@this, (byte*)ptext, (byte*)(default));
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ReadOnlySpan text, byte* textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptext = text)
{
ImGui.AddTextNative(@this, (byte*)ptext, textEnd);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ReadOnlySpan text)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptext = text)
{
ImGui.AddTextNative(@this, (byte*)ptext, (byte*)(default));
}
}
}
///
/// To be documented.
///
public unsafe void AddText(string text, byte* textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (text != null)
{
pStrSize0 = Utils.GetByteCountUTF8(text);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGui.AddTextNative(@this, pStr0, textEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(string text)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (text != null)
{
pStrSize0 = Utils.GetByteCountUTF8(text);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGui.AddTextNative(@this, pStr0, (byte*)(default));
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(byte* text, ref byte textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptextEnd = &textEnd)
{
ImGui.AddTextNative(@this, text, (byte*)ptextEnd);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(byte* text, ReadOnlySpan textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptextEnd = textEnd)
{
ImGui.AddTextNative(@this, text, (byte*)ptextEnd);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(byte* text, string textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (textEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGui.AddTextNative(@this, text, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ref byte text, ref byte textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptext = &text)
{
fixed (byte* ptextEnd = &textEnd)
{
ImGui.AddTextNative(@this, (byte*)ptext, (byte*)ptextEnd);
}
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ReadOnlySpan text, ReadOnlySpan textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptext = text)
{
fixed (byte* ptextEnd = textEnd)
{
ImGui.AddTextNative(@this, (byte*)ptext, (byte*)ptextEnd);
}
}
}
}
///
/// To be documented.
///
public unsafe void AddText(string text, string textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (text != null)
{
pStrSize0 = Utils.GetByteCountUTF8(text);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
byte* pStr1 = null;
int pStrSize1 = 0;
if (textEnd != null)
{
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
if (pStrSize1 >= Utils.MaxStackallocSize)
{
pStr1 = Utils.Alloc(pStrSize1 + 1);
}
else
{
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
pStr1 = pStrStack1;
}
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
pStr1[pStrOffset1] = 0;
}
ImGui.AddTextNative(@this, pStr0, pStr1);
if (pStrSize1 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr1);
}
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ref byte text, ReadOnlySpan textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptext = &text)
{
fixed (byte* ptextEnd = textEnd)
{
ImGui.AddTextNative(@this, (byte*)ptext, (byte*)ptextEnd);
}
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ref byte text, string textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptext = &text)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (textEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGui.AddTextNative(@this, (byte*)ptext, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ReadOnlySpan text, ref byte textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptext = text)
{
fixed (byte* ptextEnd = &textEnd)
{
ImGui.AddTextNative(@this, (byte*)ptext, (byte*)ptextEnd);
}
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ReadOnlySpan text, string textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (byte* ptext = text)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (textEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGui.AddTextNative(@this, (byte*)ptext, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
}
///
/// To be documented.
///
public unsafe void AddText(string text, ref byte textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (text != null)
{
pStrSize0 = Utils.GetByteCountUTF8(text);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
fixed (byte* ptextEnd = &textEnd)
{
ImGui.AddTextNative(@this, pStr0, (byte*)ptextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
}
///
/// To be documented.
///
public unsafe void AddText(string text, ReadOnlySpan textEnd)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (text != null)
{
pStrSize0 = Utils.GetByteCountUTF8(text);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
fixed (byte* ptextEnd = textEnd)
{
ImGui.AddTextNative(@this, pStr0, (byte*)ptextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
}
///
/// To be documented.
///
public unsafe void BuildRanges(ImVector* outRanges)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGui.BuildRangesNative(@this, outRanges);
}
}
///
/// To be documented.
///
public unsafe void BuildRanges(ref ImVector outRanges)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
fixed (ImVector* poutRanges = &outRanges)
{
ImGui.BuildRangesNative(@this, (ImVector*)poutRanges);
}
}
}
///
/// To be documented.
///
public unsafe void Clear()
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGui.ClearNative(@this);
}
}
///
/// To be documented.
///
public unsafe void Destroy()
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGui.DestroyNative(@this);
}
}
///
/// To be documented.
///
public unsafe bool GetBit(nuint n)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
byte ret = ImGui.GetBitNative(@this, n);
return ret != 0;
}
}
///
/// To be documented.
///
public unsafe void SetBit(nuint n)
{
fixed (ImFontGlyphRangesBuilder* @this = &this)
{
ImGui.SetBitNative(@this, n);
}
}
}
///
/// To be documented.
///
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImFontGlyphRangesBuilderPtr : IEquatable
{
public ImFontGlyphRangesBuilderPtr(ImFontGlyphRangesBuilder* handle) { Handle = handle; }
public ImFontGlyphRangesBuilder* Handle;
public bool IsNull => Handle == null;
public static ImFontGlyphRangesBuilderPtr Null => new ImFontGlyphRangesBuilderPtr(null);
public ImFontGlyphRangesBuilder this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImFontGlyphRangesBuilderPtr(ImFontGlyphRangesBuilder* handle) => new ImFontGlyphRangesBuilderPtr(handle);
public static implicit operator ImFontGlyphRangesBuilder*(ImFontGlyphRangesBuilderPtr handle) => handle.Handle;
public static bool operator ==(ImFontGlyphRangesBuilderPtr left, ImFontGlyphRangesBuilderPtr right) => left.Handle == right.Handle;
public static bool operator !=(ImFontGlyphRangesBuilderPtr left, ImFontGlyphRangesBuilderPtr right) => left.Handle != right.Handle;
public static bool operator ==(ImFontGlyphRangesBuilderPtr left, ImFontGlyphRangesBuilder* right) => left.Handle == right;
public static bool operator !=(ImFontGlyphRangesBuilderPtr left, ImFontGlyphRangesBuilder* right) => left.Handle != right;
public bool Equals(ImFontGlyphRangesBuilderPtr other) => Handle == other.Handle;
///
public override bool Equals(object obj) => obj is ImFontGlyphRangesBuilderPtr handle && Equals(handle);
///
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImFontGlyphRangesBuilderPtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
///
/// To be documented.
///
public ref ImVector UsedChars => ref Unsafe.AsRef>(&Handle->UsedChars);
///
/// To be documented.
///
public unsafe void AddChar(ushort c)
{
ImGui.AddCharNative(Handle, c);
}
///
/// To be documented.
///
public unsafe void AddRanges(ushort* ranges)
{
ImGui.AddRangesNative(Handle, ranges);
}
///
/// To be documented.
///
public unsafe void AddText(byte* text, byte* textEnd)
{
ImGui.AddTextNative(Handle, text, textEnd);
}
///
/// To be documented.
///
public unsafe void AddText(byte* text)
{
ImGui.AddTextNative(Handle, text, (byte*)(default));
}
///
/// To be documented.
///
public unsafe void AddText(ref byte text, byte* textEnd)
{
fixed (byte* ptext = &text)
{
ImGui.AddTextNative(Handle, (byte*)ptext, textEnd);
}
}
///
/// To be documented.
///
public unsafe void AddText(ref byte text)
{
fixed (byte* ptext = &text)
{
ImGui.AddTextNative(Handle, (byte*)ptext, (byte*)(default));
}
}
///
/// To be documented.
///
public unsafe void AddText(ReadOnlySpan text, byte* textEnd)
{
fixed (byte* ptext = text)
{
ImGui.AddTextNative(Handle, (byte*)ptext, textEnd);
}
}
///
/// To be documented.
///
public unsafe void AddText(ReadOnlySpan text)
{
fixed (byte* ptext = text)
{
ImGui.AddTextNative(Handle, (byte*)ptext, (byte*)(default));
}
}
///
/// To be documented.
///
public unsafe void AddText(string text, byte* textEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (text != null)
{
pStrSize0 = Utils.GetByteCountUTF8(text);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGui.AddTextNative(Handle, pStr0, textEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
///
/// To be documented.
///
public unsafe void AddText(string text)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (text != null)
{
pStrSize0 = Utils.GetByteCountUTF8(text);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGui.AddTextNative(Handle, pStr0, (byte*)(default));
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
///
/// To be documented.
///
public unsafe void AddText(byte* text, ref byte textEnd)
{
fixed (byte* ptextEnd = &textEnd)
{
ImGui.AddTextNative(Handle, text, (byte*)ptextEnd);
}
}
///
/// To be documented.
///
public unsafe void AddText(byte* text, ReadOnlySpan textEnd)
{
fixed (byte* ptextEnd = textEnd)
{
ImGui.AddTextNative(Handle, text, (byte*)ptextEnd);
}
}
///
/// To be documented.
///
public unsafe void AddText(byte* text, string textEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (textEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGui.AddTextNative(Handle, text, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
///
/// To be documented.
///
public unsafe void AddText(ref byte text, ref byte textEnd)
{
fixed (byte* ptext = &text)
{
fixed (byte* ptextEnd = &textEnd)
{
ImGui.AddTextNative(Handle, (byte*)ptext, (byte*)ptextEnd);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ReadOnlySpan text, ReadOnlySpan textEnd)
{
fixed (byte* ptext = text)
{
fixed (byte* ptextEnd = textEnd)
{
ImGui.AddTextNative(Handle, (byte*)ptext, (byte*)ptextEnd);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(string text, string textEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (text != null)
{
pStrSize0 = Utils.GetByteCountUTF8(text);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
byte* pStr1 = null;
int pStrSize1 = 0;
if (textEnd != null)
{
pStrSize1 = Utils.GetByteCountUTF8(textEnd);
if (pStrSize1 >= Utils.MaxStackallocSize)
{
pStr1 = Utils.Alloc(pStrSize1 + 1);
}
else
{
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
pStr1 = pStrStack1;
}
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
pStr1[pStrOffset1] = 0;
}
ImGui.AddTextNative(Handle, pStr0, pStr1);
if (pStrSize1 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr1);
}
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
///
/// To be documented.
///
public unsafe void AddText(ref byte text, ReadOnlySpan textEnd)
{
fixed (byte* ptext = &text)
{
fixed (byte* ptextEnd = textEnd)
{
ImGui.AddTextNative(Handle, (byte*)ptext, (byte*)ptextEnd);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ref byte text, string textEnd)
{
fixed (byte* ptext = &text)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (textEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGui.AddTextNative(Handle, (byte*)ptext, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ReadOnlySpan text, ref byte textEnd)
{
fixed (byte* ptext = text)
{
fixed (byte* ptextEnd = &textEnd)
{
ImGui.AddTextNative(Handle, (byte*)ptext, (byte*)ptextEnd);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(ReadOnlySpan text, string textEnd)
{
fixed (byte* ptext = text)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (textEnd != null)
{
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGui.AddTextNative(Handle, (byte*)ptext, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(string text, ref byte textEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (text != null)
{
pStrSize0 = Utils.GetByteCountUTF8(text);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
fixed (byte* ptextEnd = &textEnd)
{
ImGui.AddTextNative(Handle, pStr0, (byte*)ptextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
///
/// To be documented.
///
public unsafe void AddText(string text, ReadOnlySpan textEnd)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (text != null)
{
pStrSize0 = Utils.GetByteCountUTF8(text);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
fixed (byte* ptextEnd = textEnd)
{
ImGui.AddTextNative(Handle, pStr0, (byte*)ptextEnd);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
}
///
/// To be documented.
///
public unsafe void BuildRanges(ImVector* outRanges)
{
ImGui.BuildRangesNative(Handle, outRanges);
}
///
/// To be documented.
///
public unsafe void BuildRanges(ref ImVector outRanges)
{
fixed (ImVector* poutRanges = &outRanges)
{
ImGui.BuildRangesNative(Handle, (ImVector*)poutRanges);
}
}
///
/// To be documented.
///
public unsafe void Clear()
{
ImGui.ClearNative(Handle);
}
///
/// To be documented.
///
public unsafe void Destroy()
{
ImGui.DestroyNative(Handle);
}
///
/// To be documented.
///
public unsafe bool GetBit(nuint n)
{
byte ret = ImGui.GetBitNative(Handle, n);
return ret != 0;
}
///
/// To be documented.
///
public unsafe void SetBit(nuint n)
{
ImGui.SetBitNative(Handle, n);
}
}
}