mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
5025 lines
141 KiB
C#
5025 lines
141 KiB
C#
// ------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// This code was generated by a tool.
|
|
//
|
|
// Changes to this file may cause incorrect behavior and will be lost if
|
|
// the code is regenerated.
|
|
// </auto-generated>
|
|
// ------------------------------------------------------------------------------
|
|
|
|
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
using HexaGen.Runtime;
|
|
using System.Numerics;
|
|
|
|
namespace Dalamud.Bindings.ImGui
|
|
{
|
|
public unsafe partial class ImGuiP
|
|
{
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative(drawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, pStr1, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ref byte text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, string textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, ReadOnlySpan<byte> text, string textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ref byte textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, Vector2 align, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, align, (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextClippedEx(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, string text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown, ref ImRect clipRect)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
fixed (ImRect* pclipRect = &clipRect)
|
|
{
|
|
RenderTextClippedExNative((ImDrawList*)pdrawList, posMin, posMax, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown, (Vector2)(new Vector2(0,0)), (ImRect*)pclipRect);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderTextEllipsisNative(ImDrawList* drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<ImDrawList*, Vector2, Vector2, float, float, byte*, byte*, Vector2*, void>)funcTable[1178])(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, textEnd, textSizeIfKnown);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<nint, Vector2, Vector2, float, float, nint, nint, nint, void>)funcTable[1178])((nint)drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (nint)text, (nint)textEnd, (nint)textSizeIfKnown);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, textEnd, textSizeIfKnown);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, textEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, byte* textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, byte* textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, byte* textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, textEnd, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, byte* textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, byte* textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, byte* textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, textEnd, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ref byte textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ReadOnlySpan<byte> textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, string textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, pStr0, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ref byte textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ReadOnlySpan<byte> textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, string textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, pStr0, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, string textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, pStr1, textSizeIfKnown);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ReadOnlySpan<byte> textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, string textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, ref byte textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, string textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ref byte textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ReadOnlySpan<byte> textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ref byte textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, string textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, pStr1, textSizeIfKnown);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ReadOnlySpan<byte> textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, string textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, ref byte textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, textSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, string textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ref byte textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ReadOnlySpan<byte> textEnd, Vector2* textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, textSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, textEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, byte* textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, textEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, byte* textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, byte* textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, textEnd, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, byte* textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, byte* textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, textEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, byte* textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, textEnd, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, string textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, pStr0, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ref byte textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, byte* text, string textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, text, pStr0, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, string textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, pStr1, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, string textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, ref byte textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, string textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ref byte textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ImDrawListPtr drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative(drawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ref byte textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, string textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, pStr1, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ref byte text, string textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, ref byte textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, ReadOnlySpan<byte> text, string textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, (byte*)ptext, pStr0, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ref byte textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderTextEllipsis(ref ImDrawList drawList, Vector2 posMin, Vector2 posMax, float clipMaxX, float ellipsisMaxX, string text, ReadOnlySpan<byte> textEnd, ref Vector2 textSizeIfKnown)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
fixed (Vector2* ptextSizeIfKnown = &textSizeIfKnown)
|
|
{
|
|
RenderTextEllipsisNative((ImDrawList*)pdrawList, posMin, posMax, clipMaxX, ellipsisMaxX, pStr0, (byte*)ptextEnd, (Vector2*)ptextSizeIfKnown);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderFrameNative(Vector2 pMin, Vector2 pMax, uint fillCol, byte border, float rounding)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<Vector2, Vector2, uint, byte, float, void>)funcTable[1179])(pMin, pMax, fillCol, border, rounding);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<Vector2, Vector2, uint, byte, float, void>)funcTable[1179])(pMin, pMax, fillCol, border, rounding);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderFrame(Vector2 pMin, Vector2 pMax, uint fillCol, bool border, float rounding)
|
|
{
|
|
RenderFrameNative(pMin, pMax, fillCol, border ? (byte)1 : (byte)0, rounding);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderFrame(Vector2 pMin, Vector2 pMax, uint fillCol, bool border)
|
|
{
|
|
RenderFrameNative(pMin, pMax, fillCol, border ? (byte)1 : (byte)0, (float)(0.0f));
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderFrame(Vector2 pMin, Vector2 pMax, uint fillCol)
|
|
{
|
|
RenderFrameNative(pMin, pMax, fillCol, (byte)(1), (float)(0.0f));
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderFrame(Vector2 pMin, Vector2 pMax, uint fillCol, float rounding)
|
|
{
|
|
RenderFrameNative(pMin, pMax, fillCol, (byte)(1), rounding);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderFrameBorderNative(Vector2 pMin, Vector2 pMax, float rounding)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<Vector2, Vector2, float, void>)funcTable[1180])(pMin, pMax, rounding);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<Vector2, Vector2, float, void>)funcTable[1180])(pMin, pMax, rounding);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderFrameBorder(Vector2 pMin, Vector2 pMax, float rounding)
|
|
{
|
|
RenderFrameBorderNative(pMin, pMax, rounding);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderFrameBorder(Vector2 pMin, Vector2 pMax)
|
|
{
|
|
RenderFrameBorderNative(pMin, pMax, (float)(0.0f));
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderColorRectWithAlphaCheckerboardNative(ImDrawList* drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, float rounding, ImDrawFlags flags)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<ImDrawList*, Vector2, Vector2, uint, float, Vector2, float, ImDrawFlags, void>)funcTable[1181])(drawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, flags);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<nint, Vector2, Vector2, uint, float, Vector2, float, ImDrawFlags, void>)funcTable[1181])((nint)drawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, flags);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderColorRectWithAlphaCheckerboard(ImDrawListPtr drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, float rounding, ImDrawFlags flags)
|
|
{
|
|
RenderColorRectWithAlphaCheckerboardNative(drawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, flags);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderColorRectWithAlphaCheckerboard(ImDrawListPtr drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, float rounding)
|
|
{
|
|
RenderColorRectWithAlphaCheckerboardNative(drawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, (ImDrawFlags)(0));
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderColorRectWithAlphaCheckerboard(ImDrawListPtr drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff)
|
|
{
|
|
RenderColorRectWithAlphaCheckerboardNative(drawList, pMin, pMax, fillCol, gridStep, gridOff, (float)(0.0f), (ImDrawFlags)(0));
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderColorRectWithAlphaCheckerboard(ImDrawListPtr drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, ImDrawFlags flags)
|
|
{
|
|
RenderColorRectWithAlphaCheckerboardNative(drawList, pMin, pMax, fillCol, gridStep, gridOff, (float)(0.0f), flags);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderColorRectWithAlphaCheckerboard(ref ImDrawList drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, float rounding, ImDrawFlags flags)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderColorRectWithAlphaCheckerboardNative((ImDrawList*)pdrawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, flags);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderColorRectWithAlphaCheckerboard(ref ImDrawList drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, float rounding)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderColorRectWithAlphaCheckerboardNative((ImDrawList*)pdrawList, pMin, pMax, fillCol, gridStep, gridOff, rounding, (ImDrawFlags)(0));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderColorRectWithAlphaCheckerboard(ref ImDrawList drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderColorRectWithAlphaCheckerboardNative((ImDrawList*)pdrawList, pMin, pMax, fillCol, gridStep, gridOff, (float)(0.0f), (ImDrawFlags)(0));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderColorRectWithAlphaCheckerboard(ref ImDrawList drawList, Vector2 pMin, Vector2 pMax, uint fillCol, float gridStep, Vector2 gridOff, ImDrawFlags flags)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderColorRectWithAlphaCheckerboardNative((ImDrawList*)pdrawList, pMin, pMax, fillCol, gridStep, gridOff, (float)(0.0f), flags);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderNavHighlightNative(ImRect bb, uint id, ImGuiNavHighlightFlags flags)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<ImRect, uint, ImGuiNavHighlightFlags, void>)funcTable[1182])(bb, id, flags);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<ImRect, uint, ImGuiNavHighlightFlags, void>)funcTable[1182])(bb, id, flags);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderNavHighlight(ImRect bb, uint id, ImGuiNavHighlightFlags flags)
|
|
{
|
|
RenderNavHighlightNative(bb, id, flags);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderNavHighlight(ImRect bb, uint id)
|
|
{
|
|
RenderNavHighlightNative(bb, id, (ImGuiNavHighlightFlags)(ImGuiNavHighlightFlags.TypeDefault));
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static byte* FindRenderedTextEndNative(byte* text, byte* textEnd)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
return ((delegate* unmanaged[Cdecl]<byte*, byte*, byte*>)funcTable[1183])(text, textEnd);
|
|
#else
|
|
return (byte*)((delegate* unmanaged[Cdecl]<nint, nint, nint>)funcTable[1183])((nint)text, (nint)textEnd);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(byte* text, byte* textEnd)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative(text, textEnd);
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(byte* text)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative(text, (byte*)(default));
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(byte* text)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(text, (byte*)(default)));
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(byte* text, byte* textEnd)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(text, textEnd));
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(ref byte text, byte* textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative((byte*)ptext, textEnd);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(ref byte text)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)(default));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(ref byte text)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)(default)));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(ref byte text, byte* textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, textEnd));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(ReadOnlySpan<byte> text, byte* textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative((byte*)ptext, textEnd);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(ReadOnlySpan<byte> text)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)(default));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(ReadOnlySpan<byte> text)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)(default)));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(ReadOnlySpan<byte> text, byte* textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, textEnd));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(string text, byte* textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* ret = FindRenderedTextEndNative(pStr0, textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(string text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* ret = FindRenderedTextEndNative(pStr0, (byte*)(default));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(string text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(pStr0, (byte*)(default)));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(string text, byte* textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(pStr0, textEnd));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(byte* text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative(text, (byte*)ptextEnd);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(byte* text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(text, (byte*)ptextEnd));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(byte* text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative(text, (byte*)ptextEnd);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(byte* text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(text, (byte*)ptextEnd));
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(byte* text, string textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* ret = FindRenderedTextEndNative(text, pStr0);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(byte* text, string textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(text, pStr0));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(ref byte text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(ref byte text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd));
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd));
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(string text, string textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
byte* ret = FindRenderedTextEndNative(pStr0, pStr1);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(string text, string textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(pStr0, pStr1));
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(ref byte text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(ref byte text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd));
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(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<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* ret = FindRenderedTextEndNative((byte*)ptext, pStr0);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(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<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, pStr0));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(ReadOnlySpan<byte> text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(ReadOnlySpan<byte> text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, (byte*)ptextEnd));
|
|
return ret;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(ReadOnlySpan<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<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
byte* ret = FindRenderedTextEndNative((byte*)ptext, pStr0);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(ReadOnlySpan<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<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative((byte*)ptext, pStr0));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(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<byte>(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)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative(pStr0, (byte*)ptextEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(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<byte>(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)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(pStr0, (byte*)ptextEnd));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static byte* FindRenderedTextEnd(string text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
byte* ret = FindRenderedTextEndNative(pStr0, (byte*)ptextEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static string FindRenderedTextEndS(string text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
string ret = Utils.DecodeStringUTF8(FindRenderedTextEndNative(pStr0, (byte*)ptextEnd));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderMouseCursorNative(Vector2 pos, float scale, ImGuiMouseCursor mouseCursor, uint colFill, uint colBorder, uint colShadow)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<Vector2, float, ImGuiMouseCursor, uint, uint, uint, void>)funcTable[1184])(pos, scale, mouseCursor, colFill, colBorder, colShadow);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<Vector2, float, ImGuiMouseCursor, uint, uint, uint, void>)funcTable[1184])(pos, scale, mouseCursor, colFill, colBorder, colShadow);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderMouseCursor(Vector2 pos, float scale, ImGuiMouseCursor mouseCursor, uint colFill, uint colBorder, uint colShadow)
|
|
{
|
|
RenderMouseCursorNative(pos, scale, mouseCursor, colFill, colBorder, colShadow);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderArrowNative(ImDrawList* drawList, Vector2 pos, uint col, ImGuiDir dir, float scale)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<ImDrawList*, Vector2, uint, ImGuiDir, float, void>)funcTable[1185])(drawList, pos, col, dir, scale);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<nint, Vector2, uint, ImGuiDir, float, void>)funcTable[1185])((nint)drawList, pos, col, dir, scale);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderArrow(ImDrawListPtr drawList, Vector2 pos, uint col, ImGuiDir dir, float scale)
|
|
{
|
|
RenderArrowNative(drawList, pos, col, dir, scale);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderArrow(ImDrawListPtr drawList, Vector2 pos, uint col, ImGuiDir dir)
|
|
{
|
|
RenderArrowNative(drawList, pos, col, dir, (float)(1.0f));
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderArrow(ref ImDrawList drawList, Vector2 pos, uint col, ImGuiDir dir, float scale)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderArrowNative((ImDrawList*)pdrawList, pos, col, dir, scale);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderArrow(ref ImDrawList drawList, Vector2 pos, uint col, ImGuiDir dir)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderArrowNative((ImDrawList*)pdrawList, pos, col, dir, (float)(1.0f));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderBulletNative(ImDrawList* drawList, Vector2 pos, uint col)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<ImDrawList*, Vector2, uint, void>)funcTable[1186])(drawList, pos, col);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<nint, Vector2, uint, void>)funcTable[1186])((nint)drawList, pos, col);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderBullet(ImDrawListPtr drawList, Vector2 pos, uint col)
|
|
{
|
|
RenderBulletNative(drawList, pos, col);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderBullet(ref ImDrawList drawList, Vector2 pos, uint col)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderBulletNative((ImDrawList*)pdrawList, pos, col);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderCheckMarkNative(ImDrawList* drawList, Vector2 pos, uint col, float sz)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<ImDrawList*, Vector2, uint, float, void>)funcTable[1187])(drawList, pos, col, sz);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<nint, Vector2, uint, float, void>)funcTable[1187])((nint)drawList, pos, col, sz);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderCheckMark(ImDrawListPtr drawList, Vector2 pos, uint col, float sz)
|
|
{
|
|
RenderCheckMarkNative(drawList, pos, col, sz);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderCheckMark(ref ImDrawList drawList, Vector2 pos, uint col, float sz)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderCheckMarkNative((ImDrawList*)pdrawList, pos, col, sz);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderArrowPointingAtNative(ImDrawList* drawList, Vector2 pos, Vector2 halfSz, ImGuiDir direction, uint col)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<ImDrawList*, Vector2, Vector2, ImGuiDir, uint, void>)funcTable[1188])(drawList, pos, halfSz, direction, col);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<nint, Vector2, Vector2, ImGuiDir, uint, void>)funcTable[1188])((nint)drawList, pos, halfSz, direction, col);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderArrowPointingAt(ImDrawListPtr drawList, Vector2 pos, Vector2 halfSz, ImGuiDir direction, uint col)
|
|
{
|
|
RenderArrowPointingAtNative(drawList, pos, halfSz, direction, col);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderArrowPointingAt(ref ImDrawList drawList, Vector2 pos, Vector2 halfSz, ImGuiDir direction, uint col)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderArrowPointingAtNative((ImDrawList*)pdrawList, pos, halfSz, direction, col);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderArrowDockMenuNative(ImDrawList* drawList, Vector2 pMin, float sz, uint col)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<ImDrawList*, Vector2, float, uint, void>)funcTable[1189])(drawList, pMin, sz, col);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<nint, Vector2, float, uint, void>)funcTable[1189])((nint)drawList, pMin, sz, col);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderArrowDockMenu(ImDrawListPtr drawList, Vector2 pMin, float sz, uint col)
|
|
{
|
|
RenderArrowDockMenuNative(drawList, pMin, sz, col);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderArrowDockMenu(ref ImDrawList drawList, Vector2 pMin, float sz, uint col)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderArrowDockMenuNative((ImDrawList*)pdrawList, pMin, sz, col);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderRectFilledRangeHNative(ImDrawList* drawList, ImRect rect, uint col, float xStartNorm, float xEndNorm, float rounding)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<ImDrawList*, ImRect, uint, float, float, float, void>)funcTable[1190])(drawList, rect, col, xStartNorm, xEndNorm, rounding);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<nint, ImRect, uint, float, float, float, void>)funcTable[1190])((nint)drawList, rect, col, xStartNorm, xEndNorm, rounding);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderRectFilledRangeH(ImDrawListPtr drawList, ImRect rect, uint col, float xStartNorm, float xEndNorm, float rounding)
|
|
{
|
|
RenderRectFilledRangeHNative(drawList, rect, col, xStartNorm, xEndNorm, rounding);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderRectFilledRangeH(ref ImDrawList drawList, ImRect rect, uint col, float xStartNorm, float xEndNorm, float rounding)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderRectFilledRangeHNative((ImDrawList*)pdrawList, rect, col, xStartNorm, xEndNorm, rounding);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void RenderRectFilledWithHoleNative(ImDrawList* drawList, ImRect outer, ImRect inner, uint col, float rounding)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<ImDrawList*, ImRect, ImRect, uint, float, void>)funcTable[1191])(drawList, outer, inner, col, rounding);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<nint, ImRect, ImRect, uint, float, void>)funcTable[1191])((nint)drawList, outer, inner, col, rounding);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderRectFilledWithHole(ImDrawListPtr drawList, ImRect outer, ImRect inner, uint col, float rounding)
|
|
{
|
|
RenderRectFilledWithHoleNative(drawList, outer, inner, col, rounding);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void RenderRectFilledWithHole(ref ImDrawList drawList, ImRect outer, ImRect inner, uint col, float rounding)
|
|
{
|
|
fixed (ImDrawList* pdrawList = &drawList)
|
|
{
|
|
RenderRectFilledWithHoleNative((ImDrawList*)pdrawList, outer, inner, col, rounding);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static ImDrawFlags CalcRoundingFlagsForRectInRectNative(ImRect rIn, ImRect rOuter, float threshold)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
return ((delegate* unmanaged[Cdecl]<ImRect, ImRect, float, ImDrawFlags>)funcTable[1192])(rIn, rOuter, threshold);
|
|
#else
|
|
return (ImDrawFlags)((delegate* unmanaged[Cdecl]<ImRect, ImRect, float, ImDrawFlags>)funcTable[1192])(rIn, rOuter, threshold);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static ImDrawFlags CalcRoundingFlagsForRectInRect(ImRect rIn, ImRect rOuter, float threshold)
|
|
{
|
|
ImDrawFlags ret = CalcRoundingFlagsForRectInRectNative(rIn, rOuter, threshold);
|
|
return ret;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static void TextExNative(byte* text, byte* textEnd, ImGuiTextFlags flags)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
((delegate* unmanaged[Cdecl]<byte*, byte*, ImGuiTextFlags, void>)funcTable[1193])(text, textEnd, flags);
|
|
#else
|
|
((delegate* unmanaged[Cdecl]<nint, nint, ImGuiTextFlags, void>)funcTable[1193])((nint)text, (nint)textEnd, flags);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(byte* text, byte* textEnd, ImGuiTextFlags flags)
|
|
{
|
|
TextExNative(text, textEnd, flags);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(byte* text, byte* textEnd)
|
|
{
|
|
TextExNative(text, textEnd, (ImGuiTextFlags)(0));
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(byte* text)
|
|
{
|
|
TextExNative(text, (byte*)(default), (ImGuiTextFlags)(0));
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(byte* text, ImGuiTextFlags flags)
|
|
{
|
|
TextExNative(text, (byte*)(default), flags);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ref byte text, byte* textEnd, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
TextExNative((byte*)ptext, textEnd, flags);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ref byte text, byte* textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
TextExNative((byte*)ptext, textEnd, (ImGuiTextFlags)(0));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ref byte text)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)(default), (ImGuiTextFlags)(0));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ref byte text, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)(default), flags);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ReadOnlySpan<byte> text, byte* textEnd, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
TextExNative((byte*)ptext, textEnd, flags);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ReadOnlySpan<byte> text, byte* textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
TextExNative((byte*)ptext, textEnd, (ImGuiTextFlags)(0));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ReadOnlySpan<byte> text)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)(default), (ImGuiTextFlags)(0));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ReadOnlySpan<byte> text, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)(default), flags);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(string text, byte* textEnd, ImGuiTextFlags flags)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
TextExNative(pStr0, textEnd, flags);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(string text, byte* textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
TextExNative(pStr0, textEnd, (ImGuiTextFlags)(0));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(string text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
TextExNative(pStr0, (byte*)(default), (ImGuiTextFlags)(0));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(string text, ImGuiTextFlags flags)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(text, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
TextExNative(pStr0, (byte*)(default), flags);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(byte* text, ref byte textEnd, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
TextExNative(text, (byte*)ptextEnd, flags);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(byte* text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
TextExNative(text, (byte*)ptextEnd, (ImGuiTextFlags)(0));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(byte* text, ReadOnlySpan<byte> textEnd, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
TextExNative(text, (byte*)ptextEnd, flags);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(byte* text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
TextExNative(text, (byte*)ptextEnd, (ImGuiTextFlags)(0));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(byte* text, string textEnd, ImGuiTextFlags flags)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
TextExNative(text, pStr0, flags);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(byte* text, string textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
TextExNative(text, pStr0, (ImGuiTextFlags)(0));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ref byte text, ref byte textEnd, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)ptextEnd, flags);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ref byte text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)ptextEnd, (ImGuiTextFlags)(0));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)ptextEnd, flags);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ReadOnlySpan<byte> text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)ptextEnd, (ImGuiTextFlags)(0));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(string text, string textEnd, ImGuiTextFlags flags)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
TextExNative(pStr0, pStr1, flags);
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(string text, string textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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<byte>(pStrSize1 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack1 = stackalloc byte[pStrSize1 + 1];
|
|
pStr1 = pStrStack1;
|
|
}
|
|
int pStrOffset1 = Utils.EncodeStringUTF8(textEnd, pStr1, pStrSize1);
|
|
pStr1[pStrOffset1] = 0;
|
|
}
|
|
TextExNative(pStr0, pStr1, (ImGuiTextFlags)(0));
|
|
if (pStrSize1 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr1);
|
|
}
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ref byte text, ReadOnlySpan<byte> textEnd, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)ptextEnd, flags);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ref byte text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
fixed (byte* ptextEnd = textEnd)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)ptextEnd, (ImGuiTextFlags)(0));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ref byte text, string textEnd, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptext = &text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
TextExNative((byte*)ptext, pStr0, flags);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(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<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
TextExNative((byte*)ptext, pStr0, (ImGuiTextFlags)(0));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ReadOnlySpan<byte> text, ref byte textEnd, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)ptextEnd, flags);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ReadOnlySpan<byte> text, ref byte textEnd)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
fixed (byte* ptextEnd = &textEnd)
|
|
{
|
|
TextExNative((byte*)ptext, (byte*)ptextEnd, (ImGuiTextFlags)(0));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ReadOnlySpan<byte> text, string textEnd, ImGuiTextFlags flags)
|
|
{
|
|
fixed (byte* ptext = text)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (textEnd != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(textEnd);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
TextExNative((byte*)ptext, pStr0, flags);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(ReadOnlySpan<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<byte>(pStrSize0 + 1);
|
|
}
|
|
else
|
|
{
|
|
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
|
|
pStr0 = pStrStack0;
|
|
}
|
|
int pStrOffset0 = Utils.EncodeStringUTF8(textEnd, pStr0, pStrSize0);
|
|
pStr0[pStrOffset0] = 0;
|
|
}
|
|
TextExNative((byte*)ptext, pStr0, (ImGuiTextFlags)(0));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(string text, ref byte textEnd, ImGuiTextFlags flags)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
TextExNative(pStr0, (byte*)ptextEnd, flags);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(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<byte>(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)
|
|
{
|
|
TextExNative(pStr0, (byte*)ptextEnd, (ImGuiTextFlags)(0));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(string text, ReadOnlySpan<byte> textEnd, ImGuiTextFlags flags)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
TextExNative(pStr0, (byte*)ptextEnd, flags);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static void TextEx(string text, ReadOnlySpan<byte> textEnd)
|
|
{
|
|
byte* pStr0 = null;
|
|
int pStrSize0 = 0;
|
|
if (text != null)
|
|
{
|
|
pStrSize0 = Utils.GetByteCountUTF8(text);
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
pStr0 = Utils.Alloc<byte>(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)
|
|
{
|
|
TextExNative(pStr0, (byte*)ptextEnd, (ImGuiTextFlags)(0));
|
|
if (pStrSize0 >= Utils.MaxStackallocSize)
|
|
{
|
|
Utils.Free(pStr0);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
internal static byte ButtonExNative(byte* label, Vector2 sizeArg, ImGuiButtonFlags flags)
|
|
{
|
|
#if NET5_0_OR_GREATER
|
|
return ((delegate* unmanaged[Cdecl]<byte*, Vector2, ImGuiButtonFlags, byte>)funcTable[1194])(label, sizeArg, flags);
|
|
#else
|
|
return (byte)((delegate* unmanaged[Cdecl]<nint, Vector2, ImGuiButtonFlags, byte>)funcTable[1194])((nint)label, sizeArg, flags);
|
|
#endif
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static bool ButtonEx(byte* label, Vector2 sizeArg, ImGuiButtonFlags flags)
|
|
{
|
|
byte ret = ButtonExNative(label, sizeArg, flags);
|
|
return ret != 0;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static bool ButtonEx(byte* label, Vector2 sizeArg)
|
|
{
|
|
byte ret = ButtonExNative(label, sizeArg, (ImGuiButtonFlags)(0));
|
|
return ret != 0;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static bool ButtonEx(byte* label)
|
|
{
|
|
byte ret = ButtonExNative(label, (Vector2)(new Vector2(0,0)), (ImGuiButtonFlags)(0));
|
|
return ret != 0;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static bool ButtonEx(byte* label, ImGuiButtonFlags flags)
|
|
{
|
|
byte ret = ButtonExNative(label, (Vector2)(new Vector2(0,0)), flags);
|
|
return ret != 0;
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static bool ButtonEx(ref byte label, Vector2 sizeArg, ImGuiButtonFlags flags)
|
|
{
|
|
fixed (byte* plabel = &label)
|
|
{
|
|
byte ret = ButtonExNative((byte*)plabel, sizeArg, flags);
|
|
return ret != 0;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static bool ButtonEx(ref byte label, Vector2 sizeArg)
|
|
{
|
|
fixed (byte* plabel = &label)
|
|
{
|
|
byte ret = ButtonExNative((byte*)plabel, sizeArg, (ImGuiButtonFlags)(0));
|
|
return ret != 0;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static bool ButtonEx(ref byte label)
|
|
{
|
|
fixed (byte* plabel = &label)
|
|
{
|
|
byte ret = ButtonExNative((byte*)plabel, (Vector2)(new Vector2(0,0)), (ImGuiButtonFlags)(0));
|
|
return ret != 0;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static bool ButtonEx(ref byte label, ImGuiButtonFlags flags)
|
|
{
|
|
fixed (byte* plabel = &label)
|
|
{
|
|
byte ret = ButtonExNative((byte*)plabel, (Vector2)(new Vector2(0,0)), flags);
|
|
return ret != 0;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static bool ButtonEx(ReadOnlySpan<byte> label, Vector2 sizeArg, ImGuiButtonFlags flags)
|
|
{
|
|
fixed (byte* plabel = label)
|
|
{
|
|
byte ret = ButtonExNative((byte*)plabel, sizeArg, flags);
|
|
return ret != 0;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public static bool ButtonEx(ReadOnlySpan<byte> label, Vector2 sizeArg)
|
|
{
|
|
fixed (byte* plabel = label)
|
|
{
|
|
byte ret = ButtonExNative((byte*)plabel, sizeArg, (ImGuiButtonFlags)(0));
|
|
return ret != 0;
|
|
}
|
|
}
|
|
}
|
|
}
|