//
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
namespace Brutal.ImGuiApi
{
///
///
/// Configuration data when adding a font or merging fonts
///
///
/// C++:
/// imgui.h:186
///
struct ImFontConfig
///
///
///
///
/// Forward declarations: ImDrawList, ImFontAtlas layer
///
///
[StructLayout(LayoutKind.Explicit, Size = 152)]
public unsafe partial struct ImFontConfig
{
///
/// <auto> // Name (strictly to ease debugging, hence limited size buffer)
///
[FieldOffset(0)]
public fixed byte Name[40];
///
///
/// // TTF/OTF data
///
///
/// C++:
/// imgui.h:3611
///
void* FontData
///
///
///
///
/// Data Source
///
///
[FieldOffset(40)]
public nint FontData;
///
///
/// // TTF/OTF data size
///
///
/// C++:
/// imgui.h:3612
///
int FontDataSize
///
///
///
///
/// Data Source
///
///
[FieldOffset(48)]
public int FontDataSize;
///
///
/// true // TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).
///
///
/// C++:
/// imgui.h:3613
///
bool FontDataOwnedByAtlas
///
///
///
///
/// Data Source
///
///
[FieldOffset(52)]
public Bool8 FontDataOwnedByAtlas;
///
///
/// false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g.
/// ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different
/// heights.
///
///
/// C++:
/// imgui.h:3616
///
bool MergeMode
///
///
///
///
/// Options
///
///
[FieldOffset(53)]
public Bool8 MergeMode;
///
///
/// false // Align every glyph AdvanceX to pixel boundaries. Useful e.g. if you are merging a non-pixel
/// aligned font with the default font. If enabled, you can set OversampleH/V to 1.
///
///
/// C++:
/// imgui.h:3617
///
bool PixelSnapH
///
///
///
///
/// Options
///
///
[FieldOffset(54)]
public Bool8 PixelSnapH;
///
///
/// true // Align Scaled GlyphOffset.y to pixel boundaries.
///
///
/// C++:
/// imgui.h:3618
///
bool PixelSnapV
///
///
///
///
/// Options
///
///
[FieldOffset(55)]
public Bool8 PixelSnapV;
///
///
/// 0 (2) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1 or 2 depending on
/// size. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save
/// memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.
///
///
/// C++:
/// imgui.h:3619
///
ImS8 OversampleH
///
///
///
///
/// Options
///
///
[FieldOffset(56)]
public sbyte OversampleH;
///
///
/// 0 (1) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1. This is not really
/// useful as we don't use sub-pixel positions on the Y axis.
///
///
/// C++:
/// imgui.h:3620
///
ImS8 OversampleV
///
///
///
///
/// Options
///
///
[FieldOffset(57)]
public sbyte OversampleV;
///
///
/// 0 // Explicitly specify Unicode codepoint of ellipsis character. When fonts are being merged
/// first specified ellipsis will be used.
///
///
/// C++:
/// imgui.h:3621
///
ImWchar EllipsisChar
///
///
///
///
/// Options
///
///
[FieldOffset(60)]
public uint EllipsisChar;
///
///
/// // Size in pixels for rasterizer (more or less maps to the resulting font height).
///
///
/// C++:
/// imgui.h:3622
///
float SizePixels
///
///
///
///
/// Options
///
///
[FieldOffset(64)]
public float SizePixels;
///
///
/// NULL // *LEGACY* THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. Pointer to a
/// user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).
///
///
/// C++:
/// imgui.h:3623
///
const ImWchar* GlyphRanges
///
///
///
///
/// Options
///
///
[FieldOffset(72)]
public Ptr GlyphRanges;
///
///
/// NULL // Pointer to a small user-provided list of Unicode ranges (2 value per range, values are
/// inclusive, zero-terminated list). This is very close to GlyphRanges[] but designed to exclude ranges
/// from a font source, when merging fonts with overlapping glyphs. Use "Input Glyphs Overlap Detection
/// Tool" to find about your overlapping ranges.
///
///
/// C++:
/// imgui.h:3624
///
const ImWchar* GlyphExcludeRanges
///
///
///
///
/// Options
///
///
[FieldOffset(80)]
public Ptr GlyphExcludeRanges;
///
///
/// 0, 0 // Offset (in pixels) all glyphs from this font input. Absolute value for default size, other
/// sizes will scale this value.
///
///
/// C++:
/// imgui.h:3626
///
ImVec2 GlyphOffset
///
///
///
///
/// Options
///
///
[FieldOffset(88)]
public float2 GlyphOffset;
///
///
/// 0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce
/// mono-space font. Absolute value for default size, other sizes will scale this value.
///
///
/// C++:
/// imgui.h:3627
///
float GlyphMinAdvanceX
///
///
///
///
/// Options
///
///
[FieldOffset(96)]
public float GlyphMinAdvanceX;
///
///
/// FLT_MAX // Maximum AdvanceX for glyphs
///
///
/// C++:
/// imgui.h:3628
///
float GlyphMaxAdvanceX
///
///
///
///
/// Options
///
///
[FieldOffset(100)]
public float GlyphMaxAdvanceX;
///
///
/// 0 // Extra spacing (in pixels) between glyphs. Please contact us if you are using this. //
/// FIXME-NEWATLAS: Intentionally unscaled
///
///
/// C++:
/// imgui.h:3629
///
float GlyphExtraAdvanceX
///
///
///
///
/// Options
///
///
[FieldOffset(104)]
public float GlyphExtraAdvanceX;
///
///
/// 0 // Index of font within TTF/OTF file
///
///
/// C++:
/// imgui.h:3630
///
ImU32 FontNo
///
///
///
///
/// Options
///
///
[FieldOffset(108)]
public uint FontNo;
///
///
/// 0 // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if
/// unsure.
///
///
/// C++:
/// imgui.h:3631
///
unsigned int FontLoaderFlags
///
///
///
///
/// Options
///
///
[FieldOffset(112)]
public uint FontLoaderFlags;
///
///
/// 1.0f // Linearly brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may
/// be a good workaround to make them more readable. This is a silly thing we may remove in the future.
///
///
/// C++:
/// imgui.h:3633
///
float RasterizerMultiply
///
///
///
///
/// Options
///
///
[FieldOffset(116)]
public float RasterizerMultiply;
///
///
/// 1.0f // [LEGACY: this only makes sense when ImGuiBackendFlags_RendererHasTextures is not supported]
/// DPI scale multiplier for rasterization. Not altering other font metrics: makes it easy to swap between
/// e.g. a 100% and a 400% fonts for a zooming display, or handle Retina screen. IMPORTANT: If you change
/// this it is expected that you increase/decrease font scale roughly to the inverse of this, otherwise
/// quality may look lowered.
///
///
/// C++:
/// imgui.h:3634
///
float RasterizerDensity
///
///
///
///
/// Options
///
///
[FieldOffset(120)]
public float RasterizerDensity;
///
///
/// Font flags (don't use just yet, will be exposed in upcoming 1.92.X updates)
///
///
/// C++:
/// imgui.h:3637
///
ImFontFlags Flags
///
///
///
///
/// [Internal]
///
///
[FieldOffset(124)]
public ImFontFlags Flags;
///
///
/// Target font (as we merging fonts, multiple ImFontConfig may target the same font)
///
///
/// C++:
/// imgui.h:3638
///
ImFont* DstFont
///
///
///
///
/// [Internal]
///
///
[FieldOffset(128)]
public ImFontPtr DstFont;
///
///
/// Custom font backend for this source (default source is the one stored in ImFontAtlas)
///
///
/// C++:
/// imgui.h:3639
///
const ImFontLoader* FontLoader
///
///
///
///
/// [Internal]
///
///
[FieldOffset(136)]
public Ptr FontLoader;
///
///
/// Font loader opaque storage (per font config)
///
///
/// C++:
/// imgui.h:3640
///
void* FontLoaderData
///
///
///
///
/// [Internal]
///
///
[FieldOffset(144)]
public nint FontLoaderData;
}
///
///
/// Configuration data when adding a font or merging fonts
///
///
/// C++:
/// imgui.h:186
///
struct ImFontConfig
///
///
///
///
/// Forward declarations: ImDrawList, ImFontAtlas layer
///
///
public unsafe partial struct ImFontConfigPtr(ImFontConfig* ptr) : INullable
{
private ImFontConfig* _ptr = ptr;
public ImFontConfig* Ptr => _ptr;
public bool IsNull() => _ptr is null;
public static implicit operator ImFontConfigPtr(ImFontConfig* ptr) => new(ptr);
public static implicit operator ImFontConfig*(ImFontConfigPtr wrapper) => wrapper.Ptr;
///
/// <auto> // Name (strictly to ease debugging, hence limited size buffer)
///
public Span Name => MemoryMarshal.CreateSpan(ref _ptr->Name[0], 40);
///
///
/// // TTF/OTF data
///
///
/// C++:
/// imgui.h:3611
///
void* FontData
///
///
///
///
/// Data Source
///
///
public ref nint FontData => ref Unsafe.AsRef(&_ptr->FontData);
///
///
/// // TTF/OTF data size
///
///
/// C++:
/// imgui.h:3612
///
int FontDataSize
///
///
///
///
/// Data Source
///
///
public ref int FontDataSize => ref Unsafe.AsRef(&_ptr->FontDataSize);
///
///
/// true // TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).
///
///
/// C++:
/// imgui.h:3613
///
bool FontDataOwnedByAtlas
///
///
///
///
/// Data Source
///
///
public ref bool FontDataOwnedByAtlas => ref Unsafe.AsRef(&_ptr->FontDataOwnedByAtlas);
///
///
/// false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g.
/// ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different
/// heights.
///
///
/// C++:
/// imgui.h:3616
///
bool MergeMode
///
///
///
///
/// Options
///
///
public ref bool MergeMode => ref Unsafe.AsRef(&_ptr->MergeMode);
///
///
/// false // Align every glyph AdvanceX to pixel boundaries. Useful e.g. if you are merging a non-pixel
/// aligned font with the default font. If enabled, you can set OversampleH/V to 1.
///
///
/// C++:
/// imgui.h:3617
///
bool PixelSnapH
///
///
///
///
/// Options
///
///
public ref bool PixelSnapH => ref Unsafe.AsRef(&_ptr->PixelSnapH);
///
///
/// true // Align Scaled GlyphOffset.y to pixel boundaries.
///
///
/// C++:
/// imgui.h:3618
///
bool PixelSnapV
///
///
///
///
/// Options
///
///
public ref bool PixelSnapV => ref Unsafe.AsRef(&_ptr->PixelSnapV);
///
///
/// 0 (2) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1 or 2 depending on
/// size. Note the difference between 2 and 3 is minimal. You can reduce this to 1 for large glyphs save
/// memory. Read https://github.com/nothings/stb/blob/master/tests/oversample/README.md for details.
///
///
/// C++:
/// imgui.h:3619
///
ImS8 OversampleH
///
///
///
///
/// Options
///
///
public ref sbyte OversampleH => ref Unsafe.AsRef(&_ptr->OversampleH);
///
///
/// 0 (1) // Rasterize at higher quality for sub-pixel positioning. 0 == auto == 1. This is not really
/// useful as we don't use sub-pixel positions on the Y axis.
///
///
/// C++:
/// imgui.h:3620
///
ImS8 OversampleV
///
///
///
///
/// Options
///
///
public ref sbyte OversampleV => ref Unsafe.AsRef(&_ptr->OversampleV);
///
///
/// 0 // Explicitly specify Unicode codepoint of ellipsis character. When fonts are being merged
/// first specified ellipsis will be used.
///
///
/// C++:
/// imgui.h:3621
///
ImWchar EllipsisChar
///
///
///
///
/// Options
///
///
public ref uint EllipsisChar => ref Unsafe.AsRef(&_ptr->EllipsisChar);
///
///
/// // Size in pixels for rasterizer (more or less maps to the resulting font height).
///
///
/// C++:
/// imgui.h:3622
///
float SizePixels
///
///
///
///
/// Options
///
///
public ref float SizePixels => ref Unsafe.AsRef(&_ptr->SizePixels);
///
///
/// NULL // *LEGACY* THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE. Pointer to a
/// user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list).
///
///
/// C++:
/// imgui.h:3623
///
const ImWchar* GlyphRanges
///
///
///
///
/// Options
///
///
public ref Ptr GlyphRanges => ref Unsafe.AsRef>(&_ptr->GlyphRanges);
///
///
/// NULL // Pointer to a small user-provided list of Unicode ranges (2 value per range, values are
/// inclusive, zero-terminated list). This is very close to GlyphRanges[] but designed to exclude ranges
/// from a font source, when merging fonts with overlapping glyphs. Use "Input Glyphs Overlap Detection
/// Tool" to find about your overlapping ranges.
///
///
/// C++:
/// imgui.h:3624
///
const ImWchar* GlyphExcludeRanges
///
///
///
///
/// Options
///
///
public ref Ptr GlyphExcludeRanges => ref Unsafe.AsRef>(&_ptr->GlyphExcludeRanges);
///
///
/// 0, 0 // Offset (in pixels) all glyphs from this font input. Absolute value for default size, other
/// sizes will scale this value.
///
///
/// C++:
/// imgui.h:3626
///
ImVec2 GlyphOffset
///
///
///
///
/// Options
///
///
public ref float2 GlyphOffset => ref Unsafe.AsRef(&_ptr->GlyphOffset);
///
///
/// 0 // Minimum AdvanceX for glyphs, set Min to align font icons, set both Min/Max to enforce
/// mono-space font. Absolute value for default size, other sizes will scale this value.
///
///
/// C++:
/// imgui.h:3627
///
float GlyphMinAdvanceX
///
///
///
///
/// Options
///
///
public ref float GlyphMinAdvanceX => ref Unsafe.AsRef(&_ptr->GlyphMinAdvanceX);
///
///
/// FLT_MAX // Maximum AdvanceX for glyphs
///
///
/// C++:
/// imgui.h:3628
///
float GlyphMaxAdvanceX
///
///
///
///
/// Options
///
///
public ref float GlyphMaxAdvanceX => ref Unsafe.AsRef(&_ptr->GlyphMaxAdvanceX);
///
///
/// 0 // Extra spacing (in pixels) between glyphs. Please contact us if you are using this. //
/// FIXME-NEWATLAS: Intentionally unscaled
///
///
/// C++:
/// imgui.h:3629
///
float GlyphExtraAdvanceX
///
///
///
///
/// Options
///
///
public ref float GlyphExtraAdvanceX => ref Unsafe.AsRef(&_ptr->GlyphExtraAdvanceX);
///
///
/// 0 // Index of font within TTF/OTF file
///
///
/// C++:
/// imgui.h:3630
///
ImU32 FontNo
///
///
///
///
/// Options
///
///
public ref uint FontNo => ref Unsafe.AsRef(&_ptr->FontNo);
///
///
/// 0 // Settings for custom font builder. THIS IS BUILDER IMPLEMENTATION DEPENDENT. Leave as zero if
/// unsure.
///
///
/// C++:
/// imgui.h:3631
///
unsigned int FontLoaderFlags
///
///
///
///
/// Options
///
///
public ref uint FontLoaderFlags => ref Unsafe.AsRef(&_ptr->FontLoaderFlags);
///
///
/// 1.0f // Linearly brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may
/// be a good workaround to make them more readable. This is a silly thing we may remove in the future.
///
///
/// C++:
/// imgui.h:3633
///
float RasterizerMultiply
///
///
///
///
/// Options
///
///
public ref float RasterizerMultiply => ref Unsafe.AsRef(&_ptr->RasterizerMultiply);
///
///
/// 1.0f // [LEGACY: this only makes sense when ImGuiBackendFlags_RendererHasTextures is not supported]
/// DPI scale multiplier for rasterization. Not altering other font metrics: makes it easy to swap between
/// e.g. a 100% and a 400% fonts for a zooming display, or handle Retina screen. IMPORTANT: If you change
/// this it is expected that you increase/decrease font scale roughly to the inverse of this, otherwise
/// quality may look lowered.
///
///
/// C++:
/// imgui.h:3634
///
float RasterizerDensity
///
///
///
///
/// Options
///
///
public ref float RasterizerDensity => ref Unsafe.AsRef(&_ptr->RasterizerDensity);
///
///
/// Font flags (don't use just yet, will be exposed in upcoming 1.92.X updates)
///
///
/// C++:
/// imgui.h:3637
///
ImFontFlags Flags
///
///
///
///
/// [Internal]
///
///
public ref ImFontFlags Flags => ref Unsafe.AsRef(&_ptr->Flags);
///
///
/// Target font (as we merging fonts, multiple ImFontConfig may target the same font)
///
///
/// C++:
/// imgui.h:3638
///
ImFont* DstFont
///
///
///
///
/// [Internal]
///
///
public ref ImFontPtr DstFont => ref Unsafe.AsRef(&_ptr->DstFont);
///
///
/// Custom font backend for this source (default source is the one stored in ImFontAtlas)
///
///
/// C++:
/// imgui.h:3639
///
const ImFontLoader* FontLoader
///
///
///
///
/// [Internal]
///
///
public ref Ptr FontLoader => ref Unsafe.AsRef>(&_ptr->FontLoader);
///
///
/// Font loader opaque storage (per font config)
///
///
/// C++:
/// imgui.h:3640
///
void* FontLoaderData
///
///
///
///
/// [Internal]
///
///
public ref nint FontLoaderData => ref Unsafe.AsRef(&_ptr->FontLoaderData);
}
}