brutal/Brutal.ImGui/Generated-Internal/Structs/ImGuiTextIndex.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

124 lines
4.8 KiB
C#

// <auto-generated/>
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
namespace Brutal.ImGuiApi.Internal
{
/// <summary>
/// <para>
/// Maintain a line index for a text buffer.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L139">imgui_internal.h:139</see>
/// <br/><c>struct ImGuiTextIndex</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Utilities
/// (other types which are not forwarded declared are: ImBitArray&lt;&gt;, ImSpan&lt;&gt;, ImSpanAllocator&lt;&gt;, ImStableVector&lt;&gt;, ImPool&lt;&gt;, ImChunkStream&lt;&gt;)
/// </code>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 24)]
public partial struct ImGuiTextIndex
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L802">imgui_internal.h:802</see>
/// <br/><c>ImVector&lt;int&gt; LineOffsets</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Helper: ImGuiTextIndex
/// Maintain a line index for a text buffer. This is a strong candidate to be moved into the public API.
/// </code>
/// </remarks>
[FieldOffset(0)]
public ImVector<int> LineOffsets;
/// <summary>
/// <para>
/// Because we don't own text buffer we need to maintain EndOffset (may bake in LineOffsets?)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L803">imgui_internal.h:803</see>
/// <br/><c>int EndOffset = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Helper: ImGuiTextIndex
/// Maintain a line index for a text buffer. This is a strong candidate to be moved into the public API.
/// </code>
/// </remarks>
[FieldOffset(16)]
public int EndOffset;
}
/// <summary>
/// <para>
/// Maintain a line index for a text buffer.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L139">imgui_internal.h:139</see>
/// <br/><c>struct ImGuiTextIndex</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Utilities
/// (other types which are not forwarded declared are: ImBitArray&lt;&gt;, ImSpan&lt;&gt;, ImSpanAllocator&lt;&gt;, ImStableVector&lt;&gt;, ImPool&lt;&gt;, ImChunkStream&lt;&gt;)
/// </code>
/// </remarks>
public unsafe partial struct ImGuiTextIndexPtr(ImGuiTextIndex* ptr) : INullable
{
private ImGuiTextIndex* _ptr = ptr;
public ImGuiTextIndex* Ptr => _ptr;
public bool IsNull() => _ptr is null;
public static implicit operator ImGuiTextIndexPtr(ImGuiTextIndex* ptr) => new(ptr);
public static implicit operator ImGuiTextIndex*(ImGuiTextIndexPtr wrapper) => wrapper.Ptr;
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L802">imgui_internal.h:802</see>
/// <br/><c>ImVector&lt;int&gt; LineOffsets</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Helper: ImGuiTextIndex
/// Maintain a line index for a text buffer. This is a strong candidate to be moved into the public API.
/// </code>
/// </remarks>
public ref ImVector<int> LineOffsets => ref Unsafe.AsRef<ImVector<int>>(&_ptr->LineOffsets);
/// <summary>
/// <para>
/// Because we don't own text buffer we need to maintain EndOffset (may bake in LineOffsets?)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L803">imgui_internal.h:803</see>
/// <br/><c>int EndOffset = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Helper: ImGuiTextIndex
/// Maintain a line index for a text buffer. This is a strong candidate to be moved into the public API.
/// </code>
/// </remarks>
public ref int EndOffset => ref Unsafe.AsRef<int>(&_ptr->EndOffset);
}
}