//
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
namespace Brutal.ImGuiApi
{
///
///
/// Baked data for a ImFont at a given size.
///
///
/// C++:
/// imgui.h:185
///
struct ImFontBaked
///
///
///
///
/// Forward declarations: ImDrawList, ImFontAtlas layer
///
///
[StructLayout(LayoutKind.Explicit, Size = 104)]
public partial struct ImFontBaked
{
///
///
/// 12-16 // out // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize
/// functions which only this info, and are often bottleneck in large UI).
///
///
/// C++:
/// imgui.h:3874
///
ImVector<float> IndexAdvanceX
///
///
///
///
/// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
///
///
[FieldOffset(0)]
public ImVector IndexAdvanceX;
///
///
/// 4 // out // FindGlyph(FallbackChar)->AdvanceX
///
///
/// C++:
/// imgui.h:3875
///
float FallbackAdvanceX
///
///
///
///
/// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
///
///
[FieldOffset(16)]
public float FallbackAdvanceX;
///
///
/// 4 // in // Height of characters/line, set during loading (doesn't change after loading)
///
///
/// C++:
/// imgui.h:3876
///
float Size
///
///
///
///
/// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
///
///
[FieldOffset(20)]
public float Size;
///
///
/// 4 // in // Density this is baked at
///
///
/// C++:
/// imgui.h:3877
///
float RasterizerDensity
///
///
///
///
/// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
///
///
[FieldOffset(24)]
public float RasterizerDensity;
///
///
/// 12-16 // out // Sparse. Index glyphs by Unicode code-point.
///
///
/// C++:
/// imgui.h:3880
///
ImVector<ImU16> IndexLookup
///
///
///
///
/// [Internal] Members: Hot ~28/36 bytes (for RenderText loop)
///
///
[FieldOffset(32)]
public ImVector IndexLookup;
///
///
/// 12-16 // out // All glyphs.
///
///
/// C++:
/// imgui.h:3881
///
ImVector<ImFontGlyph> Glyphs
///
///
///
///
/// [Internal] Members: Hot ~28/36 bytes (for RenderText loop)
///
///
[FieldOffset(48)]
public ImVector Glyphs;
///
///
/// 4 // out // Index of FontFallbackChar
///
///
/// C++:
/// imgui.h:3882
///
int FallbackGlyphIndex
///
///
///
///
/// [Internal] Members: Hot ~28/36 bytes (for RenderText loop)
///
///
[FieldOffset(64)]
public int FallbackGlyphIndex;
///
///
/// 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
///
///
/// C++:
/// imgui.h:3885
///
float Ascent
///
///
///
///
/// [Internal] Members: Cold
///
///
[FieldOffset(68)]
public float Ascent;
///
///
/// 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
///
///
/// C++:
/// imgui.h:3885
///
float Ascent, Descent
///
///
///
///
/// [Internal] Members: Cold
///
///
[FieldOffset(72)]
public float Descent;
///
///
/// 3 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact,
/// we approximate the cost of padding between glyphs)
///
///
/// C++:
/// imgui.h:3886
///
unsigned int MetricsTotalSurface:26
///
///
///
///
/// [Internal] Members: Cold
///
///
[FieldOffset(76)]
public uint MetricsTotalSurface;
///
///
/// 0 // // Queued for destroy
///
///
/// C++:
/// imgui.h:3887
///
unsigned int WantDestroy:1
///
///
///
///
/// [Internal] Members: Cold
///
///
[FieldOffset(79)]
public uint WantDestroy;
///
///
/// 0 // // Disable loading fallback in lower-level calls.
///
///
/// C++:
/// imgui.h:3888
///
unsigned int LoadNoFallback:1
///
///
///
///
/// [Internal] Members: Cold
///
///
[FieldOffset(79)]
public uint LoadNoFallback;
///
///
/// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without*
/// rendering/packing glyphs. Only advantagous if you know that the glyph is unlikely to actually be
/// rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on
/// the first Draw.
///
///
/// C++:
/// imgui.h:3889
///
unsigned int LoadNoRenderOnLayout:1
///
///
///
///
/// [Internal] Members: Cold
///
///
[FieldOffset(79)]
public uint LoadNoRenderOnLayout;
///
///
/// 4 // // Record of that time this was bounds
///
///
/// C++:
/// imgui.h:3890
///
int LastUsedFrame
///
///
///
///
/// [Internal] Members: Cold
///
///
[FieldOffset(80)]
public int LastUsedFrame;
///
///
/// 4 // // Unique ID for this baked storage
///
///
/// C++:
/// imgui.h:3891
///
ImGuiID BakedId
///
///
///
///
/// [Internal] Members: Cold
///
///
[FieldOffset(84)]
public ImGuiID BakedId;
///
///
/// 4-8 // in // Parent font
///
///
/// C++:
/// imgui.h:3892
///
ImFont* ContainerFont
///
///
///
///
/// [Internal] Members: Cold
///
///
[FieldOffset(88)]
public ImFontPtr ContainerFont;
///
///
/// 4-8 // // Font loader opaque storage (per baked font * sources): single contiguous buffer
/// allocated by imgui, passed to loader.
///
///
/// C++:
/// imgui.h:3893
///
void* FontLoaderDatas
///
///
///
///
/// [Internal] Members: Cold
///
///
[FieldOffset(96)]
public nint FontLoaderDatas;
}
///
///
/// Baked data for a ImFont at a given size.
///
///
/// C++:
/// imgui.h:185
///
struct ImFontBaked
///
///
///
///
/// Forward declarations: ImDrawList, ImFontAtlas layer
///
///
public unsafe partial struct ImFontBakedPtr(ImFontBaked* ptr) : INullable
{
private ImFontBaked* _ptr = ptr;
public ImFontBaked* Ptr => _ptr;
public bool IsNull() => _ptr is null;
public static implicit operator ImFontBakedPtr(ImFontBaked* ptr) => new(ptr);
public static implicit operator ImFontBaked*(ImFontBakedPtr wrapper) => wrapper.Ptr;
///
///
/// 12-16 // out // Sparse. Glyphs->AdvanceX in a directly indexable way (cache-friendly for CalcTextSize
/// functions which only this info, and are often bottleneck in large UI).
///
///
/// C++:
/// imgui.h:3874
///
ImVector<float> IndexAdvanceX
///
///
///
///
/// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
///
///
public ref ImVector IndexAdvanceX => ref Unsafe.AsRef>(&_ptr->IndexAdvanceX);
///
///
/// 4 // out // FindGlyph(FallbackChar)->AdvanceX
///
///
/// C++:
/// imgui.h:3875
///
float FallbackAdvanceX
///
///
///
///
/// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
///
///
public ref float FallbackAdvanceX => ref Unsafe.AsRef(&_ptr->FallbackAdvanceX);
///
///
/// 4 // in // Height of characters/line, set during loading (doesn't change after loading)
///
///
/// C++:
/// imgui.h:3876
///
float Size
///
///
///
///
/// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
///
///
public ref float Size => ref Unsafe.AsRef(&_ptr->Size);
///
///
/// 4 // in // Density this is baked at
///
///
/// C++:
/// imgui.h:3877
///
float RasterizerDensity
///
///
///
///
/// [Internal] Members: Hot ~20/24 bytes (for CalcTextSize)
///
///
public ref float RasterizerDensity => ref Unsafe.AsRef(&_ptr->RasterizerDensity);
///
///
/// 12-16 // out // Sparse. Index glyphs by Unicode code-point.
///
///
/// C++:
/// imgui.h:3880
///
ImVector<ImU16> IndexLookup
///
///
///
///
/// [Internal] Members: Hot ~28/36 bytes (for RenderText loop)
///
///
public ref ImVector IndexLookup => ref Unsafe.AsRef>(&_ptr->IndexLookup);
///
///
/// 12-16 // out // All glyphs.
///
///
/// C++:
/// imgui.h:3881
///
ImVector<ImFontGlyph> Glyphs
///
///
///
///
/// [Internal] Members: Hot ~28/36 bytes (for RenderText loop)
///
///
public ref ImVector Glyphs => ref Unsafe.AsRef>(&_ptr->Glyphs);
///
///
/// 4 // out // Index of FontFallbackChar
///
///
/// C++:
/// imgui.h:3882
///
int FallbackGlyphIndex
///
///
///
///
/// [Internal] Members: Hot ~28/36 bytes (for RenderText loop)
///
///
public ref int FallbackGlyphIndex => ref Unsafe.AsRef(&_ptr->FallbackGlyphIndex);
///
///
/// 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
///
///
/// C++:
/// imgui.h:3885
///
float Ascent
///
///
///
///
/// [Internal] Members: Cold
///
///
public ref float Ascent => ref Unsafe.AsRef(&_ptr->Ascent);
///
///
/// 4+4 // out // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] (unscaled)
///
///
/// C++:
/// imgui.h:3885
///
float Ascent, Descent
///
///
///
///
/// [Internal] Members: Cold
///
///
public ref float Descent => ref Unsafe.AsRef(&_ptr->Descent);
///
///
/// 3 // out // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact,
/// we approximate the cost of padding between glyphs)
///
///
/// C++:
/// imgui.h:3886
///
unsigned int MetricsTotalSurface:26
///
///
///
///
/// [Internal] Members: Cold
///
///
public ref uint MetricsTotalSurface => ref Unsafe.AsRef(&_ptr->MetricsTotalSurface);
///
///
/// 0 // // Queued for destroy
///
///
/// C++:
/// imgui.h:3887
///
unsigned int WantDestroy:1
///
///
///
///
/// [Internal] Members: Cold
///
///
public ref uint WantDestroy => ref Unsafe.AsRef(&_ptr->WantDestroy);
///
///
/// 0 // // Disable loading fallback in lower-level calls.
///
///
/// C++:
/// imgui.h:3888
///
unsigned int LoadNoFallback:1
///
///
///
///
/// [Internal] Members: Cold
///
///
public ref uint LoadNoFallback => ref Unsafe.AsRef(&_ptr->LoadNoFallback);
///
///
/// 0 // // Enable a two-steps mode where CalcTextSize() calls will load AdvanceX *without*
/// rendering/packing glyphs. Only advantagous if you know that the glyph is unlikely to actually be
/// rendered, otherwise it is slower because we'd do one query on the first CalcTextSize and one query on
/// the first Draw.
///
///
/// C++:
/// imgui.h:3889
///
unsigned int LoadNoRenderOnLayout:1
///
///
///
///
/// [Internal] Members: Cold
///
///
public ref uint LoadNoRenderOnLayout => ref Unsafe.AsRef(&_ptr->LoadNoRenderOnLayout);
///
///
/// 4 // // Record of that time this was bounds
///
///
/// C++:
/// imgui.h:3890
///
int LastUsedFrame
///
///
///
///
/// [Internal] Members: Cold
///
///
public ref int LastUsedFrame => ref Unsafe.AsRef(&_ptr->LastUsedFrame);
///
///
/// 4 // // Unique ID for this baked storage
///
///
/// C++:
/// imgui.h:3891
///
ImGuiID BakedId
///
///
///
///
/// [Internal] Members: Cold
///
///
public ref ImGuiID BakedId => ref Unsafe.AsRef(&_ptr->BakedId);
///
///
/// 4-8 // in // Parent font
///
///
/// C++:
/// imgui.h:3892
///
ImFont* ContainerFont
///
///
///
///
/// [Internal] Members: Cold
///
///
public ref ImFontPtr ContainerFont => ref Unsafe.AsRef(&_ptr->ContainerFont);
///
///
/// 4-8 // // Font loader opaque storage (per baked font * sources): single contiguous buffer
/// allocated by imgui, passed to loader.
///
///
/// C++:
/// imgui.h:3893
///
void* FontLoaderDatas
///
///
///
///
/// [Internal] Members: Cold
///
///
public ref nint FontLoaderDatas => ref Unsafe.AsRef(&_ptr->FontLoaderDatas);
}
}