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

11524 lines
614 KiB
C#

// <auto-generated/>
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
namespace Brutal.ImGuiApi
{
public partial class ImGui
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L396">imgui.h:396</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L4042">imgui.cpp:4042</see>
/// <br/><c>ImGuiContext* CreateContext(ImFontAtlas* shared_font_atlas = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Context creation and access
/// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts.
/// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
/// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details.
/// </code>
/// </remarks>
public static unsafe ImGuiContextPtr CreateContext(ImFontAtlasPtr sharedFontAtlas = default) =>
PInvoke.CreateContext(sharedFontAtlas);
/// <summary>
/// <para>
/// NULL = destroy current context
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L397">imgui.h:397</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L4053">imgui.cpp:4053</see>
/// <br/><c>void DestroyContext(ImGuiContext* ctx = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Context creation and access
/// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts.
/// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
/// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details.
/// </code>
/// </remarks>
public static unsafe void DestroyContext(ImGuiContextPtr ctx = default) => PInvoke.DestroyContext(ctx);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L398">imgui.h:398</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L4013">imgui.cpp:4013</see>
/// <br/><c>ImGuiContext* GetCurrentContext()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Context creation and access
/// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts.
/// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
/// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details.
/// </code>
/// <code>
/// Internal state access - if you want to share Dear ImGui state between modules (e.g. DLL) or allocate it yourself
/// Note that we still point to some static data and members (such as GFontAtlas), so the state instance you end up using will point to the static data within its module
/// </code>
/// </remarks>
public static unsafe ImGuiContextPtr GetCurrentContext() => PInvoke.GetCurrentContext();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L399">imgui.h:399</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L4018">imgui.cpp:4018</see>
/// <br/><c>void SetCurrentContext(ImGuiContext* ctx)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Context creation and access
/// - Each context create its own ImFontAtlas by default. You may instance one yourself and pass it to CreateContext() to share a font atlas between contexts.
/// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
/// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for details.
/// </code>
/// </remarks>
public static unsafe void SetCurrentContext(ImGuiContextPtr ctx) => PInvoke.SetCurrentContext(ctx);
/// <summary>
/// <para>
/// access the ImGuiIO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L402">imgui.h:402</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5083">imgui.cpp:5083</see>
/// <br/><c>ImGuiIO&amp; GetIO()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Main
/// </para>
/// </remarks>
public static unsafe ImGuiIOPtr GetIO() => PInvoke.GetIO();
/// <summary>
/// <para>
/// access the ImGuiPlatformIO structure (mostly hooks/functions to connect to platform/renderer and OS
/// Clipboard, IME etc.)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L403">imgui.h:403</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5096">imgui.cpp:5096</see>
/// <br/><c>ImGuiPlatformIO&amp; GetPlatformIO()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Main
/// </para>
/// </remarks>
public static unsafe ImGuiPlatformIOPtr GetPlatformIO() => PInvoke.GetPlatformIO();
/// <summary>
/// <para>
/// access the Style structure (colors, sizes). Always use PushStyleColor(), PushStyleVar() to modify style
/// mid-frame!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L404">imgui.h:404</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3468">imgui.cpp:3468</see>
/// <br/><c>ImGuiStyle&amp; GetStyle()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Main
/// </para>
/// </remarks>
public static unsafe ImGuiStylePtr GetStyle() => PInvoke.GetStyle();
/// <summary>
/// <para>
/// start a new Dear ImGui frame, you can submit any command from this point until Render()/EndFrame().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L405">imgui.h:405</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5493">imgui.cpp:5493</see>
/// <br/><c>void NewFrame()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Main
/// </para>
/// </remarks>
public static unsafe void NewFrame() => PInvoke.NewFrame();
/// <summary>
/// <para>
/// ends the Dear ImGui frame. automatically called by Render(). If you don't need to render data (skipping
/// rendering) you may call EndFrame() without Render()... but you'll have wasted CPU already! If you don't
/// need to render, better to not create any windows and not call NewFrame() at all!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L406">imgui.h:406</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6017">imgui.cpp:6017</see>
/// <br/><c>void EndFrame()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Main
/// </para>
/// <para>
/// This is normally called by Render(). You may want to call it directly if you want to avoid calling
/// Render() but the gain will be very minimal.
/// </para>
/// </remarks>
public static unsafe void EndFrame() => PInvoke.EndFrame();
/// <summary>
/// <para>
/// ends the Dear ImGui frame, finalize the draw data. You can then get call GetDrawData().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L407">imgui.h:407</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6131">imgui.cpp:6131</see>
/// <br/><c>void Render()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Main
/// </para>
/// <code>
/// Prepare the data for rendering so you can call GetDrawData()
/// (As with anything within the ImGui:: namespace this doesn't touch your GPU or graphics API at all:
/// it is the role of the ImGui_ImplXXXX_RenderDrawData() function provided by the renderer backend)
/// </code>
/// </remarks>
public static unsafe void Render() => PInvoke.Render();
/// <summary>
/// <para>
/// valid after Render() and until the next call to NewFrame(). Call ImGui_ImplXXXX_RenderDrawData()
/// function in your Renderer Backend to render.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L408">imgui.h:408</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5110">imgui.cpp:5110</see>
/// <br/><c>ImDrawData* GetDrawData()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Main
/// </para>
/// <para>
/// Pass this to your backend rendering function! Valid after Render() and until the next call to NewFrame()
/// </para>
/// </remarks>
public static unsafe ImDrawDataPtr GetDrawData() => PInvoke.GetDrawData();
/// <summary>
/// <para>
/// create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make
/// it always available in your application!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L411">imgui.h:411</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_demo.cpp#L346">imgui_demo.cpp:346</see>
/// <br/><c>void ShowDemoWindow(bool* p_open = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// <code>
/// Demonstrate most Dear ImGui features (this is big function!)
/// You may execute this function to experiment with the UI and understand what it does.
/// You may then search for keywords in the code when you are interested by a specific feature.
/// </code>
/// </remarks>
public static unsafe void ShowDemoWindow(ref bool pOpen)
{
fixed (bool* pOpen_fixed = &pOpen)
{
PInvoke.ShowDemoWindow((Bool8*)pOpen_fixed);
}
}
/// <summary>
/// <para>
/// create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make
/// it always available in your application!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L411">imgui.h:411</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_demo.cpp#L346">imgui_demo.cpp:346</see>
/// <br/><c>void ShowDemoWindow(bool* p_open = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// <code>
/// Demonstrate most Dear ImGui features (this is big function!)
/// You may execute this function to experiment with the UI and understand what it does.
/// You may then search for keywords in the code when you are interested by a specific feature.
/// </code>
/// </remarks>
public static unsafe void ShowDemoWindow() => PInvoke.ShowDemoWindow(null);
/// <summary>
/// <para>
/// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal
/// state, etc.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L412">imgui.h:412</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L21785">imgui.cpp:21785</see>
/// <br/><c>void ShowMetricsWindow(bool* p_open = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// </remarks>
public static unsafe void ShowMetricsWindow(ref bool pOpen)
{
fixed (bool* pOpen_fixed = &pOpen)
{
PInvoke.ShowMetricsWindow((Bool8*)pOpen_fixed);
}
}
/// <summary>
/// <para>
/// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal
/// state, etc.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L412">imgui.h:412</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L21785">imgui.cpp:21785</see>
/// <br/><c>void ShowMetricsWindow(bool* p_open = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// </remarks>
public static unsafe void ShowMetricsWindow() => PInvoke.ShowMetricsWindow(null);
/// <summary>
/// <para>
/// create Debug Log window. display a simplified log of important dear imgui events.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L413">imgui.h:413</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L23266">imgui.cpp:23266</see>
/// <br/><c>void ShowDebugLogWindow(bool* p_open = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// </remarks>
public static unsafe void ShowDebugLogWindow(ref bool pOpen)
{
fixed (bool* pOpen_fixed = &pOpen)
{
PInvoke.ShowDebugLogWindow((Bool8*)pOpen_fixed);
}
}
/// <summary>
/// <para>
/// create Debug Log window. display a simplified log of important dear imgui events.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L413">imgui.h:413</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L23266">imgui.cpp:23266</see>
/// <br/><c>void ShowDebugLogWindow(bool* p_open = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// </remarks>
public static unsafe void ShowDebugLogWindow() => PInvoke.ShowDebugLogWindow(null);
/// <summary>
/// <para>
/// create Stack Tool window. hover items with mouse to query information about the source of their unique
/// ID.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L414">imgui.h:414</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L23588">imgui.cpp:23588</see>
/// <br/><c>void ShowIDStackToolWindow(bool* p_open = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// <para>
/// ID Stack Tool: Display UI
/// </para>
/// </remarks>
public static unsafe void ShowIDStackToolWindow(ref bool pOpen)
{
fixed (bool* pOpen_fixed = &pOpen)
{
PInvoke.ShowIDStackToolWindow((Bool8*)pOpen_fixed);
}
}
/// <summary>
/// <para>
/// create Stack Tool window. hover items with mouse to query information about the source of their unique
/// ID.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L414">imgui.h:414</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L23588">imgui.cpp:23588</see>
/// <br/><c>void ShowIDStackToolWindow(bool* p_open = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// <para>
/// ID Stack Tool: Display UI
/// </para>
/// </remarks>
public static unsafe void ShowIDStackToolWindow() => PInvoke.ShowIDStackToolWindow(null);
/// <summary>
/// <para>
/// create About window. display Dear ImGui version, credits and build/system information.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L415">imgui.h:415</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_demo.cpp#L8137">imgui_demo.cpp:8137</see>
/// <br/><c>void ShowAboutWindow(bool* p_open = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// </remarks>
public static unsafe void ShowAboutWindow(ref bool pOpen)
{
fixed (bool* pOpen_fixed = &pOpen)
{
PInvoke.ShowAboutWindow((Bool8*)pOpen_fixed);
}
}
/// <summary>
/// <para>
/// create About window. display Dear ImGui version, credits and build/system information.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L415">imgui.h:415</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_demo.cpp#L8137">imgui_demo.cpp:8137</see>
/// <br/><c>void ShowAboutWindow(bool* p_open = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// </remarks>
public static unsafe void ShowAboutWindow() => PInvoke.ShowAboutWindow(null);
/// <summary>
/// <para>
/// add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to,
/// revert to and save to (else it uses the default style)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L416">imgui.h:416</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_demo.cpp#L8358">imgui_demo.cpp:8358</see>
/// <br/><c>void ShowStyleEditor(ImGuiStyle* ref = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// <para>
/// We omit the ImGui:: prefix in this function, as we don't expect user to be copy and pasting this code.
/// </para>
/// </remarks>
public static unsafe void ShowStyleEditor(ImGuiStylePtr @ref = default) => PInvoke.ShowStyleEditor(@ref);
/// <summary>
/// <para>
/// add style selector block (not a window), essentially a combo listing the default styles.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L417">imgui.h:417</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_demo.cpp#L8333">imgui_demo.cpp:8333</see>
/// <br/><c>bool ShowStyleSelector(const char* label)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// <code>
/// Demo helper function to select among default colors. See ShowStyleEditor() for more advanced options.
/// Here we use the simplified Combo() api that packs items into a single literal string.
/// Useful for quick combo boxes where the choices are known locally.
/// </code>
/// </remarks>
public static unsafe bool ShowStyleSelector(ImString label)
{
fixed (byte* label_fixed = label)
{
return PInvoke.ShowStyleSelector(label_fixed);
}
}
/// <summary>
/// <para>
/// add font selector block (not a window), essentially a combo listing the loaded fonts.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L418">imgui.h:418</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L23692">imgui.cpp:23692</see>
/// <br/><c>void ShowFontSelector(const char* label)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// <code>
/// Demo helper function to select among loaded fonts.
/// Here we use the regular BeginCombo()/EndCombo() api which is the more flexible one.
/// </code>
/// </remarks>
public static unsafe void ShowFontSelector(ImString label)
{
fixed (byte* label_fixed = label)
{
PInvoke.ShowFontSelector(label_fixed);
}
}
/// <summary>
/// <para>
/// add basic help/info block (not a window): how to manipulate ImGui as an end-user (mouse/keyboard
/// controls).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L419">imgui.h:419</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_demo.cpp#L8696">imgui_demo.cpp:8696</see>
/// <br/><c>void ShowUserGuide()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// <para>
/// We omit the ImGui:: prefix in this function, as we don't expect user to be copy and pasting this code.
/// </para>
/// </remarks>
public static unsafe void ShowUserGuide() => PInvoke.ShowUserGuide();
/// <summary>
/// <para>
/// get the compiled version string e.g. "1.80 WIP" (essentially the value for IMGUI_VERSION from the
/// compiled version of imgui.cpp)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L420">imgui.h:420</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5078">imgui.cpp:5078</see>
/// <br/><c>const char* GetVersion()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Demo, Debug, Information
/// </para>
/// </remarks>
public static unsafe ImString GetVersion() => Utf8.GetNullTerminatedSpan(PInvoke.GetVersion());
/// <summary>
/// <para>
/// new, recommended style (default)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L423">imgui.h:423</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_draw.cpp#L184">imgui_draw.cpp:184</see>
/// <br/><c>void StyleColorsDark(ImGuiStyle* dst = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Styles
/// </para>
/// </remarks>
public static unsafe void StyleColorsDark(ImGuiStylePtr dst = default) => PInvoke.StyleColorsDark(dst);
/// <summary>
/// <para>
/// best used with borders and a custom, thicker font
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L424">imgui.h:424</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_draw.cpp#L319">imgui_draw.cpp:319</see>
/// <br/><c>void StyleColorsLight(ImGuiStyle* dst = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Styles
/// </para>
/// <para>
/// Those light colors are better suited with a thicker font than the default one + FrameBorder
/// </para>
/// </remarks>
public static unsafe void StyleColorsLight(ImGuiStylePtr dst = default) => PInvoke.StyleColorsLight(dst);
/// <summary>
/// <para>
/// classic imgui style
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L425">imgui.h:425</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_draw.cpp#L251">imgui_draw.cpp:251</see>
/// <br/><c>void StyleColorsClassic(ImGuiStyle* dst = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Styles
/// </para>
/// </remarks>
public static unsafe void StyleColorsClassic(ImGuiStylePtr dst = default) => PInvoke.StyleColorsClassic(dst);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L439">imgui.h:439</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L7571">imgui.cpp:7571</see>
/// <br/><c>bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows
/// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack.
/// - Passing 'bool* p_open != NULL' shows a window-closing widget in the upper-right corner of the window,
/// which clicking will set the boolean to false when clicked.
/// - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times.
/// Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin().
/// - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
/// anything to the window. Always call a matching End() for each Begin() call, regardless of its return value!
/// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions
/// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding
/// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
/// - Note that the bottom of window stack always contains a window called "Debug".
/// </code>
/// <code>
/// Push a new Dear ImGui window to add widgets to.
/// - A default window called "Debug" is automatically stacked at the beginning of every frame so you can use widgets without explicitly calling a Begin/End pair.
/// - Begin/End can be called multiple times during the frame with the same window name to append content.
/// - The window name is used as a unique identifier to preserve window information across frames (and save rudimentary information to the .ini file).
/// You can use the "##" or "###" markers to use the same label with different id, or same id with different label. See documentation at the top of this file.
/// - Return false when window is collapsed, so you can early out in your code. You always need to call ImGui::End() even if false is returned.
/// - Passing 'bool* p_open' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed.
/// </code>
/// </remarks>
public static unsafe bool Begin(ImString name, ref bool pOpen, ImGuiWindowFlags flags = default)
{
fixed (bool* pOpen_fixed = &pOpen)
{
fixed (byte* name_fixed = name)
{
return PInvoke.Begin(name_fixed, (Bool8*)pOpen_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L439">imgui.h:439</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L7571">imgui.cpp:7571</see>
/// <br/><c>bool Begin(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows
/// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack.
/// - Passing 'bool* p_open != NULL' shows a window-closing widget in the upper-right corner of the window,
/// which clicking will set the boolean to false when clicked.
/// - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times.
/// Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin().
/// - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
/// anything to the window. Always call a matching End() for each Begin() call, regardless of its return value!
/// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions
/// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding
/// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
/// - Note that the bottom of window stack always contains a window called "Debug".
/// </code>
/// <code>
/// Push a new Dear ImGui window to add widgets to.
/// - A default window called "Debug" is automatically stacked at the beginning of every frame so you can use widgets without explicitly calling a Begin/End pair.
/// - Begin/End can be called multiple times during the frame with the same window name to append content.
/// - The window name is used as a unique identifier to preserve window information across frames (and save rudimentary information to the .ini file).
/// You can use the "##" or "###" markers to use the same label with different id, or same id with different label. See documentation at the top of this file.
/// - Return false when window is collapsed, so you can early out in your code. You always need to call ImGui::End() even if false is returned.
/// - Passing 'bool* p_open' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed.
/// </code>
/// </remarks>
public static unsafe bool Begin(ImString name, ImGuiWindowFlags flags = default)
{
fixed (byte* name_fixed = name)
{
return PInvoke.Begin(name_fixed, null, flags);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L440">imgui.h:440</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8526">imgui.cpp:8526</see>
/// <br/><c>void End()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows
/// - Begin() = push window to the stack and start appending to it. End() = pop window from the stack.
/// - Passing 'bool* p_open != NULL' shows a window-closing widget in the upper-right corner of the window,
/// which clicking will set the boolean to false when clicked.
/// - You may append multiple times to the same window during the same frame by calling Begin()/End() pairs multiple times.
/// Some information such as 'flags' or 'p_open' will only be considered by the first call to Begin().
/// - Begin() return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
/// anything to the window. Always call a matching End() for each Begin() call, regardless of its return value!
/// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions
/// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding
/// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
/// - Note that the bottom of window stack always contains a window called "Debug".
/// </code>
/// </remarks>
public static unsafe void End() => PInvoke.End();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L460">imgui.h:460</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6471">imgui.cpp:6471</see>
/// <br/>
/// <c>bool BeginChild(const char* str_id, const ImVec2&amp; size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Child Windows
/// - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
/// - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false".
/// This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true.
/// Consider updating your old code:
/// BeginChild("Name", size, false) -&gt; Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None);
/// BeginChild("Name", size, true) -&gt; Begin("Name", size, ImGuiChildFlags_Borders);
/// - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)):
/// == 0.0f: use remaining parent window size for this axis.
/// &gt; 0.0f: use specified size for this axis.
/// &lt; 0.0f: right/bottom-align to specified distance from available content boundaries.
/// - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents.
/// Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended.
/// - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
/// anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value.
/// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions
/// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding
/// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
/// </code>
/// <code>
/// Prior to v1.90 2023/10/16, the BeginChild() function took a 'bool border = false' parameter instead of 'ImGuiChildFlags child_flags = 0'.
/// ImGuiChildFlags_Borders is defined as always == 1 in order to allow old code passing 'true'. Read comments in imgui.h for details!
/// </code>
/// </remarks>
public static unsafe bool BeginChild(
ImString strId,
in float2? size = default,
ImGuiChildFlags childFlags = default,
ImGuiWindowFlags windowFlags = default
)
{
var size_default = size ?? new float2(0f, 0f);
fixed (byte* strId_fixed = strId)
{
return PInvoke.BeginChild_0(strId_fixed, &size_default, childFlags, windowFlags);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L461">imgui.h:461</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6477">imgui.cpp:6477</see>
/// <br/>
/// <c>bool BeginChild(ImGuiID id, const ImVec2&amp; size = ImVec2(0, 0), ImGuiChildFlags child_flags = 0, ImGuiWindowFlags window_flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Child Windows
/// - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
/// - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false".
/// This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true.
/// Consider updating your old code:
/// BeginChild("Name", size, false) -&gt; Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None);
/// BeginChild("Name", size, true) -&gt; Begin("Name", size, ImGuiChildFlags_Borders);
/// - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)):
/// == 0.0f: use remaining parent window size for this axis.
/// &gt; 0.0f: use specified size for this axis.
/// &lt; 0.0f: right/bottom-align to specified distance from available content boundaries.
/// - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents.
/// Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended.
/// - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
/// anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value.
/// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions
/// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding
/// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
/// </code>
/// </remarks>
public static unsafe bool BeginChild(
ImGuiID id,
in float2? size = default,
ImGuiChildFlags childFlags = default,
ImGuiWindowFlags windowFlags = default
)
{
var size_default = size ?? new float2(0f, 0f);
return PInvoke.BeginChild_1(id, &size_default, childFlags, windowFlags);
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L462">imgui.h:462</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6611">imgui.cpp:6611</see>
/// <br/><c>void EndChild()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Child Windows
/// - Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
/// - Before 1.90 (November 2023), the "ImGuiChildFlags child_flags = 0" parameter was "bool border = false".
/// This API is backward compatible with old code, as we guarantee that ImGuiChildFlags_Borders == true.
/// Consider updating your old code:
/// BeginChild("Name", size, false) -&gt; Begin("Name", size, 0); or Begin("Name", size, ImGuiChildFlags_None);
/// BeginChild("Name", size, true) -&gt; Begin("Name", size, ImGuiChildFlags_Borders);
/// - Manual sizing (each axis can use a different setting e.g. ImVec2(0.0f, 400.0f)):
/// == 0.0f: use remaining parent window size for this axis.
/// &gt; 0.0f: use specified size for this axis.
/// &lt; 0.0f: right/bottom-align to specified distance from available content boundaries.
/// - Specifying ImGuiChildFlags_AutoResizeX or ImGuiChildFlags_AutoResizeY makes the sizing automatic based on child contents.
/// Combining both ImGuiChildFlags_AutoResizeX _and_ ImGuiChildFlags_AutoResizeY defeats purpose of a scrolling region and is NOT recommended.
/// - BeginChild() returns false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting
/// anything to the window. Always call a matching EndChild() for each BeginChild() call, regardless of its return value.
/// [Important: due to legacy reason, Begin/End and BeginChild/EndChild are inconsistent with all other functions
/// such as BeginMenu/EndMenu, BeginPopup/EndPopup, etc. where the EndXXX call should only be called if the corresponding
/// BeginXXX function returned true. Begin and BeginChild are the only odd ones out. Will be fixed in a future update.]
/// </code>
/// </remarks>
public static unsafe void EndChild() => PInvoke.EndChild();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L466">imgui.h:466</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8960">imgui.cpp:8960</see>
/// <br/><c>bool IsWindowAppearing()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// </remarks>
public static unsafe bool IsWindowAppearing() => PInvoke.IsWindowAppearing();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L467">imgui.h:467</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8954">imgui.cpp:8954</see>
/// <br/><c>bool IsWindowCollapsed()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// </remarks>
public static unsafe bool IsWindowCollapsed() => PInvoke.IsWindowCollapsed();
/// <summary>
/// <para>
/// is current window focused? or its root/child, depending on flags. see flags for options.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L468">imgui.h:468</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L13214">imgui.cpp:13214</see>
/// <br/><c>bool IsWindowFocused(ImGuiFocusedFlags flags=0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// <para>
/// Similar to IsWindowHovered()
/// </para>
/// </remarks>
public static unsafe bool IsWindowFocused(ImGuiFocusedFlags flags = default) => PInvoke.IsWindowFocused(flags);
/// <summary>
/// <para>
/// is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for
/// options. IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or
/// to your underlying app, you should not use this function! Use the 'io.WantCaptureMouse' boolean for
/// that! Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my
/// application?" for details.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L469">imgui.h:469</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8764">imgui.cpp:8764</see>
/// <br/><c>bool IsWindowHovered(ImGuiHoveredFlags flags=0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// <code>
/// Is current window hovered and hoverable (e.g. not blocked by a popup/modal)? See ImGuiHoveredFlags_ for options.
/// IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app,
/// you should not use this function! Use the 'io.WantCaptureMouse' boolean for that!
/// Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details.
/// </code>
/// </remarks>
public static unsafe bool IsWindowHovered(ImGuiHoveredFlags flags = default) => PInvoke.IsWindowHovered(flags);
/// <summary>
/// <para>
/// get draw list associated to the current window, to append your own drawing primitives
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L470">imgui.h:470</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9068">imgui.cpp:9068</see>
/// <br/><c>ImDrawList* GetWindowDrawList()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// </remarks>
public static unsafe ImDrawListPtr GetWindowDrawList() => PInvoke.GetWindowDrawList();
/// <summary>
/// <para>
/// get DPI scale currently associated to the current window's viewport.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L471">imgui.h:471</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9074">imgui.cpp:9074</see>
/// <br/><c>float GetWindowDpiScale()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// </remarks>
public static unsafe float GetWindowDpiScale() => PInvoke.GetWindowDpiScale();
/// <summary>
/// <para>
/// get current window position in screen space (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always
/// using GetCursorScreenPos() and GetContentRegionAvail() instead)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L472">imgui.h:472</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8834">imgui.cpp:8834</see>
/// <br/><c>ImVec2 GetWindowPos()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// </remarks>
public static unsafe float2 GetWindowPos() => PInvoke.GetWindowPos();
/// <summary>
/// <para>
/// get current window size (IT IS UNLIKELY YOU EVER NEED TO USE THIS. Consider always using
/// GetCursorScreenPos() and GetContentRegionAvail() instead)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L473">imgui.h:473</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8877">imgui.cpp:8877</see>
/// <br/><c>ImVec2 GetWindowSize()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// </remarks>
public static unsafe float2 GetWindowSize() => PInvoke.GetWindowSize();
/// <summary>
/// <para>
/// get current window width (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().x.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L474">imgui.h:474</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8822">imgui.cpp:8822</see>
/// <br/><c>float GetWindowWidth()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// </remarks>
public static unsafe float GetWindowWidth() => PInvoke.GetWindowWidth();
/// <summary>
/// <para>
/// get current window height (IT IS UNLIKELY YOU EVER NEED TO USE THIS). Shortcut for GetWindowSize().y.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L475">imgui.h:475</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8828">imgui.cpp:8828</see>
/// <br/><c>float GetWindowHeight()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// </remarks>
public static unsafe float GetWindowHeight() => PInvoke.GetWindowHeight();
/// <summary>
/// <para>
/// get viewport currently associated to the current window.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L476">imgui.h:476</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9080">imgui.cpp:9080</see>
/// <br/><c>ImGuiViewport*GetWindowViewport()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Utilities
/// - 'current window' = the window we are appending into while inside a Begin()/End() block. 'next window' = next window we will Begin() into.
/// </code>
/// </remarks>
public static unsafe ImGuiViewportPtr GetWindowViewport() => PInvoke.GetWindowViewport();
/// <summary>
/// <para>
/// set next window position. call before Begin(). use pivot=(0.5f,0.5f) to center on given point, etc.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L480">imgui.h:480</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8972">imgui.cpp:8972</see>
/// <br/>
/// <c>void SetNextWindowPos(const ImVec2&amp; pos, ImGuiCond cond = 0, const ImVec2&amp; pivot = ImVec2(0, 0))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetNextWindowPos(in float2 pos, ImGuiCond cond = default, in float2? pivot = default)
{
var pivot_default = pivot ?? new float2(0f, 0f);
fixed (float2* pos_fixed = &pos)
{
PInvoke.SetNextWindowPos(pos_fixed, cond, &pivot_default);
}
}
/// <summary>
/// <para>
/// set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin()
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L481">imgui.h:481</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8983">imgui.cpp:8983</see>
/// <br/><c>void SetNextWindowSize(const ImVec2&amp; size, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetNextWindowSize(in float2 size, ImGuiCond cond = default)
{
fixed (float2* size_fixed = &size)
{
PInvoke.SetNextWindowSize(size_fixed, cond);
}
}
/// <summary>
/// <para>
/// set next window size limits. use 0.0f or FLT_MAX if you don't want limits. Use -1 for both min and max
/// of same axis to preserve current size (which itself is a constraint). Use callback to apply non-trivial
/// programmatic constraints.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L482">imgui.h:482</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8996">imgui.cpp:8996</see>
/// <br/>
/// <c>void SetNextWindowSizeConstraints(const ImVec2&amp; size_min, const ImVec2&amp; size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// <code>
/// For each axis:
/// - Use 0.0f as min or FLT_MAX as max if you don't want limits, e.g. size_min = (500.0f, 0.0f), size_max = (FLT_MAX, FLT_MAX) sets a minimum width.
/// - Use -1 for both min and max of same axis to preserve current size which itself is a constraint.
/// - See "Demo-&gt;Examples-&gt;Constrained-resizing window" for examples.
/// </code>
/// </remarks>
public static unsafe void SetNextWindowSizeConstraints(
in float2 sizeMin,
in float2 sizeMax,
ImGuiSizeCallback? customCallback = default,
Ptr customCallbackData = default
)
{
fixed (float2* sizeMax_fixed = &sizeMax)
{
fixed (float2* sizeMin_fixed = &sizeMin)
{
PInvoke.SetNextWindowSizeConstraints(
sizeMin_fixed,
sizeMax_fixed,
customCallback == null ? 0 : Marshal.GetFunctionPointerForDelegate(customCallback),
customCallbackData
);
}
}
}
/// <summary>
/// <para>
/// set next window size limits. use 0.0f or FLT_MAX if you don't want limits. Use -1 for both min and max
/// of same axis to preserve current size (which itself is a constraint). Use callback to apply non-trivial
/// programmatic constraints.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L482">imgui.h:482</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8996">imgui.cpp:8996</see>
/// <br/>
/// <c>void SetNextWindowSizeConstraints(const ImVec2&amp; size_min, const ImVec2&amp; size_max, ImGuiSizeCallback custom_callback = NULL, void* custom_callback_data = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// <code>
/// For each axis:
/// - Use 0.0f as min or FLT_MAX as max if you don't want limits, e.g. size_min = (500.0f, 0.0f), size_max = (FLT_MAX, FLT_MAX) sets a minimum width.
/// - Use -1 for both min and max of same axis to preserve current size which itself is a constraint.
/// - See "Demo-&gt;Examples-&gt;Constrained-resizing window" for examples.
/// </code>
/// </remarks>
public static unsafe void SetNextWindowSizeConstraints(
in float2 sizeMin,
in float2 sizeMax,
delegate* unmanaged[Cdecl]<ImGuiSizeCallbackData*, void> customCallback,
Ptr customCallbackData = default
)
{
fixed (float2* sizeMax_fixed = &sizeMax)
{
fixed (float2* sizeMin_fixed = &sizeMin)
{
PInvoke.SetNextWindowSizeConstraints(
sizeMin_fixed,
sizeMax_fixed,
(nint)customCallback,
customCallbackData
);
}
}
}
/// <summary>
/// <para>
/// set next window content size (~ scrollable client area, which enforce the range of scrollbars). Not
/// including window decorations (title bar, menu bar, etc.) nor WindowPadding. set an axis to 0.0f to leave
/// it automatic. call before Begin()
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L483">imgui.h:483</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9007">imgui.cpp:9007</see>
/// <br/><c>void SetNextWindowContentSize(const ImVec2&amp; size)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// <code>
/// Content size = inner scrollable rectangle, padded with WindowPadding.
/// SetNextWindowContentSize(ImVec2(100,100) + ImGuiWindowFlags_AlwaysAutoResize will always allow submitting a 100x100 item.
/// </code>
/// </remarks>
public static unsafe void SetNextWindowContentSize(in float2 size)
{
fixed (float2* size_fixed = &size)
{
PInvoke.SetNextWindowContentSize(size_fixed);
}
}
/// <summary>
/// <para>
/// set next window collapsed state. call before Begin()
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L484">imgui.h:484</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9021">imgui.cpp:9021</see>
/// <br/><c>void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond = default) =>
PInvoke.SetNextWindowCollapsed(collapsed, cond);
/// <summary>
/// <para>
/// set next window to be focused / top-most. call before Begin()
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L485">imgui.h:485</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L13207">imgui.cpp:13207</see>
/// <br/><c>void SetNextWindowFocus()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetNextWindowFocus() => PInvoke.SetNextWindowFocus();
/// <summary>
/// <para>
/// set next window scrolling value (use &lt; 0.0f to not affect a given axis).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L486">imgui.h:486</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9014">imgui.cpp:9014</see>
/// <br/><c>void SetNextWindowScroll(const ImVec2&amp; scroll)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetNextWindowScroll(in float2 scroll)
{
fixed (float2* scroll_fixed = &scroll)
{
PInvoke.SetNextWindowScroll(scroll_fixed);
}
}
/// <summary>
/// <para>
/// set next window background color alpha. helper to easily override the Alpha component of
/// ImGuiCol_WindowBg/ChildBg/PopupBg. you may also use ImGuiWindowFlags_NoBackground.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L487">imgui.h:487</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9030">imgui.cpp:9030</see>
/// <br/><c>void SetNextWindowBgAlpha(float alpha)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetNextWindowBgAlpha(float alpha) => PInvoke.SetNextWindowBgAlpha(alpha);
/// <summary>
/// <para>
/// set next window viewport
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L488">imgui.h:488</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9037">imgui.cpp:9037</see>
/// <br/><c>void SetNextWindowViewport(ImGuiID viewport_id)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetNextWindowViewport(ImGuiID viewportId) =>
PInvoke.SetNextWindowViewport(viewportId);
/// <summary>
/// <para>
/// (not recommended) set current window position - call within Begin()/End(). prefer using
/// SetNextWindowPos(), as this may incur tearing and side-effects.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L489">imgui.h:489</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8865">imgui.cpp:8865</see>
/// <br/><c>void SetWindowPos(const ImVec2&amp; pos, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetWindowPos(in float2 pos, ImGuiCond cond = default)
{
fixed (float2* pos_fixed = &pos)
{
PInvoke.SetWindowPos_0(pos_fixed, cond);
}
}
/// <summary>
/// <para>
/// (not recommended) set current window size - call within Begin()/End(). set to ImVec2(0, 0) to force an
/// auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L490">imgui.h:490</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8912">imgui.cpp:8912</see>
/// <br/><c>void SetWindowSize(const ImVec2&amp; size, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetWindowSize(in float2 size, ImGuiCond cond = default)
{
fixed (float2* size_fixed = &size)
{
PInvoke.SetWindowSize_0(size_fixed, cond);
}
}
/// <summary>
/// <para>
/// (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L491">imgui.h:491</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8949">imgui.cpp:8949</see>
/// <br/><c>void SetWindowCollapsed(bool collapsed, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetWindowCollapsed(bool collapsed, ImGuiCond cond = default) =>
PInvoke.SetWindowCollapsed_0(collapsed, cond);
/// <summary>
/// <para>
/// (not recommended) set current window to be focused / top-most. prefer using SetNextWindowFocus().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L492">imgui.h:492</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L13189">imgui.cpp:13189</see>
/// <br/><c>void SetWindowFocus()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetWindowFocus() => PInvoke.SetWindowFocus_0();
/// <summary>
/// <para>
/// set named window position.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L493">imgui.h:493</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8871">imgui.cpp:8871</see>
/// <br/><c>void SetWindowPos(const char* name, const ImVec2&amp; pos, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetWindowPos(ImString name, in float2 pos, ImGuiCond cond = default)
{
fixed (float2* pos_fixed = &pos)
{
fixed (byte* name_fixed = name)
{
PInvoke.SetWindowPos_1(name_fixed, pos_fixed, cond);
}
}
}
/// <summary>
/// <para>
/// set named window size. set axis to 0.0f to force an auto-fit on this axis.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L494">imgui.h:494</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8917">imgui.cpp:8917</see>
/// <br/><c>void SetWindowSize(const char* name, const ImVec2&amp; size, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetWindowSize(ImString name, in float2 size, ImGuiCond cond = default)
{
fixed (float2* size_fixed = &size)
{
fixed (byte* name_fixed = name)
{
PInvoke.SetWindowSize_1(name_fixed, size_fixed, cond);
}
}
}
/// <summary>
/// <para>
/// set named window collapsed state
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L495">imgui.h:495</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8966">imgui.cpp:8966</see>
/// <br/><c>void SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetWindowCollapsed(ImString name, bool collapsed, ImGuiCond cond = default)
{
fixed (byte* name_fixed = name)
{
PInvoke.SetWindowCollapsed_1(name_fixed, collapsed, cond);
}
}
/// <summary>
/// <para>
/// set named window to be focused / top-most. use NULL to remove focus.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L496">imgui.h:496</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L13194">imgui.cpp:13194</see>
/// <br/><c>void SetWindowFocus(const char* name)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Window manipulation
/// - Prefer using SetNextXXX functions (before Begin) rather that SetXXX functions (after Begin).
/// </code>
/// </remarks>
public static unsafe void SetWindowFocus(ImString name)
{
fixed (byte* name_fixed = name)
{
PInvoke.SetWindowFocus_1(name_fixed);
}
}
/// <summary>
/// <para>
/// get scrolling amount [0 .. GetScrollMaxX()]
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L501">imgui.h:501</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12320">imgui.cpp:12320</see>
/// <br/><c>float GetScrollX()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Scrolling
/// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
/// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/// </code>
/// </remarks>
public static unsafe float GetScrollX() => PInvoke.GetScrollX();
/// <summary>
/// <para>
/// get scrolling amount [0 .. GetScrollMaxY()]
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L502">imgui.h:502</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12326">imgui.cpp:12326</see>
/// <br/><c>float GetScrollY()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Scrolling
/// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
/// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/// </code>
/// </remarks>
public static unsafe float GetScrollY() => PInvoke.GetScrollY();
/// <summary>
/// <para>
/// set scrolling amount [0 .. GetScrollMaxX()]
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L503">imgui.h:503</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12358">imgui.cpp:12358</see>
/// <br/><c>void SetScrollX(float scroll_x)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Scrolling
/// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
/// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/// </code>
/// </remarks>
public static unsafe void SetScrollX(float scrollX) => PInvoke.SetScrollX(scrollX);
/// <summary>
/// <para>
/// set scrolling amount [0 .. GetScrollMaxY()]
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L504">imgui.h:504</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12364">imgui.cpp:12364</see>
/// <br/><c>void SetScrollY(float scroll_y)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Scrolling
/// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
/// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/// </code>
/// </remarks>
public static unsafe void SetScrollY(float scrollY) => PInvoke.SetScrollY(scrollY);
/// <summary>
/// <para>
/// get maximum scrolling amount ~~ ContentSize.x - WindowSize.x - DecorationsSize.x
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L505">imgui.h:505</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12332">imgui.cpp:12332</see>
/// <br/><c>float GetScrollMaxX()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Scrolling
/// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
/// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/// </code>
/// </remarks>
public static unsafe float GetScrollMaxX() => PInvoke.GetScrollMaxX();
/// <summary>
/// <para>
/// get maximum scrolling amount ~~ ContentSize.y - WindowSize.y - DecorationsSize.y
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L506">imgui.h:506</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12338">imgui.cpp:12338</see>
/// <br/><c>float GetScrollMaxY()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Scrolling
/// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
/// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/// </code>
/// </remarks>
public static unsafe float GetScrollMaxY() => PInvoke.GetScrollMaxY();
/// <summary>
/// <para>
/// adjust scrolling amount to make current cursor position visible. center_x_ratio=0.0: left, 0.5: center,
/// 1.0: right. When using to make a "default/current item" visible, consider using SetItemDefaultFocus()
/// instead.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L507">imgui.h:507</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12409">imgui.cpp:12409</see>
/// <br/><c>void SetScrollHereX(float center_x_ratio = 0.5f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Scrolling
/// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
/// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/// </code>
/// <para>
/// center_x_ratio: 0.0f left of last item, 0.5f horizontal center of last item, 1.0f right of last item.
/// </para>
/// </remarks>
public static unsafe void SetScrollHereX(float centerXRatio = 0.5f) => PInvoke.SetScrollHereX(centerXRatio);
/// <summary>
/// <para>
/// adjust scrolling amount to make current cursor position visible. center_y_ratio=0.0: top, 0.5: center,
/// 1.0: bottom. When using to make a "default/current item" visible, consider using SetItemDefaultFocus()
/// instead.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L508">imgui.h:508</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12422">imgui.cpp:12422</see>
/// <br/><c>void SetScrollHereY(float center_y_ratio = 0.5f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Scrolling
/// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
/// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/// </code>
/// <para>
/// center_y_ratio: 0.0f top of last item, 0.5f vertical center of last item, 1.0f bottom of last item.
/// </para>
/// </remarks>
public static unsafe void SetScrollHereY(float centerYRatio = 0.5f) => PInvoke.SetScrollHereY(centerYRatio);
/// <summary>
/// <para>
/// adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to
/// compute a valid position.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L509">imgui.h:509</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12396">imgui.cpp:12396</see>
/// <br/><c>void SetScrollFromPosX(float local_x, float center_x_ratio = 0.5f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Scrolling
/// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
/// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/// </code>
/// </remarks>
public static unsafe void SetScrollFromPosX(float localX, float centerXRatio = 0.5f) =>
PInvoke.SetScrollFromPosX(localX, centerXRatio);
/// <summary>
/// <para>
/// adjust scrolling amount to make given position visible. Generally GetCursorStartPos() + offset to
/// compute a valid position.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L510">imgui.h:510</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12402">imgui.cpp:12402</see>
/// <br/><c>void SetScrollFromPosY(float local_y, float center_y_ratio = 0.5f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Windows Scrolling
/// - Any change of Scroll will be applied at the beginning of next frame in the first call to Begin().
/// - You may instead use SetNextWindowScroll() prior to calling Begin() to avoid this delay, as an alternative to using SetScrollX()/SetScrollY().
/// </code>
/// </remarks>
public static unsafe void SetScrollFromPosY(float localY, float centerYRatio = 0.5f) =>
PInvoke.SetScrollFromPosY(localY, centerYRatio);
/// <summary>
/// <para>
/// Use NULL as a shortcut to keep current font. Use 0.0f to keep current size.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L528">imgui.h:528</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9508">imgui.cpp:9508</see>
/// <br/><c>void PushFont(ImFont* font, float font_size_base_unscaled)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Parameters stacks (font)
/// - PushFont(font, 0.0f) // Change font and keep current size
/// - PushFont(NULL, 20.0f) // Keep font and change current size
/// - PushFont(font, 20.0f) // Change font and set size to 20.0f
/// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size.
/// - PushFont(font, font-&gt;LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior.
/// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted.
/// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition.
/// - PushFont(font) before 1.92 = PushFont(font, font-&gt;LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function.
/// *IMPORTANT* global scale factors are applied over the provided size.
/// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more.
/// - If you want to apply a factor to the _current_ font size:
/// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing
/// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger
/// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
/// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
/// </code>
/// <para>
/// If you want to scale an existing font size! Read comments in imgui.h!
/// </para>
/// </remarks>
public static unsafe void PushFont(ImFontPtr font, float fontSizeBaseUnscaled) =>
PInvoke.PushFont(font, fontSizeBaseUnscaled);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L529">imgui.h:529</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9522">imgui.cpp:9522</see>
/// <br/><c>void PopFont()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Parameters stacks (font)
/// - PushFont(font, 0.0f) // Change font and keep current size
/// - PushFont(NULL, 20.0f) // Keep font and change current size
/// - PushFont(font, 20.0f) // Change font and set size to 20.0f
/// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size.
/// - PushFont(font, font-&gt;LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior.
/// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted.
/// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition.
/// - PushFont(font) before 1.92 = PushFont(font, font-&gt;LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function.
/// *IMPORTANT* global scale factors are applied over the provided size.
/// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more.
/// - If you want to apply a factor to the _current_ font size:
/// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing
/// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger
/// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
/// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
/// </code>
/// </remarks>
public static unsafe void PopFont() => PInvoke.PopFont();
/// <summary>
/// <para>
/// get current font
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L530">imgui.h:530</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9087">imgui.cpp:9087</see>
/// <br/><c>ImFont* GetFont()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Parameters stacks (font)
/// - PushFont(font, 0.0f) // Change font and keep current size
/// - PushFont(NULL, 20.0f) // Keep font and change current size
/// - PushFont(font, 20.0f) // Change font and set size to 20.0f
/// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size.
/// - PushFont(font, font-&gt;LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior.
/// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted.
/// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition.
/// - PushFont(font) before 1.92 = PushFont(font, font-&gt;LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function.
/// *IMPORTANT* global scale factors are applied over the provided size.
/// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more.
/// - If you want to apply a factor to the _current_ font size:
/// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing
/// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger
/// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
/// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
/// </code>
/// </remarks>
public static unsafe ImFontPtr GetFont() => PInvoke.GetFont();
/// <summary>
/// <para>
/// get current scaled font size (= height in pixels). AFTER global scale factors applied. *IMPORTANT* DO
/// NOT PASS THIS VALUE TO PushFont()! Use ImGui::GetStyle().FontSizeBase to get value before global scale
/// factors.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L531">imgui.h:531</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9100">imgui.cpp:9100</see>
/// <br/><c>float GetFontSize()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Parameters stacks (font)
/// - PushFont(font, 0.0f) // Change font and keep current size
/// - PushFont(NULL, 20.0f) // Keep font and change current size
/// - PushFont(font, 20.0f) // Change font and set size to 20.0f
/// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size.
/// - PushFont(font, font-&gt;LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior.
/// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted.
/// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition.
/// - PushFont(font) before 1.92 = PushFont(font, font-&gt;LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function.
/// *IMPORTANT* global scale factors are applied over the provided size.
/// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more.
/// - If you want to apply a factor to the _current_ font size:
/// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing
/// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger
/// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
/// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
/// </code>
/// <code>
/// Get current font size (= height in pixels) of current font, with global scale factors applied.
/// - Use style.FontSizeBase to get value before global scale factors.
/// - recap: ImGui::GetFontSize() == style.FontSizeBase * (style.FontScaleMain * style.FontScaleDpi * other_scaling_factors)
/// </code>
/// </remarks>
public static unsafe float GetFontSize() => PInvoke.GetFontSize();
/// <summary>
/// <para>
/// get current font bound at current size // == GetFont()-&gt;GetFontBaked(GetFontSize())
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L532">imgui.h:532</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9092">imgui.cpp:9092</see>
/// <br/><c>ImFontBaked* GetFontBaked()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Parameters stacks (font)
/// - PushFont(font, 0.0f) // Change font and keep current size
/// - PushFont(NULL, 20.0f) // Keep font and change current size
/// - PushFont(font, 20.0f) // Change font and set size to 20.0f
/// - PushFont(font, style.FontSizeBase * 2.0f) // Change font and set size to be twice bigger than current size.
/// - PushFont(font, font-&gt;LegacySize) // Change font and set size to size passed to AddFontXXX() function. Same as pre-1.92 behavior.
/// *IMPORTANT* before 1.92, fonts had a single size. They can now be dynamically be adjusted.
/// - In 1.92 we have REMOVED the single parameter version of PushFont() because it seems like the easiest way to provide an error-proof transition.
/// - PushFont(font) before 1.92 = PushFont(font, font-&gt;LegacySize) after 1.92 // Use default font size as passed to AddFontXXX() function.
/// *IMPORTANT* global scale factors are applied over the provided size.
/// - Global scale factors are: 'style.FontScaleMain', 'style.FontScaleDpi' and maybe more.
/// - If you want to apply a factor to the _current_ font size:
/// - CORRECT: PushFont(NULL, style.FontSizeBase) // use current unscaled size == does nothing
/// - CORRECT: PushFont(NULL, style.FontSizeBase * 2.0f) // use current unscaled size x2 == make text twice bigger
/// - INCORRECT: PushFont(NULL, GetFontSize()) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
/// - INCORRECT: PushFont(NULL, GetFontSize() * 2.0f) // INCORRECT! using size after global factors already applied == GLOBAL SCALING FACTORS WILL APPLY TWICE!
/// </code>
/// </remarks>
public static unsafe ImFontBakedPtr GetFontBaked() => PInvoke.GetFontBaked();
/// <summary>
/// <para>
/// modify a style color. always use this if you modify the style after NewFrame().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L535">imgui.h:535</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3508">imgui.cpp:3508</see>
/// <br/><c>void PushStyleColor(ImGuiCol idx, ImU32 col)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (shared)
/// </para>
/// <para>
/// FIXME: This may incur a round-trip (if the end user got their data from a float4) but eventually we aim
/// to store the in-flight colors as ImU32
/// </para>
/// </remarks>
public static unsafe void PushStyleColor(ImGuiCol idx, ImColor8 col) => PInvoke.PushStyleColor_0(idx, col);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L536">imgui.h:536</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3519">imgui.cpp:3519</see>
/// <br/><c>void PushStyleColor(ImGuiCol idx, const ImVec4&amp; col)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (shared)
/// </para>
/// </remarks>
public static unsafe void PushStyleColor(ImGuiCol idx, in float4 col)
{
fixed (float4* col_fixed = &col)
{
PInvoke.PushStyleColor_1(idx, col_fixed);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L537">imgui.h:537</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3530">imgui.cpp:3530</see>
/// <br/><c>void PopStyleColor(int count = 1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (shared)
/// </para>
/// </remarks>
public static unsafe void PopStyleColor(int count = 1) => PInvoke.PopStyleColor(count);
/// <summary>
/// <para>
/// modify a style float variable. always use this if you modify the style after NewFrame()!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L538">imgui.h:538</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3602">imgui.cpp:3602</see>
/// <br/><c>void PushStyleVar(ImGuiStyleVar idx, float val)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (shared)
/// </para>
/// </remarks>
public static unsafe void PushStyleVar(ImGuiStyleVar idx, float val) => PInvoke.PushStyleVar_0(idx, val);
/// <summary>
/// <para>
/// modify a style ImVec2 variable. "
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L539">imgui.h:539</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3644">imgui.cpp:3644</see>
/// <br/><c>void PushStyleVar(ImGuiStyleVar idx, const ImVec2&amp; val)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (shared)
/// </para>
/// </remarks>
public static unsafe void PushStyleVar(ImGuiStyleVar idx, in float2 val)
{
fixed (float2* val_fixed = &val)
{
PInvoke.PushStyleVar_1(idx, val_fixed);
}
}
/// <summary>
/// <para>
/// modify X component of a style ImVec2 variable. "
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L540">imgui.h:540</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3616">imgui.cpp:3616</see>
/// <br/><c>void PushStyleVarX(ImGuiStyleVar idx, float val_x)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (shared)
/// </para>
/// </remarks>
public static unsafe void PushStyleVarX(ImGuiStyleVar idx, float valX) => PInvoke.PushStyleVarX(idx, valX);
/// <summary>
/// <para>
/// modify Y component of a style ImVec2 variable. "
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L541">imgui.h:541</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3630">imgui.cpp:3630</see>
/// <br/><c>void PushStyleVarY(ImGuiStyleVar idx, float val_y)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (shared)
/// </para>
/// </remarks>
public static unsafe void PushStyleVarY(ImGuiStyleVar idx, float valY) => PInvoke.PushStyleVarY(idx, valY);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L542">imgui.h:542</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3658">imgui.cpp:3658</see>
/// <br/><c>void PopStyleVar(int count = 1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (shared)
/// </para>
/// </remarks>
public static unsafe void PopStyleVar(int count = 1) => PInvoke.PopStyleVar(count);
/// <summary>
/// <para>
/// modify specified shared item flag, e.g. PushItemFlag(ImGuiItemFlags_NoTabStop, true)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L543">imgui.h:543</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8587">imgui.cpp:8587</see>
/// <br/><c>void PushItemFlag(ImGuiItemFlags option, bool enabled)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (shared)
/// </para>
/// </remarks>
public static unsafe void PushItemFlag(ImGuiItemFlags option, bool enabled) =>
PInvoke.PushItemFlag(option, enabled);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L544">imgui.h:544</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8600">imgui.cpp:8600</see>
/// <br/><c>void PopItemFlag()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (shared)
/// </para>
/// </remarks>
public static unsafe void PopItemFlag() => PInvoke.PopItemFlag();
/// <summary>
/// <para>
/// push width of items for common large "item+label" widgets. &gt;0.0f: width in pixels, &lt;0.0f align xx
/// pixels to the right of window (so -FLT_MIN always align width to the right side).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L547">imgui.h:547</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11956">imgui.cpp:11956</see>
/// <br/><c>void PushItemWidth(float item_width)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (current window)
/// </para>
/// <para>
/// FIXME: Remove the == 0.0f behavior?
/// </para>
/// </remarks>
public static unsafe void PushItemWidth(float itemWidth) => PInvoke.PushItemWidth(itemWidth);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L548">imgui.h:548</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11984">imgui.cpp:11984</see>
/// <br/><c>void PopItemWidth()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (current window)
/// </para>
/// </remarks>
public static unsafe void PopItemWidth() => PInvoke.PopItemWidth();
/// <summary>
/// <para>
/// set width of the _next_ common large "item+label" widget. &gt;0.0f: width in pixels, &lt;0.0f align xx
/// pixels to the right of window (so -FLT_MIN always align width to the right side)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L549">imgui.h:549</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11948">imgui.cpp:11948</see>
/// <br/><c>void SetNextItemWidth(float item_width)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (current window)
/// </para>
/// <para>
/// Affect large frame+labels widgets only.
/// </para>
/// </remarks>
public static unsafe void SetNextItemWidth(float itemWidth) => PInvoke.SetNextItemWidth(itemWidth);
/// <summary>
/// <para>
/// width of item given pushed settings and current cursor position. NOT necessarily the width of last item
/// unlike most 'Item' functions.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L550">imgui.h:550</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11999">imgui.cpp:11999</see>
/// <br/><c>float CalcItemWidth()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (current window)
/// </para>
/// <code>
/// Calculate default item width given value passed to PushItemWidth() or SetNextItemWidth().
/// The SetNextItemWidth() data is generally cleared/consumed by ItemAdd() or NextItemData.ClearFlags()
/// </code>
/// </remarks>
public static unsafe float CalcItemWidth() => PInvoke.CalcItemWidth();
/// <summary>
/// <para>
/// push word-wrapping position for Text*() commands. &lt; 0.0f: no wrapping; 0.0f: wrap to end of window
/// (or column); &gt; 0.0f: wrap at 'wrap_pos_x' position in window local space
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L551">imgui.h:551</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8675">imgui.cpp:8675</see>
/// <br/><c>void PushTextWrapPos(float wrap_local_pos_x = 0.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (current window)
/// </para>
/// </remarks>
public static unsafe void PushTextWrapPos(float wrapLocalPosX = 0f) => PInvoke.PushTextWrapPos(wrapLocalPosX);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L552">imgui.h:552</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8683">imgui.cpp:8683</see>
/// <br/><c>void PopTextWrapPos()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Parameters stacks (current window)
/// </para>
/// </remarks>
public static unsafe void PopTextWrapPos() => PInvoke.PopTextWrapPos();
/// <summary>
/// <para>
/// get UV coordinate for a white pixel, useful to draw custom shapes via the ImDrawList API
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L556">imgui.h:556</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9105">imgui.cpp:9105</see>
/// <br/><c>ImVec2 GetFontTexUvWhitePixel()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Style read access
/// - Use the ShowStyleEditor() function to interactively see/edit the colors.
/// </code>
/// </remarks>
public static unsafe float2 GetFontTexUvWhitePixel() => PInvoke.GetFontTexUvWhitePixel();
/// <summary>
/// <para>
/// retrieve given style color with style alpha applied and optional extra alpha multiplier, packed as a
/// 32-bit value suitable for ImDrawList
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L557">imgui.h:557</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3474">imgui.cpp:3474</see>
/// <br/><c>ImU32 GetColorU32(ImGuiCol idx, float alpha_mul = 1.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Style read access
/// - Use the ShowStyleEditor() function to interactively see/edit the colors.
/// </code>
/// </remarks>
public static unsafe ImColor8 GetColorU32(ImGuiCol idx, float alphaMul = 1f)
{
var result = PInvoke.GetColorU32_0(idx, alphaMul);
return Unsafe.As<uint, ImColor8>(ref result);
}
/// <summary>
/// <para>
/// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L558">imgui.h:558</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3482">imgui.cpp:3482</see>
/// <br/><c>ImU32 GetColorU32(const ImVec4&amp; col)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Style read access
/// - Use the ShowStyleEditor() function to interactively see/edit the colors.
/// </code>
/// </remarks>
public static unsafe ImColor8 GetColorU32(in float4 col)
{
fixed (float4* col_fixed = &col)
{
var result = PInvoke.GetColorU32_1(col_fixed);
return Unsafe.As<uint, ImColor8>(ref result);
}
}
/// <summary>
/// <para>
/// retrieve given color with style alpha applied, packed as a 32-bit value suitable for ImDrawList
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L559">imgui.h:559</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3496">imgui.cpp:3496</see>
/// <br/><c>ImU32 GetColorU32(ImU32 col, float alpha_mul = 1.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Style read access
/// - Use the ShowStyleEditor() function to interactively see/edit the colors.
/// </code>
/// </remarks>
public static unsafe ImColor8 GetColorU32(ImColor8 col, float alphaMul = 1f)
{
var result = PInvoke.GetColorU32_2(col, alphaMul);
return Unsafe.As<uint, ImColor8>(ref result);
}
/// <summary>
/// <para>
/// retrieve style color as stored in ImGuiStyle structure. use to feed back into PushStyleColor(),
/// otherwise use GetColorU32() to get style color with style alpha baked in.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L560">imgui.h:560</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3490">imgui.cpp:3490</see>
/// <br/><c>const ImVec4&amp; GetStyleColorVec4(ImGuiCol idx)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Style read access
/// - Use the ShowStyleEditor() function to interactively see/edit the colors.
/// </code>
/// </remarks>
public static unsafe float4 GetStyleColorVec4(ImGuiCol idx) => *PInvoke.GetStyleColorVec4(idx);
/// <summary>
/// <para>
/// cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND (prefer using this rather than
/// GetCursorPos(), also more useful to work with ImDrawList API).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L572">imgui.h:572</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11867">imgui.cpp:11867</see>
/// <br/><c>ImVec2 GetCursorScreenPos()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Layout cursor positioning
/// - By "cursor" we mean the current output position.
/// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
/// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
/// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
/// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
/// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -&gt; this is the preferred way forward.
/// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
/// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --&gt; all obsoleted. YOU DON'T NEED THEM.
/// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
/// </code>
/// </remarks>
public static unsafe float2 GetCursorScreenPos() => PInvoke.GetCursorScreenPos();
/// <summary>
/// <para>
/// cursor position, absolute coordinates. THIS IS YOUR BEST FRIEND.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L573">imgui.h:573</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11873">imgui.cpp:11873</see>
/// <br/><c>void SetCursorScreenPos(const ImVec2&amp; pos)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Layout cursor positioning
/// - By "cursor" we mean the current output position.
/// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
/// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
/// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
/// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
/// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -&gt; this is the preferred way forward.
/// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
/// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --&gt; all obsoleted. YOU DON'T NEED THEM.
/// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
/// </code>
/// </remarks>
public static unsafe void SetCursorScreenPos(in float2 pos)
{
fixed (float2* pos_fixed = &pos)
{
PInvoke.SetCursorScreenPos(pos_fixed);
}
}
/// <summary>
/// <para>
/// available space from current position. THIS IS YOUR BEST FRIEND.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L574">imgui.h:574</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12064">imgui.cpp:12064</see>
/// <br/><c>ImVec2 GetContentRegionAvail()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Layout cursor positioning
/// - By "cursor" we mean the current output position.
/// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
/// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
/// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
/// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
/// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -&gt; this is the preferred way forward.
/// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
/// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --&gt; all obsoleted. YOU DON'T NEED THEM.
/// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
/// </code>
/// </remarks>
public static unsafe float2 GetContentRegionAvail() => PInvoke.GetContentRegionAvail();
/// <summary>
/// <para>
/// [window-local] cursor position in window-local coordinates. This is not your best friend.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L575">imgui.h:575</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11883">imgui.cpp:11883</see>
/// <br/><c>ImVec2 GetCursorPos()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Layout cursor positioning
/// - By "cursor" we mean the current output position.
/// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
/// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
/// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
/// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
/// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -&gt; this is the preferred way forward.
/// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
/// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --&gt; all obsoleted. YOU DON'T NEED THEM.
/// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
/// </code>
/// <code>
/// User generally sees positions in window coordinates. Internally we store CursorPos in absolute screen coordinates because it is more convenient.
/// Conversion happens as we pass the value to user, but it makes our naming convention confusing because GetCursorPos() == (DC.CursorPos - window.Pos). May want to rename 'DC.CursorPos'.
/// </code>
/// </remarks>
public static unsafe float2 GetCursorPos() => PInvoke.GetCursorPos();
/// <summary>
/// <para>
/// [window-local] "
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L576">imgui.h:576</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11889">imgui.cpp:11889</see>
/// <br/><c>float GetCursorPosX()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Layout cursor positioning
/// - By "cursor" we mean the current output position.
/// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
/// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
/// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
/// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
/// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -&gt; this is the preferred way forward.
/// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
/// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --&gt; all obsoleted. YOU DON'T NEED THEM.
/// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
/// </code>
/// </remarks>
public static unsafe float GetCursorPosX() => PInvoke.GetCursorPosX();
/// <summary>
/// <para>
/// [window-local] "
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L577">imgui.h:577</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11895">imgui.cpp:11895</see>
/// <br/><c>float GetCursorPosY()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Layout cursor positioning
/// - By "cursor" we mean the current output position.
/// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
/// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
/// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
/// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
/// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -&gt; this is the preferred way forward.
/// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
/// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --&gt; all obsoleted. YOU DON'T NEED THEM.
/// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
/// </code>
/// </remarks>
public static unsafe float GetCursorPosY() => PInvoke.GetCursorPosY();
/// <summary>
/// <para>
/// [window-local] "
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L578">imgui.h:578</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11901">imgui.cpp:11901</see>
/// <br/><c>void SetCursorPos(const ImVec2&amp; local_pos)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Layout cursor positioning
/// - By "cursor" we mean the current output position.
/// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
/// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
/// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
/// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
/// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -&gt; this is the preferred way forward.
/// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
/// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --&gt; all obsoleted. YOU DON'T NEED THEM.
/// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
/// </code>
/// </remarks>
public static unsafe void SetCursorPos(in float2 localPos)
{
fixed (float2* localPos_fixed = &localPos)
{
PInvoke.SetCursorPos(localPos_fixed);
}
}
/// <summary>
/// <para>
/// [window-local] "
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L579">imgui.h:579</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11909">imgui.cpp:11909</see>
/// <br/><c>void SetCursorPosX(float local_x)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Layout cursor positioning
/// - By "cursor" we mean the current output position.
/// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
/// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
/// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
/// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
/// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -&gt; this is the preferred way forward.
/// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
/// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --&gt; all obsoleted. YOU DON'T NEED THEM.
/// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
/// </code>
/// </remarks>
public static unsafe void SetCursorPosX(float localX) => PInvoke.SetCursorPosX(localX);
/// <summary>
/// <para>
/// [window-local] "
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L580">imgui.h:580</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11917">imgui.cpp:11917</see>
/// <br/><c>void SetCursorPosY(float local_y)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Layout cursor positioning
/// - By "cursor" we mean the current output position.
/// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
/// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
/// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
/// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
/// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -&gt; this is the preferred way forward.
/// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
/// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --&gt; all obsoleted. YOU DON'T NEED THEM.
/// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
/// </code>
/// </remarks>
public static unsafe void SetCursorPosY(float localY) => PInvoke.SetCursorPosY(localY);
/// <summary>
/// <para>
/// [window-local] initial cursor position, in window-local coordinates. Call GetCursorScreenPos() after
/// Begin() to get the absolute coordinates version.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L581">imgui.h:581</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11925">imgui.cpp:11925</see>
/// <br/><c>ImVec2 GetCursorStartPos()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Layout cursor positioning
/// - By "cursor" we mean the current output position.
/// - The typical widget behavior is to output themselves at the current cursor position, then move the cursor one line down.
/// - You can call SameLine() between widgets to undo the last carriage return and output at the right of the preceding widget.
/// - YOU CAN DO 99% OF WHAT YOU NEED WITH ONLY GetCursorScreenPos() and GetContentRegionAvail().
/// - Attention! We currently have inconsistencies between window-local and absolute positions we will aim to fix with future API:
/// - Absolute coordinate: GetCursorScreenPos(), SetCursorScreenPos(), all ImDrawList:: functions. -&gt; this is the preferred way forward.
/// - Window-local coordinates: SameLine(offset), GetCursorPos(), SetCursorPos(), GetCursorStartPos(), PushTextWrapPos()
/// - Window-local coordinates: GetContentRegionMax(), GetWindowContentRegionMin(), GetWindowContentRegionMax() --&gt; all obsoleted. YOU DON'T NEED THEM.
/// - GetCursorScreenPos() = GetCursorPos() + GetWindowPos(). GetWindowPos() is almost only ever useful to convert from window-local to absolute coordinates. Try not to use it.
/// </code>
/// </remarks>
public static unsafe float2 GetCursorStartPos() => PInvoke.GetCursorStartPos();
/// <summary>
/// <para>
/// separator, generally horizontal. inside a menu bar or in horizontal layout mode, this becomes a vertical
/// separator.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L584">imgui.h:584</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1686">imgui_widgets.cpp:1686</see>
/// <br/><c>void Separator()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe void Separator() => PInvoke.Separator();
/// <summary>
/// <para>
/// call between widgets or groups to layout them horizontally. X position given in window coordinates.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L585">imgui.h:585</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11841">imgui.cpp:11841</see>
/// <br/><c>void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// <code>
/// Gets back to previous line and continue with horizontal layout
/// offset_from_start_x == 0 : follow right after previous item
/// offset_from_start_x != 0 : align to specified x position (relative to window/group left)
/// spacing_w &lt; 0 : use default spacing if offset_from_start_x == 0, no spacing if offset_from_start_x != 0
/// spacing_w &gt;= 0 : enforce spacing amount
/// </code>
/// </remarks>
public static unsafe void SameLine(float offsetFromStartX = 0f, float spacing = -1f) =>
PInvoke.SameLine(offsetFromStartX, spacing);
/// <summary>
/// <para>
/// undo a SameLine() or force a new line when in a horizontal-layout context.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L586">imgui.h:586</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1591">imgui_widgets.cpp:1591</see>
/// <br/><c>void NewLine()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe void NewLine() => PInvoke.NewLine();
/// <summary>
/// <para>
/// add vertical spacing.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L587">imgui.h:587</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1572">imgui_widgets.cpp:1572</see>
/// <br/><c>void Spacing()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe void Spacing() => PInvoke.Spacing();
/// <summary>
/// <para>
/// add a dummy item of given size. unlike InvisibleButton(), Dummy() won't take the mouse click or be
/// navigable into.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L588">imgui.h:588</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1580">imgui_widgets.cpp:1580</see>
/// <br/><c>void Dummy(const ImVec2&amp; size)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe void Dummy(in float2 size)
{
fixed (float2* size_fixed = &size)
{
PInvoke.Dummy(size_fixed);
}
}
/// <summary>
/// <para>
/// move content position toward the right, by indent_w, or style.IndentSpacing if indent_w &lt;= 0
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L589">imgui.h:589</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11931">imgui.cpp:11931</see>
/// <br/><c>void Indent(float indent_w = 0.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe void Indent(float indentW = 0f) => PInvoke.Indent(indentW);
/// <summary>
/// <para>
/// move content position back to the left, by indent_w, or style.IndentSpacing if indent_w &lt;= 0
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L590">imgui.h:590</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11939">imgui.cpp:11939</see>
/// <br/><c>void Unindent(float indent_w = 0.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe void Unindent(float indentW = 0f) => PInvoke.Unindent(indentW);
/// <summary>
/// <para>
/// lock horizontal starting position
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L591">imgui.h:591</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12097">imgui.cpp:12097</see>
/// <br/><c>void BeginGroup()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// <code>
/// Lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
/// Groups are currently a mishmash of functionalities which should perhaps be clarified and separated.
/// FIXME-OPT: Could we safely early out on -&gt;SkipItems?
/// </code>
/// </remarks>
public static unsafe void BeginGroup() => PInvoke.BeginGroup();
/// <summary>
/// <para>
/// unlock horizontal starting position + capture the whole group bounding box into one "item" (so you can
/// use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L592">imgui.h:592</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12126">imgui.cpp:12126</see>
/// <br/><c>void EndGroup()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe void EndGroup() => PInvoke.EndGroup();
/// <summary>
/// <para>
/// vertically align upcoming text baseline to FramePadding.y so that it will align properly to regularly
/// framed items (call if you have text on a line before a framed item)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L593">imgui.h:593</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1608">imgui_widgets.cpp:1608</see>
/// <br/><c>void AlignTextToFramePadding()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe void AlignTextToFramePadding() => PInvoke.AlignTextToFramePadding();
/// <summary>
/// <para>
/// ~ FontSize
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L594">imgui.h:594</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12040">imgui.cpp:12040</see>
/// <br/><c>float GetTextLineHeight()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe float GetTextLineHeight() => PInvoke.GetTextLineHeight();
/// <summary>
/// <para>
/// ~ FontSize + style.ItemSpacing.y (distance in pixels between 2 consecutive lines of text)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L595">imgui.h:595</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12046">imgui.cpp:12046</see>
/// <br/><c>float GetTextLineHeightWithSpacing()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe float GetTextLineHeightWithSpacing() => PInvoke.GetTextLineHeightWithSpacing();
/// <summary>
/// <para>
/// ~ FontSize + style.FramePadding.y * 2
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L596">imgui.h:596</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12052">imgui.cpp:12052</see>
/// <br/><c>float GetFrameHeight()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe float GetFrameHeight() => PInvoke.GetFrameHeight();
/// <summary>
/// <para>
/// ~ FontSize + style.FramePadding.y * 2 + style.ItemSpacing.y (distance in pixels between 2 consecutive
/// lines of framed widgets)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L597">imgui.h:597</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12058">imgui.cpp:12058</see>
/// <br/><c>float GetFrameHeightWithSpacing()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Other layout functions
/// </para>
/// </remarks>
public static unsafe float GetFrameHeightWithSpacing() => PInvoke.GetFrameHeightWithSpacing();
/// <summary>
/// <para>
/// push string into the ID stack (will hash string).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L611">imgui.h:611</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9605">imgui.cpp:9605</see>
/// <br/><c>void PushID(const char* str_id_begin, const char* str_id_end)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// ID stack/scopes
/// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
/// - Those questions are answered and impacted by understanding of the ID stack system:
/// - "Q: Why is my widget not reacting when I click on it?"
/// - "Q: How can I have widgets with an empty label?"
/// - "Q: How can I have multiple widgets with the same label?"
/// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
/// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
/// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
/// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
/// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
/// </code>
/// </remarks>
public static unsafe void PushID(ImString strId)
{
fixed (byte* strId_fixed = strId)
{
PInvoke.PushID_1(strId_fixed, strId_fixed + strId.Length);
}
}
/// <summary>
/// <para>
/// push pointer into the ID stack (will hash pointer).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L612">imgui.h:612</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9613">imgui.cpp:9613</see>
/// <br/><c>void PushID(const void* ptr_id)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// ID stack/scopes
/// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
/// - Those questions are answered and impacted by understanding of the ID stack system:
/// - "Q: Why is my widget not reacting when I click on it?"
/// - "Q: How can I have widgets with an empty label?"
/// - "Q: How can I have multiple widgets with the same label?"
/// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
/// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
/// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
/// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
/// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
/// </code>
/// </remarks>
public static unsafe void PushID(nint ptrId) => PInvoke.PushID_2((void*)ptrId);
/// <summary>
/// <para>
/// push integer into the ID stack (will hash integer).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L613">imgui.h:613</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9621">imgui.cpp:9621</see>
/// <br/><c>void PushID(int int_id)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// ID stack/scopes
/// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
/// - Those questions are answered and impacted by understanding of the ID stack system:
/// - "Q: Why is my widget not reacting when I click on it?"
/// - "Q: How can I have widgets with an empty label?"
/// - "Q: How can I have multiple widgets with the same label?"
/// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
/// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
/// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
/// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
/// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
/// </code>
/// </remarks>
public static unsafe void PushID(int intId) => PInvoke.PushID_3(intId);
/// <summary>
/// <para>
/// pop from the ID stack.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L614">imgui.h:614</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9666">imgui.cpp:9666</see>
/// <br/><c>void PopID()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// ID stack/scopes
/// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
/// - Those questions are answered and impacted by understanding of the ID stack system:
/// - "Q: Why is my widget not reacting when I click on it?"
/// - "Q: How can I have widgets with an empty label?"
/// - "Q: How can I have multiple widgets with the same label?"
/// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
/// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
/// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
/// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
/// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
/// </code>
/// </remarks>
public static unsafe void PopID() => PInvoke.PopID();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L616">imgui.h:616</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9683">imgui.cpp:9683</see>
/// <br/><c>ImGuiID GetID(const char* str_id_begin, const char* str_id_end)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// ID stack/scopes
/// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
/// - Those questions are answered and impacted by understanding of the ID stack system:
/// - "Q: Why is my widget not reacting when I click on it?"
/// - "Q: How can I have widgets with an empty label?"
/// - "Q: How can I have multiple widgets with the same label?"
/// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
/// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
/// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
/// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
/// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
/// </code>
/// </remarks>
public static unsafe ImGuiID GetID(ImString strId)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.GetID_1(strId_fixed, strId_fixed + strId.Length);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L617">imgui.h:617</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9689">imgui.cpp:9689</see>
/// <br/><c>ImGuiID GetID(const void* ptr_id)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// ID stack/scopes
/// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
/// - Those questions are answered and impacted by understanding of the ID stack system:
/// - "Q: Why is my widget not reacting when I click on it?"
/// - "Q: How can I have widgets with an empty label?"
/// - "Q: How can I have multiple widgets with the same label?"
/// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
/// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
/// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
/// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
/// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
/// </code>
/// </remarks>
public static unsafe ImGuiID GetID(nint ptrId) => PInvoke.GetID_2((void*)ptrId);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L618">imgui.h:618</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9695">imgui.cpp:9695</see>
/// <br/><c>ImGuiID GetID(int int_id)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// ID stack/scopes
/// Read the FAQ (docs/FAQ.md or http://dearimgui.com/faq) for more details about how ID are handled in dear imgui.
/// - Those questions are answered and impacted by understanding of the ID stack system:
/// - "Q: Why is my widget not reacting when I click on it?"
/// - "Q: How can I have widgets with an empty label?"
/// - "Q: How can I have multiple widgets with the same label?"
/// - Short version: ID are hashes of the entire ID stack. If you are creating widgets in a loop you most likely
/// want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them.
/// - You can also use the "Label##foobar" syntax within widget label to distinguish them from each others.
/// - In this header file we use the "label"/"name" terminology to denote a string that will be displayed + used as an ID,
/// whereas "str_id" denote a string that is only used as an ID and not normally displayed.
/// </code>
/// </remarks>
public static unsafe ImGuiID GetID(int intId) => PInvoke.GetID_3(intId);
/// <summary>
/// <para>
/// shortcut for PushStyleColor(ImGuiCol_Text, col); Text(fmt, ...); PopStyleColor();
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L624">imgui.h:624</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L292">imgui_widgets.cpp:292</see>
/// <br/><c>void TextColored(const ImVec4&amp; col, const char* fmt, ...) IM_FMTARGS(2)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Widgets: Text
/// </para>
/// </remarks>
public static unsafe void TextColored(in float4 col, ImString text)
{
fixed (byte* text_fixed = text)
{
fixed (float4* col_fixed = &col)
{
PInvoke.TextColored(col_fixed, text_fixed);
}
}
}
/// <summary>
/// <para>
/// shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(fmt, ...);
/// PopStyleColor();
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L626">imgui.h:626</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L307">imgui_widgets.cpp:307</see>
/// <br/><c>void TextDisabled(const char* fmt, ...) IM_FMTARGS(1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Widgets: Text
/// </para>
/// </remarks>
public static unsafe void TextDisabled(ImString text)
{
fixed (byte* text_fixed = text)
{
PInvoke.TextDisabled(text_fixed);
}
}
/// <summary>
/// <para>
/// shortcut for PushTextWrapPos(0.0f); Text(fmt, ...); PopTextWrapPos();. Note that this won't work on an
/// auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size
/// using SetNextWindowSize().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L628">imgui.h:628</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L323">imgui_widgets.cpp:323</see>
/// <br/><c>void TextWrapped(const char* fmt, ...) IM_FMTARGS(1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Widgets: Text
/// </para>
/// </remarks>
public static unsafe void TextWrapped(ImString text)
{
fixed (byte* text_fixed = text)
{
PInvoke.TextWrapped(text_fixed);
}
}
/// <summary>
/// <para>
/// display text+label aligned the same way as value+label widgets
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L630">imgui.h:630</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L382">imgui_widgets.cpp:382</see>
/// <br/><c>void LabelText(const char* label, const char* fmt, ...) IM_FMTARGS(2)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Widgets: Text
/// </para>
/// </remarks>
public static unsafe void LabelText(ImString label, ImString text)
{
fixed (byte* text_fixed = text)
{
fixed (byte* label_fixed = label)
{
PInvoke.LabelText(label_fixed, text_fixed);
}
}
}
/// <summary>
/// <para>
/// shortcut for Bullet()+Text()
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L632">imgui.h:632</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L419">imgui_widgets.cpp:419</see>
/// <br/><c>void BulletText(const char* fmt, ...) IM_FMTARGS(1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Widgets: Text
/// </para>
/// </remarks>
public static unsafe void BulletText(ImString text)
{
fixed (byte* text_fixed = text)
{
PInvoke.BulletText(text_fixed);
}
}
/// <summary>
/// <para>
/// currently: formatted text with a horizontal line
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L634">imgui.h:634</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1754">imgui_widgets.cpp:1754</see>
/// <br/><c>void SeparatorText(const char* label)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Widgets: Text
/// </para>
/// </remarks>
public static unsafe void SeparatorText(ImString label)
{
fixed (byte* label_fixed = label)
{
PInvoke.SeparatorText(label_fixed);
}
}
/// <summary>
/// <para>
/// button
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L639">imgui.h:639</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L808">imgui_widgets.cpp:808</see>
/// <br/><c>bool Button(const char* label, const ImVec2&amp; size = ImVec2(0, 0))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// </remarks>
public static unsafe bool Button(ImString label, in float2? size = default)
{
var size_default = size ?? new float2(0f, 0f);
fixed (byte* label_fixed = label)
{
return PInvoke.Button(label_fixed, &size_default);
}
}
/// <summary>
/// <para>
/// button with (FramePadding.y == 0) to easily embed within text
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L640">imgui.h:640</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L814">imgui_widgets.cpp:814</see>
/// <br/><c>bool SmallButton(const char* label)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// <para>
/// Small buttons fits within text without additional vertical spacing.
/// </para>
/// </remarks>
public static unsafe bool SmallButton(ImString label)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SmallButton(label_fixed);
}
}
/// <summary>
/// <para>
/// flexible button behavior without the visuals, frequently useful to build custom behaviors using the
/// public api (along with IsItemActive, IsItemHovered, etc.)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L641">imgui.h:641</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L826">imgui_widgets.cpp:826</see>
/// <br/><c>bool InvisibleButton(const char* str_id, const ImVec2&amp; size, ImGuiButtonFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// <code>
/// Tip: use ImGui::PushID()/PopID() to push indices or pointers in the ID stack.
/// Then you can keep 'str_id' empty or the same for all your buttons (instead of creating a string based on a non-string id)
/// </code>
/// </remarks>
public static unsafe bool InvisibleButton(ImString strId, in float2 size, ImGuiButtonFlags flags = default)
{
fixed (float2* size_fixed = &size)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.InvisibleButton(strId_fixed, size_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// square button with an arrow shape
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L642">imgui.h:642</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L879">imgui_widgets.cpp:879</see>
/// <br/><c>bool ArrowButton(const char* str_id, ImGuiDir dir)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// </remarks>
public static unsafe bool ArrowButton(ImString strId, ImGuiDir dir)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.ArrowButton(strId_fixed, dir);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L643">imgui.h:643</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1217">imgui_widgets.cpp:1217</see>
/// <br/><c>bool Checkbox(const char* label, bool* v)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// </remarks>
public static unsafe bool Checkbox(ImString label, ref bool v)
{
fixed (bool* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.Checkbox(label_fixed, (Bool8*)v_fixed);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L644">imgui.h:644</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1319">imgui_widgets.cpp:1319</see>
/// <br/><c>bool CheckboxFlags(const char* label, int* flags, int flags_value)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// </remarks>
public static unsafe bool CheckboxFlags(ImString label, ref int flags, int flagsValue)
{
fixed (int* flags_fixed = &flags)
{
fixed (byte* label_fixed = label)
{
return PInvoke.CheckboxFlags_0(label_fixed, flags_fixed, flagsValue);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L645">imgui.h:645</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1324">imgui_widgets.cpp:1324</see>
/// <br/><c>bool CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// </remarks>
public static unsafe bool CheckboxFlags(ImString label, ref uint flags, uint flagsValue)
{
fixed (uint* flags_fixed = &flags)
{
fixed (byte* label_fixed = label)
{
return PInvoke.CheckboxFlags_1(label_fixed, flags_fixed, flagsValue);
}
}
}
/// <summary>
/// <para>
/// use with e.g. if (RadioButton("one", my_value==1)) { my_value = 1; }
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L646">imgui.h:646</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1339">imgui_widgets.cpp:1339</see>
/// <br/><c>bool RadioButton(const char* label, bool active)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// </remarks>
public static unsafe bool RadioButton(ImString label, bool active)
{
fixed (byte* label_fixed = label)
{
return PInvoke.RadioButton_0(label_fixed, active);
}
}
/// <summary>
/// <para>
/// shortcut to handle the above pattern when value is an integer
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L647">imgui.h:647</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1394">imgui_widgets.cpp:1394</see>
/// <br/><c>bool RadioButton(const char* label, int* v, int v_button)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// <para>
/// FIXME: This would work nicely if it was a public template, e.g. 'template&lt;T&gt; RadioButton(const
/// char* label, T* v, T v_button)', but I'm not sure how we would expose it..
/// </para>
/// </remarks>
public static unsafe bool RadioButton(ImString label, ref int v, int vButton)
{
fixed (int* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.RadioButton_1(label_fixed, v_fixed, vButton);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L648">imgui.h:648</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1403">imgui_widgets.cpp:1403</see>
/// <br/>
/// <c>void ProgressBar(float fraction, const ImVec2&amp; size_arg = ImVec2(-FLT_MIN, 0), const char* overlay = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// <para>
/// size_arg (for each axis) &lt; 0.0f: align to end, 0.0f: auto, &gt; 0.0f: specified size
/// </para>
/// </remarks>
public static unsafe void ProgressBar(float fraction, in float2? sizeArg = default, ImString overlay = default)
{
var sizeArg_default = sizeArg ?? new float2(-float.Epsilon, 0f);
fixed (byte* overlay_fixed = overlay)
{
PInvoke.ProgressBar(fraction, &sizeArg_default, overlay_fixed);
}
}
/// <summary>
/// <para>
/// draw a small circle + keep the cursor on the same line. advance cursor x position by
/// GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L649">imgui.h:649</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1462">imgui_widgets.cpp:1462</see>
/// <br/><c>void Bullet()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// </remarks>
public static unsafe void Bullet() => PInvoke.Bullet();
/// <summary>
/// <para>
/// hyperlink text button, return true when clicked
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L650">imgui.h:650</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1489">imgui_widgets.cpp:1489</see>
/// <br/><c>bool TextLink(const char* label)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// <code>
/// This is provided as a convenience for being an often requested feature.
/// FIXME-STYLE: we delayed adding as there is a larger plan to revamp the styling system.
/// Because of this we currently don't provide many styling options for this widget
/// (e.g. hovered/active colors are automatically inferred from a single color).
/// </code>
/// </remarks>
public static unsafe bool TextLink(ImString label)
{
fixed (byte* label_fixed = label)
{
return PInvoke.TextLink(label_fixed);
}
}
/// <summary>
/// <para>
/// hyperlink text button, automatically open file/url when clicked
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L651">imgui.h:651</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1541">imgui_widgets.cpp:1541</see>
/// <br/><c>bool TextLinkOpenURL(const char* label, const char* url = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Main
/// - Most widgets return true when the value has been changed or when pressed/selected
/// - You may also use one of the many IsItemXXX functions (e.g. IsItemActive, IsItemHovered, etc.) to query widget state.
/// </code>
/// </remarks>
public static unsafe bool TextLinkOpenURL(ImString label, ImString url = default)
{
fixed (byte* url_fixed = url)
{
fixed (byte* label_fixed = label)
{
return PInvoke.TextLinkOpenURL(label_fixed, url_fixed);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L659">imgui.h:659</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1138">imgui_widgets.cpp:1138</see>
/// <br/>
/// <c>void Image(ImTextureRef tex_ref, const ImVec2&amp; image_size, const ImVec2&amp; uv0 = ImVec2(0, 0), const ImVec2&amp; uv1 = ImVec2(1, 1))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Images
/// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
/// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above.
/// - Image() pads adds style.ImageBorderSize on each side, ImageButton() adds style.FramePadding on each side.
/// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified.
/// - An obsolete version of Image(), before 1.91.9 (March 2025), had a 'tint_col' parameter which is now supported by the ImageWithBg() function.
/// </code>
/// </remarks>
public static unsafe void Image(
ImTextureRef texRef,
in float2 imageSize,
in float2? uv0 = default,
in float2? uv1 = default
)
{
var uv0_default = uv0 ?? new float2(0f, 0f);
var uv1_default = uv1 ?? new float2(1f, 1f);
fixed (float2* imageSize_fixed = &imageSize)
{
PInvoke.Image(texRef, imageSize_fixed, &uv0_default, &uv1_default);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L660">imgui.h:660</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1117">imgui_widgets.cpp:1117</see>
/// <br/>
/// <c>void ImageWithBg(ImTextureRef tex_ref, const ImVec2&amp; image_size, const ImVec2&amp; uv0 = ImVec2(0, 0), const ImVec2&amp; uv1 = ImVec2(1, 1), const ImVec4&amp; bg_col = ImVec4(0, 0, 0, 0), const ImVec4&amp; tint_col = ImVec4(1, 1, 1, 1))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Images
/// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
/// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above.
/// - Image() pads adds style.ImageBorderSize on each side, ImageButton() adds style.FramePadding on each side.
/// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified.
/// - An obsolete version of Image(), before 1.91.9 (March 2025), had a 'tint_col' parameter which is now supported by the ImageWithBg() function.
/// </code>
/// <code>
/// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
/// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above.
/// </code>
/// </remarks>
public static unsafe void ImageWithBg(
ImTextureRef texRef,
in float2 imageSize,
in float2? uv0 = default,
in float2? uv1 = default,
in float4? bgCol = default,
in float4? tintCol = default
)
{
var uv0_default = uv0 ?? new float2(0f, 0f);
var uv1_default = uv1 ?? new float2(1f, 1f);
var bgCol_default = bgCol ?? new float4(0f, 0f, 0f, 0f);
var tintCol_default = tintCol ?? new float4(1f, 1f, 1f, 1f);
fixed (float2* imageSize_fixed = &imageSize)
{
PInvoke.ImageWithBg(
texRef,
imageSize_fixed,
&uv0_default,
&uv1_default,
&bgCol_default,
&tintCol_default
);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L661">imgui.h:661</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1185">imgui_widgets.cpp:1185</see>
/// <br/>
/// <c>bool ImageButton(const char* str_id, ImTextureRef tex_ref, const ImVec2&amp; image_size, const ImVec2&amp; uv0 = ImVec2(0, 0), const ImVec2&amp; uv1 = ImVec2(1, 1), const ImVec4&amp; bg_col = ImVec4(0, 0, 0, 0), const ImVec4&amp; tint_col = ImVec4(1, 1, 1, 1))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Images
/// - Read about ImTextureID/ImTextureRef here: https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
/// - 'uv0' and 'uv1' are texture coordinates. Read about them from the same link above.
/// - Image() pads adds style.ImageBorderSize on each side, ImageButton() adds style.FramePadding on each side.
/// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified.
/// - An obsolete version of Image(), before 1.91.9 (March 2025), had a 'tint_col' parameter which is now supported by the ImageWithBg() function.
/// </code>
/// <code>
/// - ImageButton() adds style.FramePadding*2.0f to provided size. This is in order to facilitate fitting an image in a button.
/// - ImageButton() draws a background based on regular Button() color + optionally an inner background if specified. (#8165) // FIXME: Maybe that's not the best design?
/// </code>
/// </remarks>
public static unsafe bool ImageButton(
ImString strId,
ImTextureRef texRef,
in float2 imageSize,
in float2? uv0 = default,
in float2? uv1 = default,
in float4? bgCol = default,
in float4? tintCol = default
)
{
var uv0_default = uv0 ?? new float2(0f, 0f);
var uv1_default = uv1 ?? new float2(1f, 1f);
var bgCol_default = bgCol ?? new float4(0f, 0f, 0f, 0f);
var tintCol_default = tintCol ?? new float4(1f, 1f, 1f, 1f);
fixed (float2* imageSize_fixed = &imageSize)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.ImageButton(
strId_fixed,
texRef,
imageSize_fixed,
&uv0_default,
&uv1_default,
&bgCol_default,
&tintCol_default
);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L666">imgui.h:666</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L1904">imgui_widgets.cpp:1904</see>
/// <br/><c>bool BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Combo Box (Dropdown)
/// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
/// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created.
/// </code>
/// </remarks>
public static unsafe bool BeginCombo(
ImString label,
ImString previewValue = default,
ImGuiComboFlags flags = default
)
{
fixed (byte* previewValue_fixed = previewValue)
{
fixed (byte* label_fixed = label)
{
return PInvoke.BeginCombo(label_fixed, previewValue_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// only call EndCombo() if BeginCombo() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L667">imgui.h:667</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2047">imgui_widgets.cpp:2047</see>
/// <br/><c>void EndCombo()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Combo Box (Dropdown)
/// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
/// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created.
/// </code>
/// </remarks>
public static unsafe void EndCombo() => PInvoke.EndCombo();
/// <summary>
/// <para>
/// Separate items with \0 within a string, end item-list with \0\0. e.g. "One\0Two\0Three\0"
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L669">imgui.h:669</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2186">imgui_widgets.cpp:2186</see>
/// <br/>
/// <c>bool Combo(const char* label, int* current_item, const char* items_separated_by_zeros, int popup_max_height_in_items = -1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Combo Box (Dropdown)
/// - The BeginCombo()/EndCombo() api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable() items.
/// - The old Combo() api are helpers over BeginCombo()/EndCombo() which are kept available for convenience purpose. This is analogous to how ListBox are created.
/// </code>
/// <para>
/// Combo box helper allowing to pass all items in a single string literal holding multiple zero-terminated
/// items "item1\0item2\0"
/// </para>
/// </remarks>
public static unsafe bool Combo(
ImString label,
ref int currentItem,
ImString itemsSeparatedByZeros,
int popupMaxHeightInItems = -1
)
{
fixed (byte* itemsSeparatedByZeros_fixed = itemsSeparatedByZeros)
{
fixed (int* currentItem_fixed = &currentItem)
{
fixed (byte* label_fixed = label)
{
return PInvoke.Combo_1(
label_fixed,
currentItem_fixed,
itemsSeparatedByZeros_fixed,
popupMaxHeightInItems
);
}
}
}
}
/// <summary>
/// <para>
/// If v_min &gt;= v_max we have no bound
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L684">imgui.h:684</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2808">imgui_widgets.cpp:2808</see>
/// <br/>
/// <c>bool DragFloat(const char* label, float* v, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool DragFloat(
ImString label,
ref float v,
float vSpeed = 1f,
float vMin = 0f,
float vMax = 0f,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragFloat(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L685">imgui.h:685</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2813">imgui_widgets.cpp:2813</see>
/// <br/>
/// <c>bool DragFloat2(const char* label, float v[2], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool DragFloat2(
ImString label,
ref float2 v,
float vSpeed = 1f,
float vMin = 0f,
float vMax = 0f,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float2* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragFloat2(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L686">imgui.h:686</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2818">imgui_widgets.cpp:2818</see>
/// <br/>
/// <c>bool DragFloat3(const char* label, float v[3], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool DragFloat3(
ImString label,
ref float3 v,
float vSpeed = 1f,
float vMin = 0f,
float vMax = 0f,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float3* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragFloat3(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L687">imgui.h:687</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2823">imgui_widgets.cpp:2823</see>
/// <br/>
/// <c>bool DragFloat4(const char* label, float v[4], float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool DragFloat4(
ImString label,
ref float4 v,
float vSpeed = 1f,
float vMin = 0f,
float vMax = 0f,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float4* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragFloat4(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L688">imgui.h:688</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2829">imgui_widgets.cpp:2829</see>
/// <br/>
/// <c>bool DragFloatRange2(const char* label, float* v_current_min, float* v_current_max, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, const char* format = "%.3f", const char* format_max = NULL, ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// <para>
/// NB: You likely want to specify the ImGuiSliderFlags_AlwaysClamp when using this.
/// </para>
/// </remarks>
public static unsafe bool DragFloatRange2(
ImString label,
ref float vCurrentMin,
ref float vCurrentMax,
float vSpeed = 1f,
float vMin = 0f,
float vMax = 0f,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImString formatMax = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* formatMax_fixed = formatMax)
{
fixed (byte* format_fixed = format)
{
fixed (float* vCurrentMax_fixed = &vCurrentMax)
{
fixed (float* vCurrentMin_fixed = &vCurrentMin)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragFloatRange2(
label_fixed,
vCurrentMin_fixed,
vCurrentMax_fixed,
vSpeed,
vMin,
vMax,
format_fixed,
formatMax_fixed,
flags
);
}
}
}
}
}
}
/// <summary>
/// <para>
/// If v_min &gt;= v_max we have no bound
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L689">imgui.h:689</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2862">imgui_widgets.cpp:2862</see>
/// <br/>
/// <c>bool DragInt(const char* label, int* v, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%d"</param>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// <para>
/// NB: v_speed is float to allow adjusting the drag speed with more precision
/// </para>
/// </remarks>
public static unsafe bool DragInt(
ImString label,
ref int v,
float vSpeed = 1f,
int vMin = 0,
int vMax = 0,
[System.ComponentModel.DefaultValue("%d")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%d"u8;
}
fixed (byte* format_fixed = format)
{
fixed (int* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragInt(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L690">imgui.h:690</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2867">imgui_widgets.cpp:2867</see>
/// <br/>
/// <c>bool DragInt2(const char* label, int v[2], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%d"</param>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool DragInt2(
ImString label,
ref int2 v,
float vSpeed = 1f,
int vMin = 0,
int vMax = 0,
[System.ComponentModel.DefaultValue("%d")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%d"u8;
}
fixed (byte* format_fixed = format)
{
fixed (int2* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragInt2(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L691">imgui.h:691</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2872">imgui_widgets.cpp:2872</see>
/// <br/>
/// <c>bool DragInt3(const char* label, int v[3], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%d"</param>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool DragInt3(
ImString label,
ref int3 v,
float vSpeed = 1f,
int vMin = 0,
int vMax = 0,
[System.ComponentModel.DefaultValue("%d")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%d"u8;
}
fixed (byte* format_fixed = format)
{
fixed (int3* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragInt3(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L692">imgui.h:692</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2877">imgui_widgets.cpp:2877</see>
/// <br/>
/// <c>bool DragInt4(const char* label, int v[4], float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%d"</param>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool DragInt4(
ImString label,
ref int4 v,
float vSpeed = 1f,
int vMin = 0,
int vMax = 0,
[System.ComponentModel.DefaultValue("%d")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%d"u8;
}
fixed (byte* format_fixed = format)
{
fixed (int4* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragInt4(label_fixed, v_fixed, vSpeed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L693">imgui.h:693</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2883">imgui_widgets.cpp:2883</see>
/// <br/>
/// <c>bool DragIntRange2(const char* label, int* v_current_min, int* v_current_max, float v_speed = 1.0f, int v_min = 0, int v_max = 0, const char* format = "%d", const char* format_max = NULL, ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%d"</param>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// <para>
/// NB: You likely want to specify the ImGuiSliderFlags_AlwaysClamp when using this.
/// </para>
/// </remarks>
public static unsafe bool DragIntRange2(
ImString label,
ref int vCurrentMin,
ref int vCurrentMax,
float vSpeed = 1f,
int vMin = 0,
int vMax = 0,
[System.ComponentModel.DefaultValue("%d")] ImString format = default,
ImString formatMax = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%d"u8;
}
fixed (byte* formatMax_fixed = formatMax)
{
fixed (byte* format_fixed = format)
{
fixed (int* vCurrentMax_fixed = &vCurrentMax)
{
fixed (int* vCurrentMin_fixed = &vCurrentMin)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragIntRange2(
label_fixed,
vCurrentMin_fixed,
vCurrentMax_fixed,
vSpeed,
vMin,
vMax,
format_fixed,
formatMax_fixed,
flags
);
}
}
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L694">imgui.h:694</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2674">imgui_widgets.cpp:2674</see>
/// <br/>
/// <c>bool DragScalar(const char* label, ImGuiDataType data_type, void* p_data, float v_speed = 1.0f, const void* p_min = NULL, const void* p_max = NULL, const char* format = NULL, ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// <code>
/// Note: p_data, p_min and p_max are _pointers_ to a memory address holding the data. For a Drag widget, p_min and p_max are optional.
/// Read code of e.g. DragFloat(), DragInt() etc. or examples in 'Demo-&gt;Widgets-&gt;Data Types' to understand how to use this function directly.
/// </code>
/// </remarks>
public static unsafe bool DragScalar(
ImString label,
ImGuiDataType dataType,
Ptr pData,
float vSpeed = 1f,
Ptr pMin = default,
Ptr pMax = default,
ImString format = default,
ImGuiSliderFlags flags = default
)
{
fixed (byte* format_fixed = format)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragScalar(label_fixed, dataType, pData, vSpeed, pMin, pMax, format_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L695">imgui.h:695</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L2773">imgui_widgets.cpp:2773</see>
/// <br/>
/// <c>bool DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed = 1.0f, const void* p_min = NULL, const void* p_max = NULL, const char* format = NULL, ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Drag Sliders
/// - CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every function, note that a 'float v[X]' function argument is the same as 'float* v',
/// the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &amp;myvector.x
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For keyboard/gamepad navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
/// - Use v_min &lt; v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits if ImGuiSliderFlags_AlwaysClamp is not used.
/// - Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
/// - We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.
/// - Legacy: Pre-1.78 there are DragXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool DragScalarN(
ImString label,
ImGuiDataType dataType,
Ptr pData,
int components,
float vSpeed = 1f,
Ptr pMin = default,
Ptr pMax = default,
ImString format = default,
ImGuiSliderFlags flags = default
)
{
fixed (byte* format_fixed = format)
{
fixed (byte* label_fixed = label)
{
return PInvoke.DragScalarN(
label_fixed,
dataType,
pData,
components,
vSpeed,
pMin,
pMax,
format_fixed,
flags
);
}
}
}
/// <summary>
/// <para>
/// adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L703">imgui.h:703</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3400">imgui_widgets.cpp:3400</see>
/// <br/>
/// <c>bool SliderFloat(const char* label, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool SliderFloat(
ImString label,
ref float v,
float vMin,
float vMax,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderFloat(label_fixed, v_fixed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L704">imgui.h:704</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3405">imgui_widgets.cpp:3405</see>
/// <br/>
/// <c>bool SliderFloat2(const char* label, float v[2], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool SliderFloat2(
ImString label,
ref float2 v,
float vMin,
float vMax,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float2* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderFloat2(label_fixed, v_fixed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L705">imgui.h:705</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3410">imgui_widgets.cpp:3410</see>
/// <br/>
/// <c>bool SliderFloat3(const char* label, float v[3], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool SliderFloat3(
ImString label,
ref float3 v,
float vMin,
float vMax,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float3* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderFloat3(label_fixed, v_fixed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L706">imgui.h:706</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3415">imgui_widgets.cpp:3415</see>
/// <br/>
/// <c>bool SliderFloat4(const char* label, float v[4], float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool SliderFloat4(
ImString label,
ref float4 v,
float vMin,
float vMax,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float4* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderFloat4(label_fixed, v_fixed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L707">imgui.h:707</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3420">imgui_widgets.cpp:3420</see>
/// <br/>
/// <c>bool SliderAngle(const char* label, float* v_rad, float v_degrees_min = -360.0f, float v_degrees_max = +360.0f, const char* format = "%.0f deg", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.0f deg"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool SliderAngle(
ImString label,
ref float vRad,
float vDegreesMin = -360f,
float vDegreesMax = 360f,
[System.ComponentModel.DefaultValue("%.0f deg")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.0f deg"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float* vRad_fixed = &vRad)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderAngle(
label_fixed,
vRad_fixed,
vDegreesMin,
vDegreesMax,
format_fixed,
flags
);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L708">imgui.h:708</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3431">imgui_widgets.cpp:3431</see>
/// <br/>
/// <c>bool SliderInt(const char* label, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%d"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool SliderInt(
ImString label,
ref int v,
int vMin,
int vMax,
[System.ComponentModel.DefaultValue("%d")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%d"u8;
}
fixed (byte* format_fixed = format)
{
fixed (int* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderInt(label_fixed, v_fixed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L709">imgui.h:709</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3436">imgui_widgets.cpp:3436</see>
/// <br/>
/// <c>bool SliderInt2(const char* label, int v[2], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%d"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool SliderInt2(
ImString label,
ref int2 v,
int vMin,
int vMax,
[System.ComponentModel.DefaultValue("%d")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%d"u8;
}
fixed (byte* format_fixed = format)
{
fixed (int2* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderInt2(label_fixed, v_fixed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L710">imgui.h:710</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3441">imgui_widgets.cpp:3441</see>
/// <br/>
/// <c>bool SliderInt3(const char* label, int v[3], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%d"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool SliderInt3(
ImString label,
ref int3 v,
int vMin,
int vMax,
[System.ComponentModel.DefaultValue("%d")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%d"u8;
}
fixed (byte* format_fixed = format)
{
fixed (int3* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderInt3(label_fixed, v_fixed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L711">imgui.h:711</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3446">imgui_widgets.cpp:3446</see>
/// <br/>
/// <c>bool SliderInt4(const char* label, int v[4], int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%d"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool SliderInt4(
ImString label,
ref int4 v,
int vMin,
int vMax,
[System.ComponentModel.DefaultValue("%d")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%d"u8;
}
fixed (byte* format_fixed = format)
{
fixed (int4* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderInt4(label_fixed, v_fixed, vMin, vMax, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L712">imgui.h:712</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3278">imgui_widgets.cpp:3278</see>
/// <br/>
/// <c>bool SliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// <code>
/// Note: p_data, p_min and p_max are _pointers_ to a memory address holding the data. For a slider, they are all required.
/// Read code of e.g. SliderFloat(), SliderInt() etc. or examples in 'Demo-&gt;Widgets-&gt;Data Types' to understand how to use this function directly.
/// </code>
/// </remarks>
public static unsafe bool SliderScalar(
ImString label,
ImGuiDataType dataType,
Ptr pData,
Ptr pMin,
Ptr pMax,
ImString format = default,
ImGuiSliderFlags flags = default
)
{
fixed (byte* format_fixed = format)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderScalar(label_fixed, dataType, pData, pMin, pMax, format_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L713">imgui.h:713</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3365">imgui_widgets.cpp:3365</see>
/// <br/>
/// <c>bool SliderScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// <para>
/// Add multiple sliders on 1 line for compact edition of multiple components
/// </para>
/// </remarks>
public static unsafe bool SliderScalarN(
ImString label,
ImGuiDataType dataType,
Ptr pData,
int components,
Ptr pMin,
Ptr pMax,
ImString format = default,
ImGuiSliderFlags flags = default
)
{
fixed (byte* format_fixed = format)
{
fixed (byte* label_fixed = label)
{
return PInvoke.SliderScalarN(
label_fixed,
dataType,
pData,
components,
pMin,
pMax,
format_fixed,
flags
);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L714">imgui.h:714</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3511">imgui_widgets.cpp:3511</see>
/// <br/>
/// <c>bool VSliderFloat(const char* label, const ImVec2&amp; size, float* v, float v_min, float v_max, const char* format = "%.3f", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool VSliderFloat(
ImString label,
in float2 size,
ref float v,
float vMin,
float vMax,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float* v_fixed = &v)
{
fixed (float2* size_fixed = &size)
{
fixed (byte* label_fixed = label)
{
return PInvoke.VSliderFloat(
label_fixed,
size_fixed,
v_fixed,
vMin,
vMax,
format_fixed,
flags
);
}
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L715">imgui.h:715</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3516">imgui_widgets.cpp:3516</see>
/// <br/>
/// <c>bool VSliderInt(const char* label, const ImVec2&amp; size, int* v, int v_min, int v_max, const char* format = "%d", ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%d"</param>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool VSliderInt(
ImString label,
in float2 size,
ref int v,
int vMin,
int vMax,
[System.ComponentModel.DefaultValue("%d")] ImString format = default,
ImGuiSliderFlags flags = default
)
{
if (format.IsUnset)
{
format = "%d"u8;
}
fixed (byte* format_fixed = format)
{
fixed (int* v_fixed = &v)
{
fixed (float2* size_fixed = &size)
{
fixed (byte* label_fixed = label)
{
return PInvoke.VSliderInt(
label_fixed,
size_fixed,
v_fixed,
vMin,
vMax,
format_fixed,
flags
);
}
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L716">imgui.h:716</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3451">imgui_widgets.cpp:3451</see>
/// <br/>
/// <c>bool VSliderScalar(const char* label, const ImVec2&amp; size, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format = NULL, ImGuiSliderFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Regular Sliders
/// - CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped by default and can go off-bounds. Use ImGuiSliderFlags_AlwaysClamp to always clamp.
/// - Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -&gt; 1.234; "%5.2f secs" -&gt; 01.23 secs; "Biscuit: %.0f" -&gt; Biscuit: 1; etc.
/// - Format string may also be set to NULL or use the default format ("%f" or "%d").
/// - Legacy: Pre-1.78 there are SliderXXX() function signatures that take a final `float power=1.0f' argument instead of the `ImGuiSliderFlags flags=0' argument.
/// If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361
/// </code>
/// </remarks>
public static unsafe bool VSliderScalar(
ImString label,
in float2 size,
ImGuiDataType dataType,
Ptr pData,
Ptr pMin,
Ptr pMax,
ImString format = default,
ImGuiSliderFlags flags = default
)
{
fixed (byte* format_fixed = format)
{
fixed (float2* size_fixed = &size)
{
fixed (byte* label_fixed = label)
{
return PInvoke.VSliderScalar(
label_fixed,
size_fixed,
dataType,
pData,
pMin,
pMax,
format_fixed,
flags
);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L721">imgui.h:721</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3931">imgui_widgets.cpp:3931</see>
/// <br/>
/// <c>bool InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputText(
ImString label,
ReadOnlySpan<byte> buf,
ImGuiInputTextFlags flags = default,
ImGuiInputTextCallback? callback = default,
Ptr userData = default
)
{
fixed (byte* buf_fixed = buf)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputText(
label_fixed,
buf_fixed,
(nuint)buf.Length,
flags,
callback == null ? 0 : Marshal.GetFunctionPointerForDelegate(callback),
userData
);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L721">imgui.h:721</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3931">imgui_widgets.cpp:3931</see>
/// <br/>
/// <c>bool InputText(const char* label, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputText(
ImString label,
ReadOnlySpan<byte> buf,
ImGuiInputTextFlags flags,
delegate* unmanaged[Cdecl]<ImGuiInputTextCallbackData*, int> callback,
Ptr userData = default
)
{
fixed (byte* buf_fixed = buf)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputText(
label_fixed,
buf_fixed,
(nuint)buf.Length,
flags,
(nint)callback,
userData
);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L722">imgui.h:722</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3937">imgui_widgets.cpp:3937</see>
/// <br/>
/// <c>bool InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2&amp; size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputTextMultiline(
ImString label,
ReadOnlySpan<byte> buf,
in float2? size = default,
ImGuiInputTextFlags flags = default,
ImGuiInputTextCallback? callback = default,
Ptr userData = default
)
{
var size_default = size ?? new float2(0f, 0f);
fixed (byte* buf_fixed = buf)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputTextMultiline(
label_fixed,
buf_fixed,
(nuint)buf.Length,
&size_default,
flags,
callback == null ? 0 : Marshal.GetFunctionPointerForDelegate(callback),
userData
);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L722">imgui.h:722</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3937">imgui_widgets.cpp:3937</see>
/// <br/>
/// <c>bool InputTextMultiline(const char* label, char* buf, size_t buf_size, const ImVec2&amp; size = ImVec2(0, 0), ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputTextMultiline(
ImString label,
ReadOnlySpan<byte> buf,
in float2? size,
ImGuiInputTextFlags flags,
delegate* unmanaged[Cdecl]<ImGuiInputTextCallbackData*, int> callback,
Ptr userData = default
)
{
var size_default = size ?? new float2(0f, 0f);
fixed (byte* buf_fixed = buf)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputTextMultiline(
label_fixed,
buf_fixed,
(nuint)buf.Length,
&size_default,
flags,
(nint)callback,
userData
);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L723">imgui.h:723</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3942">imgui_widgets.cpp:3942</see>
/// <br/>
/// <c>bool InputTextWithHint(const char* label, const char* hint, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputTextWithHint(
ImString label,
ImString hint,
ReadOnlySpan<byte> buf,
ImGuiInputTextFlags flags = default,
ImGuiInputTextCallback? callback = default,
Ptr userData = default
)
{
fixed (byte* buf_fixed = buf)
{
fixed (byte* hint_fixed = hint)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputTextWithHint(
label_fixed,
hint_fixed,
buf_fixed,
(nuint)buf.Length,
flags,
callback == null ? 0 : Marshal.GetFunctionPointerForDelegate(callback),
userData
);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L723">imgui.h:723</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3942">imgui_widgets.cpp:3942</see>
/// <br/>
/// <c>bool InputTextWithHint(const char* label, const char* hint, char* buf, size_t buf_size, ImGuiInputTextFlags flags = 0, ImGuiInputTextCallback callback = NULL, void* user_data = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputTextWithHint(
ImString label,
ImString hint,
ReadOnlySpan<byte> buf,
ImGuiInputTextFlags flags,
delegate* unmanaged[Cdecl]<ImGuiInputTextCallbackData*, int> callback,
Ptr userData = default
)
{
fixed (byte* buf_fixed = buf)
{
fixed (byte* hint_fixed = hint)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputTextWithHint(
label_fixed,
hint_fixed,
buf_fixed,
(nuint)buf.Length,
flags,
(nint)callback,
userData
);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L724">imgui.h:724</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3865">imgui_widgets.cpp:3865</see>
/// <br/>
/// <c>bool InputFloat(const char* label, float* v, float step = 0.0f, float step_fast = 0.0f, const char* format = "%.3f", ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputFloat(
ImString label,
ref float v,
float step = 0f,
float stepFast = 0f,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiInputTextFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputFloat(label_fixed, v_fixed, step, stepFast, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L725">imgui.h:725</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3870">imgui_widgets.cpp:3870</see>
/// <br/>
/// <c>bool InputFloat2(const char* label, float v[2], const char* format = "%.3f", ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputFloat2(
ImString label,
ref float2 v,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiInputTextFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float2* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputFloat2(label_fixed, v_fixed, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L726">imgui.h:726</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3875">imgui_widgets.cpp:3875</see>
/// <br/>
/// <c>bool InputFloat3(const char* label, float v[3], const char* format = "%.3f", ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputFloat3(
ImString label,
ref float3 v,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiInputTextFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float3* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputFloat3(label_fixed, v_fixed, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L727">imgui.h:727</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3880">imgui_widgets.cpp:3880</see>
/// <br/>
/// <c>bool InputFloat4(const char* label, float v[4], const char* format = "%.3f", ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.3f"</param>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputFloat4(
ImString label,
ref float4 v,
[System.ComponentModel.DefaultValue("%.3f")] ImString format = default,
ImGuiInputTextFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.3f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (float4* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputFloat4(label_fixed, v_fixed, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L728">imgui.h:728</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3885">imgui_widgets.cpp:3885</see>
/// <br/>
/// <c>bool InputInt(const char* label, int* v, int step = 1, int step_fast = 100, ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputInt(
ImString label,
ref int v,
int step = 1,
int stepFast = 100,
ImGuiInputTextFlags flags = default
)
{
fixed (int* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputInt(label_fixed, v_fixed, step, stepFast, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L729">imgui.h:729</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3892">imgui_widgets.cpp:3892</see>
/// <br/><c>bool InputInt2(const char* label, int v[2], ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputInt2(ImString label, ref int2 v, ImGuiInputTextFlags flags = default)
{
fixed (int2* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputInt2(label_fixed, v_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L730">imgui.h:730</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3897">imgui_widgets.cpp:3897</see>
/// <br/><c>bool InputInt3(const char* label, int v[3], ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputInt3(ImString label, ref int3 v, ImGuiInputTextFlags flags = default)
{
fixed (int3* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputInt3(label_fixed, v_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L731">imgui.h:731</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3902">imgui_widgets.cpp:3902</see>
/// <br/><c>bool InputInt4(const char* label, int v[4], ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputInt4(ImString label, ref int4 v, ImGuiInputTextFlags flags = default)
{
fixed (int4* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputInt4(label_fixed, v_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L732">imgui.h:732</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3907">imgui_widgets.cpp:3907</see>
/// <br/>
/// <c>bool InputDouble(const char* label, double* v, double step = 0.0, double step_fast = 0.0, const char* format = "%.6f", ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <param name="format">Default value if unset: "%.6f"</param>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputDouble(
ImString label,
ref double v,
double step = 0d,
double stepFast = 0d,
[System.ComponentModel.DefaultValue("%.6f")] ImString format = default,
ImGuiInputTextFlags flags = default
)
{
if (format.IsUnset)
{
format = "%.6f"u8;
}
fixed (byte* format_fixed = format)
{
fixed (double* v_fixed = &v)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputDouble(label_fixed, v_fixed, step, stepFast, format_fixed, flags);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L733">imgui.h:733</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3746">imgui_widgets.cpp:3746</see>
/// <br/>
/// <c>bool InputScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_step = NULL, const void* p_step_fast = NULL, const char* format = NULL, ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// <code>
/// Note: p_data, p_step, p_step_fast are _pointers_ to a memory address holding the data. For an Input widget, p_step and p_step_fast are optional.
/// Read code of e.g. InputFloat(), InputInt() etc. or examples in 'Demo-&gt;Widgets-&gt;Data Types' to understand how to use this function directly.
/// </code>
/// </remarks>
public static unsafe bool InputScalar(
ImString label,
ImGuiDataType dataType,
Ptr pData,
Ptr pStep = default,
Ptr pStepFast = default,
ImString format = default,
ImGuiInputTextFlags flags = default
)
{
fixed (byte* format_fixed = format)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputScalar(label_fixed, dataType, pData, pStep, pStepFast, format_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L734">imgui.h:734</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L3830">imgui_widgets.cpp:3830</see>
/// <br/>
/// <c>bool InputScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_step = NULL, const void* p_step_fast = NULL, const char* format = NULL, ImGuiInputTextFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Input with Keyboard
/// - If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
/// - Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.
/// </code>
/// </remarks>
public static unsafe bool InputScalarN(
ImString label,
ImGuiDataType dataType,
Ptr pData,
int components,
Ptr pStep = default,
Ptr pStepFast = default,
ImString format = default,
ImGuiInputTextFlags flags = default
)
{
fixed (byte* format_fixed = format)
{
fixed (byte* label_fixed = label)
{
return PInvoke.InputScalarN(
label_fixed,
dataType,
pData,
components,
pStep,
pStepFast,
format_fixed,
flags
);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L739">imgui.h:739</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L5541">imgui_widgets.cpp:5541</see>
/// <br/><c>bool ColorEdit3(const char* label, float col[3], ImGuiColorEditFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
/// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible.
/// - You can pass the address of a first float element out of a contiguous structure, e.g. &amp;myvector.x
/// </code>
/// </remarks>
public static unsafe bool ColorEdit3(ImString label, ref float3 col, ImGuiColorEditFlags flags = default)
{
fixed (float3* col_fixed = &col)
{
fixed (byte* label_fixed = label)
{
return PInvoke.ColorEdit3(label_fixed, col_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L740">imgui.h:740</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L5577">imgui_widgets.cpp:5577</see>
/// <br/><c>bool ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
/// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible.
/// - You can pass the address of a first float element out of a contiguous structure, e.g. &amp;myvector.x
/// </code>
/// <code>
/// Edit colors components (each component in 0.0f..1.0f range).
/// See enum ImGuiColorEditFlags_ for available options. e.g. Only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set.
/// With typical options: Left-click on color square to open color picker. Right-click to open option menu. CTRL+Click over input fields to edit them and TAB to go to next item.
/// </code>
/// </remarks>
public static unsafe bool ColorEdit4(ImString label, ref float4 col, ImGuiColorEditFlags flags = default)
{
fixed (float4* col_fixed = &col)
{
fixed (byte* label_fixed = label)
{
return PInvoke.ColorEdit4(label_fixed, col_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L741">imgui.h:741</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L5825">imgui_widgets.cpp:5825</see>
/// <br/><c>bool ColorPicker3(const char* label, float col[3], ImGuiColorEditFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
/// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible.
/// - You can pass the address of a first float element out of a contiguous structure, e.g. &amp;myvector.x
/// </code>
/// </remarks>
public static unsafe bool ColorPicker3(ImString label, ref float3 col, ImGuiColorEditFlags flags = default)
{
fixed (float3* col_fixed = &col)
{
fixed (byte* label_fixed = label)
{
return PInvoke.ColorPicker3(label_fixed, col_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L742">imgui.h:742</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L5848">imgui_widgets.cpp:5848</see>
/// <br/>
/// <c>bool ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags = 0, const float* ref_col = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
/// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible.
/// - You can pass the address of a first float element out of a contiguous structure, e.g. &amp;myvector.x
/// </code>
/// <code>
/// Note: ColorPicker4() only accesses 3 floats if ImGuiColorEditFlags_NoAlpha flag is set.
/// (In C++ the 'float col[4]' notation for a function argument is equivalent to 'float* col', we only specify a size to facilitate understanding of the code.)
/// FIXME: we adjust the big color square height based on item width, which may cause a flickering feedback loop (if automatic height makes a vertical scrollbar appears, affecting automatic width..)
/// FIXME: this is trying to be aware of style.Alpha but not fully correct. Also, the color wheel will have overlapping glitches with (style.Alpha &lt; 1.0)
/// </code>
/// </remarks>
public static unsafe bool ColorPicker4(
ImString label,
ref float4 col,
ImGuiColorEditFlags flags = default,
in float4? refCol = null
)
{
var refCol_ptr = refCol is { } refCol_value ? &refCol_value : null;
fixed (float4* col_fixed = &col)
{
fixed (byte* label_fixed = label)
{
return PInvoke.ColorPicker4(label_fixed, col_fixed, flags, (float*)refCol_ptr);
}
}
}
/// <summary>
/// <para>
/// display a color square/button, hover for details, return true when pressed.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L743">imgui.h:743</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L6221">imgui_widgets.cpp:6221</see>
/// <br/>
/// <c>bool ColorButton(const char* desc_id, const ImVec4&amp; col, ImGuiColorEditFlags flags = 0, const ImVec2&amp; size = ImVec2(0, 0))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
/// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible.
/// - You can pass the address of a first float element out of a contiguous structure, e.g. &amp;myvector.x
/// </code>
/// <code>
/// A little color square. Return true when clicked.
/// FIXME: May want to display/ignore the alpha component in the color display? Yet show it in the tooltip.
/// 'desc_id' is not called 'label' because we don't display it next to the button, but only in the tooltip.
/// Note that 'col' may be encoded in HSV if ImGuiColorEditFlags_InputHSV is set.
/// </code>
/// </remarks>
public static unsafe bool ColorButton(
ImString descId,
in float4 col,
ImGuiColorEditFlags flags = default,
in float2? size = default
)
{
var size_default = size ?? new float2(0f, 0f);
fixed (float4* col_fixed = &col)
{
fixed (byte* descId_fixed = descId)
{
return PInvoke.ColorButton(descId_fixed, col_fixed, flags, &size_default);
}
}
}
/// <summary>
/// <para>
/// initialize current options (generally on application startup) if you want to select a default format,
/// picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your
/// calls.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L744">imgui.h:744</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L6305">imgui_widgets.cpp:6305</see>
/// <br/><c>void SetColorEditOptions(ImGuiColorEditFlags flags)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Color Editor/Picker (tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu.)
/// - Note that in C++ a 'float v[X]' function argument is the _same_ as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible.
/// - You can pass the address of a first float element out of a contiguous structure, e.g. &amp;myvector.x
/// </code>
/// <para>
/// Initialize/override default color options
/// </para>
/// </remarks>
public static unsafe void SetColorEditOptions(ImGuiColorEditFlags flags) => PInvoke.SetColorEditOptions(flags);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L748">imgui.h:748</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L6489">imgui_widgets.cpp:6489</see>
/// <br/><c>bool TreeNode(const char* label)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// </remarks>
public static unsafe bool TreeNode(ImString label)
{
fixed (byte* label_fixed = label)
{
return PInvoke.TreeNode_0(label_fixed);
}
}
/// <summary>
/// <para>
/// helper variation to easily decorelate the id from the displayed string. Read the FAQ about why and how
/// to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L749">imgui.h:749</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L6471">imgui_widgets.cpp:6471</see>
/// <br/><c>bool TreeNode(const char* str_id, const char* fmt, ...) IM_FMTARGS(2)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// </remarks>
public static unsafe bool TreeNode(ImString strId, ImString text)
{
fixed (byte* text_fixed = text)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.TreeNode_1(strId_fixed, text_fixed);
}
}
}
/// <summary>
/// <para>
/// "
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L750">imgui.h:750</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L6480">imgui_widgets.cpp:6480</see>
/// <br/><c>bool TreeNode(const void* ptr_id, const char* fmt, ...) IM_FMTARGS(2)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// </remarks>
public static unsafe bool TreeNode(nint ptrId, ImString text)
{
fixed (byte* text_fixed = text)
{
return PInvoke.TreeNode_2((void*)ptrId, text_fixed);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L753">imgui.h:753</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L6508">imgui_widgets.cpp:6508</see>
/// <br/><c>bool TreeNodeEx(const char* label, ImGuiTreeNodeFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// </remarks>
public static unsafe bool TreeNodeEx(ImString label, ImGuiTreeNodeFlags flags = default)
{
fixed (byte* label_fixed = label)
{
return PInvoke.TreeNodeEx_0(label_fixed, flags);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L754">imgui.h:754</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L6517">imgui_widgets.cpp:6517</see>
/// <br/>
/// <c>bool TreeNodeEx(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// </remarks>
public static unsafe bool TreeNodeEx(ImString strId, ImGuiTreeNodeFlags flags, ImString text)
{
fixed (byte* text_fixed = text)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.TreeNodeEx_1(strId_fixed, flags, text_fixed);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L755">imgui.h:755</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L6526">imgui_widgets.cpp:6526</see>
/// <br/>
/// <c>bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_FMTARGS(3)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// </remarks>
public static unsafe bool TreeNodeEx(nint ptrId, ImGuiTreeNodeFlags flags, ImString text)
{
fixed (byte* text_fixed = text)
{
return PInvoke.TreeNodeEx_2((void*)ptrId, flags, text_fixed);
}
}
/// <summary>
/// <para>
/// ~ Indent()+PushID(). Already called by TreeNode() when returning true, but you can call TreePush/TreePop
/// yourself if desired.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L758">imgui.h:758</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L6983">imgui_widgets.cpp:6983</see>
/// <br/><c>void TreePush(const char* str_id)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// </remarks>
public static unsafe void TreePush(ImString strId)
{
fixed (byte* strId_fixed = strId)
{
PInvoke.TreePush_0(strId_fixed);
}
}
/// <summary>
/// <para>
/// "
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L759">imgui.h:759</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L6991">imgui_widgets.cpp:6991</see>
/// <br/><c>void TreePush(const void* ptr_id)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// </remarks>
public static unsafe void TreePush(nint ptrId) => PInvoke.TreePush_1((void*)ptrId);
/// <summary>
/// <para>
/// ~ Unindent()+PopID()
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L760">imgui.h:760</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7008">imgui_widgets.cpp:7008</see>
/// <br/><c>void TreePop()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// </remarks>
public static unsafe void TreePop() => PInvoke.TreePop();
/// <summary>
/// <para>
/// horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize +
/// style.FramePadding.x*2) for a regular unframed TreeNode
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L761">imgui.h:761</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7041">imgui_widgets.cpp:7041</see>
/// <br/><c>float GetTreeNodeToLabelSpacing()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// <para>
/// Horizontal distance preceding label when using TreeNode() or Bullet()
/// </para>
/// </remarks>
public static unsafe float GetTreeNodeToLabelSpacing() => PInvoke.GetTreeNodeToLabelSpacing();
/// <summary>
/// <para>
/// if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call
/// TreePop().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L762">imgui.h:762</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7070">imgui_widgets.cpp:7070</see>
/// <br/><c>bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// <code>
/// CollapsingHeader returns true when opened but do not indent nor push into the ID stack (because of the ImGuiTreeNodeFlags_NoTreePushOnOpen flag).
/// This is basically the same as calling TreeNodeEx(label, ImGuiTreeNodeFlags_CollapsingHeader). You can remove the _NoTreePushOnOpen flag if you want behavior closer to normal TreeNode().
/// </code>
/// </remarks>
public static unsafe bool CollapsingHeader(ImString label, ImGuiTreeNodeFlags flags = default)
{
fixed (byte* label_fixed = label)
{
return PInvoke.CollapsingHeader_0(label_fixed, flags);
}
}
/// <summary>
/// <para>
/// when 'p_visible != NULL': if '*p_visible==true' display an additional small close button on upper right
/// of the header which will set the bool to false when clicked, if '*p_visible==false' don't display the
/// header.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L763">imgui.h:763</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7083">imgui_widgets.cpp:7083</see>
/// <br/><c>bool CollapsingHeader(const char* label, bool* p_visible, ImGuiTreeNodeFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// <code>
/// p_visible == NULL : regular collapsing header
/// p_visible != NULL &amp;&amp; *p_visible == true : show a small close button on the corner of the header, clicking the button will set *p_visible = false
/// p_visible != NULL &amp;&amp; *p_visible == false : do not show the header at all
/// Do not mistake this with the Open state of the header itself, which you can adjust with SetNextItemOpen() or ImGuiTreeNodeFlags_DefaultOpen.
/// </code>
/// </remarks>
public static unsafe bool CollapsingHeader(
ImString label,
ref bool pVisible,
ImGuiTreeNodeFlags flags = default
)
{
fixed (bool* pVisible_fixed = &pVisible)
{
fixed (byte* label_fixed = label)
{
return PInvoke.CollapsingHeader_1(label_fixed, (Bool8*)pVisible_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// set next TreeNode/CollapsingHeader open state.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L764">imgui.h:764</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7048">imgui_widgets.cpp:7048</see>
/// <br/><c>void SetNextItemOpen(bool is_open, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// <para>
/// Set next TreeNode/CollapsingHeader open state.
/// </para>
/// </remarks>
public static unsafe void SetNextItemOpen(bool isOpen, ImGuiCond cond = default) =>
PInvoke.SetNextItemOpen(isOpen, cond);
/// <summary>
/// <para>
/// set id to use for open/close storage (default to same as item id).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L765">imgui.h:765</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7059">imgui_widgets.cpp:7059</see>
/// <br/><c>void SetNextItemStorageID(ImGuiID storage_id)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Trees
/// - TreeNode functions return true when the node is open, in which case you need to also call TreePop() when you are finished displaying the tree node contents.
/// </code>
/// <para>
/// Set next TreeNode/CollapsingHeader storage id.
/// </para>
/// </remarks>
public static unsafe void SetNextItemStorageID(ImGuiID storageId) => PInvoke.SetNextItemStorageID(storageId);
/// <summary>
/// <para>
/// "bool selected" carry the selection state (read-only). Selectable() is clicked is returns true so you
/// can modify your selection state. size.x==0.0: use remaining width, size.x&gt;0.0: specify width.
/// size.y==0.0: use label height, size.y&gt;0.0: specify height
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L770">imgui.h:770</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7126">imgui_widgets.cpp:7126</see>
/// <br/>
/// <c>bool Selectable(const char* label, bool selected = false, ImGuiSelectableFlags flags = 0, const ImVec2&amp; size = ImVec2(0, 0))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Selectables
/// - A selectable highlights when hovered, and can display another color when selected.
/// - Neighbors selectable extend their highlight bounds in order to leave no gap between them. This is so a series of selected Selectable appear contiguous.
/// </code>
/// <code>
/// Tip: pass a non-visible label (e.g. "##hello") then you can use the space to draw other text or image.
/// But you need to make sure the ID is unique, e.g. enclose calls in PushID/PopID or use ##unique_id.
/// With this scheme, ImGuiSelectableFlags_SpanAllColumns and ImGuiSelectableFlags_AllowOverlap are also frequently used flags.
/// FIXME: Selectable() with (size.x == 0.0f) and (SelectableTextAlign.x &gt; 0.0f) followed by SameLine() is currently not supported.
/// </code>
/// </remarks>
public static unsafe bool Selectable(
ImString label,
bool selected = false,
ImGuiSelectableFlags flags = default,
in float2? size = default
)
{
var size_default = size ?? new float2(0f, 0f);
fixed (byte* label_fixed = label)
{
return PInvoke.Selectable_0(label_fixed, selected, flags, &size_default);
}
}
/// <summary>
/// <para>
/// "bool* p_selected" point to the selection state (read-write), as a convenient helper.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L771">imgui.h:771</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7307">imgui_widgets.cpp:7307</see>
/// <br/>
/// <c>bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2&amp; size = ImVec2(0, 0))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Selectables
/// - A selectable highlights when hovered, and can display another color when selected.
/// - Neighbors selectable extend their highlight bounds in order to leave no gap between them. This is so a series of selected Selectable appear contiguous.
/// </code>
/// </remarks>
public static unsafe bool Selectable(
ImString label,
ref bool pSelected,
ImGuiSelectableFlags flags = default,
in float2? size = default
)
{
var size_default = size ?? new float2(0f, 0f);
fixed (bool* pSelected_fixed = &pSelected)
{
fixed (byte* label_fixed = label)
{
return PInvoke.Selectable_1(label_fixed, (Bool8*)pSelected_fixed, flags, &size_default);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L780">imgui.h:780</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7715">imgui_widgets.cpp:7715</see>
/// <br/>
/// <c>ImGuiMultiSelectIO* BeginMultiSelect(ImGuiMultiSelectFlags flags, int selection_size = -1, int items_count = -1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA]
/// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
/// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
/// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo-&gt;Widgets-&gt;Selection State &amp; Multi-Select' for demo.
/// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree,
/// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo.
/// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
/// </code>
/// <code>
/// Return ImGuiMultiSelectIO structure.
/// Lifetime: don't hold on ImGuiMultiSelectIO* pointers over multiple frames or past any subsequent call to BeginMultiSelect() or EndMultiSelect().
/// Passing 'selection_size' and 'items_count' parameters is currently optional.
/// - 'selection_size' is useful to disable some shortcut routing: e.g. ImGuiMultiSelectFlags_ClearOnEscape won't claim Escape key when selection_size 0,
/// allowing a first press to clear selection THEN the second press to leave child window and return to parent.
/// - 'items_count' is stored in ImGuiMultiSelectIO which makes it a convenient way to pass the information to your ApplyRequest() handler (but you may pass it differently).
/// - If they are costly for you to compute (e.g. external intrusive selection without maintaining size), you may avoid them and pass -1.
/// - If you can easily tell if your selection is empty or not, you may pass 0/1, or you may enable ImGuiMultiSelectFlags_ClearOnEscape flag dynamically.
/// </code>
/// </remarks>
public static unsafe ImGuiMultiSelectIOPtr BeginMultiSelect(
ImGuiMultiSelectFlags flags,
int selectionSize = -1,
int itemsCount = -1
) => PInvoke.BeginMultiSelect(flags, selectionSize, itemsCount);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L781">imgui.h:781</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7838">imgui_widgets.cpp:7838</see>
/// <br/><c>ImGuiMultiSelectIO* EndMultiSelect()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA]
/// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
/// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
/// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo-&gt;Widgets-&gt;Selection State &amp; Multi-Select' for demo.
/// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree,
/// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo.
/// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
/// </code>
/// <code>
/// Return updated ImGuiMultiSelectIO structure.
/// Lifetime: don't hold on ImGuiMultiSelectIO* pointers over multiple frames or past any subsequent call to BeginMultiSelect() or EndMultiSelect().
/// </code>
/// </remarks>
public static unsafe ImGuiMultiSelectIOPtr EndMultiSelect() => PInvoke.EndMultiSelect();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L782">imgui.h:782</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L7917">imgui_widgets.cpp:7917</see>
/// <br/><c>void SetNextItemSelectionUserData(ImGuiSelectionUserData selection_user_data)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA]
/// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
/// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
/// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo-&gt;Widgets-&gt;Selection State &amp; Multi-Select' for demo.
/// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree,
/// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo.
/// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
/// </code>
/// </remarks>
public static unsafe void SetNextItemSelectionUserData(ulong selectionUserData) =>
PInvoke.SetNextItemSelectionUserData(selectionUserData);
/// <summary>
/// <para>
/// Was the last item selection state toggled? Useful if you need the per-item information _before_ reaching
/// EndMultiSelect(). We only returns toggle _event_ in order to handle clipping correctly.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L783">imgui.h:783</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6371">imgui.cpp:6371</see>
/// <br/><c>bool IsItemToggledSelection()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Multi-selection system for Selectable(), Checkbox(), TreeNode() functions [BETA]
/// - This enables standard multi-selection/range-selection idioms (CTRL+Mouse/Keyboard, SHIFT+Mouse/Keyboard, etc.) in a way that also allow a clipper to be used.
/// - ImGuiSelectionUserData is often used to store your item index within the current view (but may store something else).
/// - Read comments near ImGuiMultiSelectIO for instructions/details and see 'Demo-&gt;Widgets-&gt;Selection State &amp; Multi-Select' for demo.
/// - TreeNode() is technically supported but... using this correctly is more complicated. You need some sort of linear/random access to your tree,
/// which is suited to advanced trees setups already implementing filters and clipper. We will work simplifying the current demo.
/// - 'selection_size' and 'items_count' parameters are optional and used by a few features. If they are costly for you to compute, you may avoid them.
/// </code>
/// <code>
/// Call after a Selectable() or TreeNode() involved in multi-selection.
/// Useful if you need the per-item information before reaching EndMultiSelect(), e.g. for rendering purpose.
/// This is only meant to be called inside a BeginMultiSelect()/EndMultiSelect() block.
/// (Outside of multi-select, it would be misleading/ambiguous to report this signal, as widgets
/// return e.g. a pressed event and user code is in charge of altering selection in ways we cannot predict.)
/// </code>
/// </remarks>
public static unsafe bool IsItemToggledSelection() => PInvoke.IsItemToggledSelection();
/// <summary>
/// <para>
/// open a framed scrolling region
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L792">imgui.h:792</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8455">imgui_widgets.cpp:8455</see>
/// <br/><c>bool BeginListBox(const char* label, const ImVec2&amp; size = ImVec2(0, 0))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: List Boxes
/// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
/// - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result.
/// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
/// - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analogous to how Combos are created.
/// - Choose frame width: size.x &gt; 0.0f: custom / size.x &lt; 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth
/// - Choose frame height: size.y &gt; 0.0f: custom / size.y &lt; 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items
/// </code>
/// <code>
/// This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
/// This handle some subtleties with capturing info from the label.
/// If you don't need a label you can pretty much directly use ImGui::BeginChild() with ImGuiChildFlags_FrameStyle.
/// Tip: To have a list filling the entire window width, use size.x = -FLT_MIN and pass an non-visible label e.g. "##empty"
/// Tip: If your vertical size is calculated from an item count (e.g. 10 * item_height) consider adding a fractional part to facilitate seeing scrolling boundaries (e.g. 10.5f * item_height).
/// </code>
/// </remarks>
public static unsafe bool BeginListBox(ImString label, in float2? size = default)
{
var size_default = size ?? new float2(0f, 0f);
fixed (byte* label_fixed = label)
{
return PInvoke.BeginListBox(label_fixed, &size_default);
}
}
/// <summary>
/// <para>
/// only call EndListBox() if BeginListBox() returned true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L793">imgui.h:793</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8496">imgui_widgets.cpp:8496</see>
/// <br/><c>void EndListBox()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: List Boxes
/// - This is essentially a thin wrapper to using BeginChild/EndChild with the ImGuiChildFlags_FrameStyle flag for stylistic changes + displaying a label.
/// - If you don't need a label you can probably simply use BeginChild() with the ImGuiChildFlags_FrameStyle flag for the same result.
/// - You can submit contents and manage your selection state however you want it, by creating e.g. Selectable() or any other items.
/// - The simplified/old ListBox() api are helpers over BeginListBox()/EndListBox() which are kept available for convenience purpose. This is analogous to how Combos are created.
/// - Choose frame width: size.x &gt; 0.0f: custom / size.x &lt; 0.0f or -FLT_MIN: right-align / size.x = 0.0f (default): use current ItemWidth
/// - Choose frame height: size.y &gt; 0.0f: custom / size.y &lt; 0.0f or -FLT_MIN: bottom-align / size.y = 0.0f (default): arbitrary default height which can fit ~7 items
/// </code>
/// </remarks>
public static unsafe void EndListBox() => PInvoke.EndListBox();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L799">imgui.h:799</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8704">imgui_widgets.cpp:8704</see>
/// <br/>
/// <c>void PlotLines(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Data Plotting
/// - Consider using ImPlot (https://github.com/epezent/implot) which is much better!
/// </code>
/// </remarks>
public static unsafe void PlotLines(
ImString label,
ReadOnlySpan<float> values,
int valuesOffset = 0,
ImString overlayText = default,
float scaleMin = float.MaxValue,
float scaleMax = float.MaxValue,
float2? graphSize = default,
int stride = 4
)
{
var graphSize_default = graphSize ?? new float2(0f, 0f);
fixed (byte* overlayText_fixed = overlayText)
{
fixed (float* values_fixed = values)
{
fixed (byte* label_fixed = label)
{
PInvoke.PlotLines_0(
label_fixed,
values_fixed,
values.Length,
valuesOffset,
overlayText_fixed,
scaleMin,
scaleMax,
graphSize_default,
stride
);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L801">imgui.h:801</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8715">imgui_widgets.cpp:8715</see>
/// <br/>
/// <c>void PlotHistogram(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0, 0), int stride = sizeof(float))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Data Plotting
/// - Consider using ImPlot (https://github.com/epezent/implot) which is much better!
/// </code>
/// </remarks>
public static unsafe void PlotHistogram(
ImString label,
ReadOnlySpan<float> values,
int valuesOffset = 0,
ImString overlayText = default,
float scaleMin = float.MaxValue,
float scaleMax = float.MaxValue,
float2? graphSize = default,
int stride = 4
)
{
var graphSize_default = graphSize ?? new float2(0f, 0f);
fixed (byte* overlayText_fixed = overlayText)
{
fixed (float* values_fixed = values)
{
fixed (byte* label_fixed = label)
{
PInvoke.PlotHistogram_0(
label_fixed,
values_fixed,
values.Length,
valuesOffset,
overlayText_fixed,
scaleMin,
scaleMax,
graphSize_default,
stride
);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L806">imgui.h:806</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8733">imgui_widgets.cpp:8733</see>
/// <br/><c>void Value(const char* prefix, bool b)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Value() Helpers.
/// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace)
/// </code>
/// </remarks>
public static unsafe void Value(ImString prefix, bool b)
{
fixed (byte* prefix_fixed = prefix)
{
PInvoke.Value_0(prefix_fixed, b);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L807">imgui.h:807</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8738">imgui_widgets.cpp:8738</see>
/// <br/><c>void Value(const char* prefix, int v)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Value() Helpers.
/// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace)
/// </code>
/// </remarks>
public static unsafe void Value(ImString prefix, int v)
{
fixed (byte* prefix_fixed = prefix)
{
PInvoke.Value_1(prefix_fixed, v);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L808">imgui.h:808</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8743">imgui_widgets.cpp:8743</see>
/// <br/><c>void Value(const char* prefix, unsigned int v)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Value() Helpers.
/// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace)
/// </code>
/// </remarks>
public static unsafe void Value(ImString prefix, uint v)
{
fixed (byte* prefix_fixed = prefix)
{
PInvoke.Value_2(prefix_fixed, v);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L809">imgui.h:809</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8748">imgui_widgets.cpp:8748</see>
/// <br/><c>void Value(const char* prefix, float v, const char* float_format = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Value() Helpers.
/// - Those are merely shortcut to calling Text() with a format string. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace)
/// </code>
/// </remarks>
public static unsafe void Value(ImString prefix, float v, ImString floatFormat = default)
{
fixed (byte* floatFormat_fixed = floatFormat)
{
fixed (byte* prefix_fixed = prefix)
{
PInvoke.Value_3(prefix_fixed, v, floatFormat_fixed);
}
}
}
/// <summary>
/// <para>
/// append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L816">imgui.h:816</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8823">imgui_widgets.cpp:8823</see>
/// <br/><c>bool BeginMenuBar()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Menus
/// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar.
/// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it.
/// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it.
/// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment.
/// </code>
/// <code>
/// FIXME: Provided a rectangle perhaps e.g. a BeginMenuBarEx() could be used anywhere..
/// Currently the main responsibility of this function being to setup clip-rect + horizontal layout + menu navigation layer.
/// Ideally we also want this to be responsible for claiming space out of the main window scrolling rectangle, in which case ImGuiWindowFlags_MenuBar will become unnecessary.
/// Then later the same system could be used for multiple menu-bars, scrollbars, side-bars.
/// </code>
/// </remarks>
public static unsafe bool BeginMenuBar() => PInvoke.BeginMenuBar();
/// <summary>
/// <para>
/// only call EndMenuBar() if BeginMenuBar() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L817">imgui.h:817</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8854">imgui_widgets.cpp:8854</see>
/// <br/><c>void EndMenuBar()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Menus
/// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar.
/// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it.
/// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it.
/// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment.
/// </code>
/// </remarks>
public static unsafe void EndMenuBar() => PInvoke.EndMenuBar();
/// <summary>
/// <para>
/// create and append to a full screen menu-bar.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L818">imgui.h:818</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8948">imgui_widgets.cpp:8948</see>
/// <br/><c>bool BeginMainMenuBar()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Menus
/// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar.
/// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it.
/// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it.
/// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment.
/// </code>
/// </remarks>
public static unsafe bool BeginMainMenuBar() => PInvoke.BeginMainMenuBar();
/// <summary>
/// <para>
/// only call EndMainMenuBar() if BeginMainMenuBar() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L819">imgui.h:819</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8976">imgui_widgets.cpp:8976</see>
/// <br/><c>void EndMainMenuBar()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Menus
/// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar.
/// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it.
/// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it.
/// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment.
/// </code>
/// </remarks>
public static unsafe void EndMainMenuBar() => PInvoke.EndMainMenuBar();
/// <summary>
/// <para>
/// create a sub-menu entry. only call EndMenu() if this returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L820">imgui.h:820</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L9232">imgui_widgets.cpp:9232</see>
/// <br/><c>bool BeginMenu(const char* label, bool enabled = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Menus
/// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar.
/// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it.
/// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it.
/// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment.
/// </code>
/// </remarks>
public static unsafe bool BeginMenu(ImString label, bool enabled = true)
{
fixed (byte* label_fixed = label)
{
return PInvoke.BeginMenu(label_fixed, enabled);
}
}
/// <summary>
/// <para>
/// only call EndMenu() if BeginMenu() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L821">imgui.h:821</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L9237">imgui_widgets.cpp:9237</see>
/// <br/><c>void EndMenu()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Menus
/// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar.
/// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it.
/// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it.
/// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment.
/// </code>
/// </remarks>
public static unsafe void EndMenu() => PInvoke.EndMenu();
/// <summary>
/// <para>
/// return true when activated.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L822">imgui.h:822</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L9332">imgui_widgets.cpp:9332</see>
/// <br/>
/// <c>bool MenuItem(const char* label, const char* shortcut = NULL, bool selected = false, bool enabled = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Menus
/// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar.
/// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it.
/// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it.
/// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment.
/// </code>
/// </remarks>
public static unsafe bool MenuItem(
ImString label,
ImString shortcut = default,
bool selected = false,
bool enabled = true
)
{
fixed (byte* shortcut_fixed = shortcut)
{
fixed (byte* label_fixed = label)
{
return PInvoke.MenuItem_0(label_fixed, shortcut_fixed, selected, enabled);
}
}
}
/// <summary>
/// <para>
/// return true when activated + toggle (*p_selected) if p_selected != NULL
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L823">imgui.h:823</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L9337">imgui_widgets.cpp:9337</see>
/// <br/>
/// <c>bool MenuItem(const char* label, const char* shortcut, bool* p_selected, bool enabled = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Widgets: Menus
/// - Use BeginMenuBar() on a window ImGuiWindowFlags_MenuBar to append to its menu bar.
/// - Use BeginMainMenuBar() to create a menu bar at the top of the screen and append to it.
/// - Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it.
/// - Not that MenuItem() keyboardshortcuts are displayed as a convenience but _not processed_ by Dear ImGui at the moment.
/// </code>
/// </remarks>
public static unsafe bool MenuItem(ImString label, ImString shortcut, ref bool pSelected, bool enabled = true)
{
fixed (bool* pSelected_fixed = &pSelected)
{
fixed (byte* shortcut_fixed = shortcut)
{
fixed (byte* label_fixed = label)
{
return PInvoke.MenuItem_1(label_fixed, shortcut_fixed, (Bool8*)pSelected_fixed, enabled);
}
}
}
}
/// <summary>
/// <para>
/// begin/append a tooltip window.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L829">imgui.h:829</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12438">imgui.cpp:12438</see>
/// <br/><c>bool BeginTooltip()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tooltips
/// - Tooltips are windows following the mouse. They do not take focus away.
/// - A tooltip window can contain items of any types.
/// - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip)
/// </code>
/// </remarks>
public static unsafe bool BeginTooltip() => PInvoke.BeginTooltip();
/// <summary>
/// <para>
/// only call EndTooltip() if BeginTooltip()/BeginItemTooltip() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L830">imgui.h:830</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12497">imgui.cpp:12497</see>
/// <br/><c>void EndTooltip()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tooltips
/// - Tooltips are windows following the mouse. They do not take focus away.
/// - A tooltip window can contain items of any types.
/// - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip)
/// </code>
/// </remarks>
public static unsafe void EndTooltip() => PInvoke.EndTooltip();
/// <summary>
/// <para>
/// set a text-only tooltip. Often used after a ImGui::IsItemHovered() check. Override any previous call to
/// SetTooltip().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L831">imgui.h:831</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12503">imgui.cpp:12503</see>
/// <br/><c>void SetTooltip(const char* fmt, ...) IM_FMTARGS(1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tooltips
/// - Tooltips are windows following the mouse. They do not take focus away.
/// - A tooltip window can contain items of any types.
/// - SetTooltip() is more or less a shortcut for the 'if (BeginTooltip()) { Text(...); EndTooltip(); }' idiom (with a subtlety that it discard any previously submitted tooltip)
/// </code>
/// </remarks>
public static unsafe void SetTooltip(ImString text)
{
fixed (byte* text_fixed = text)
{
PInvoke.SetTooltip(text_fixed);
}
}
/// <summary>
/// <para>
/// begin/append a tooltip window if preceding item was hovered.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L838">imgui.h:838</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12443">imgui.cpp:12443</see>
/// <br/><c>bool BeginItemTooltip()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tooltips: helpers for showing a tooltip when hovering an item
/// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip) &amp;&amp; BeginTooltip())' idiom.
/// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip)) { SetTooltip(...); }' idiom.
/// - Where 'ImGuiHoveredFlags_ForTooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
/// </code>
/// </remarks>
public static unsafe bool BeginItemTooltip() => PInvoke.BeginItemTooltip();
/// <summary>
/// <para>
/// set a text-only tooltip if preceding item was hovered. override any previous call to SetTooltip().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L839">imgui.h:839</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12521">imgui.cpp:12521</see>
/// <br/><c>void SetItemTooltip(const char* fmt, ...) IM_FMTARGS(1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tooltips: helpers for showing a tooltip when hovering an item
/// - BeginItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip) &amp;&amp; BeginTooltip())' idiom.
/// - SetItemTooltip() is a shortcut for the 'if (IsItemHovered(ImGuiHoveredFlags_ForTooltip)) { SetTooltip(...); }' idiom.
/// - Where 'ImGuiHoveredFlags_ForTooltip' itself is a shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav' depending on active input type. For mouse it defaults to 'ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort'.
/// </code>
/// <code>
/// Shortcut to use 'style.HoverFlagsForTooltipMouse' or 'style.HoverFlagsForTooltipNav'.
/// Defaults to == ImGuiHoveredFlags_Stationary | ImGuiHoveredFlags_DelayShort when using the mouse.
/// </code>
/// </remarks>
public static unsafe void SetItemTooltip(ImString text)
{
fixed (byte* text_fixed = text)
{
PInvoke.SetItemTooltip(text_fixed);
}
}
/// <summary>
/// <para>
/// return true if the popup is open, and you can start outputting to it.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L852">imgui.h:852</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12871">imgui.cpp:12871</see>
/// <br/><c>bool BeginPopup(const char* str_id, ImGuiWindowFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups, Modals
/// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them.
/// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
/// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls.
/// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time.
/// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered().
/// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack.
/// This is sometimes leading to confusing mistakes. May rework this in the future.
/// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window.
/// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
/// </code>
/// </remarks>
public static unsafe bool BeginPopup(ImString strId, ImGuiWindowFlags flags = default)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.BeginPopup(strId_fixed, flags);
}
}
/// <summary>
/// <para>
/// return true if the modal is open, and you can start outputting to it.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L853">imgui.h:853</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12888">imgui.cpp:12888</see>
/// <br/><c>bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups, Modals
/// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them.
/// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
/// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls.
/// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time.
/// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered().
/// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack.
/// This is sometimes leading to confusing mistakes. May rework this in the future.
/// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window.
/// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
/// </code>
/// <code>
/// If 'p_open' is specified for a modal popup window, the popup will have a regular close button which will close the popup.
/// Note that popup visibility status is owned by Dear ImGui (and manipulated with e.g. OpenPopup).
/// - *p_open set back to false in BeginPopupModal() when popup is not open.
/// - if you set *p_open to false before calling BeginPopupModal(), it will close the popup.
/// </code>
/// </remarks>
public static unsafe bool BeginPopupModal(ImString name, ref bool pOpen, ImGuiWindowFlags flags = default)
{
fixed (bool* pOpen_fixed = &pOpen)
{
fixed (byte* name_fixed = name)
{
return PInvoke.BeginPopupModal(name_fixed, (Bool8*)pOpen_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// return true if the modal is open, and you can start outputting to it.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L853">imgui.h:853</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12888">imgui.cpp:12888</see>
/// <br/><c>bool BeginPopupModal(const char* name, bool* p_open = NULL, ImGuiWindowFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups, Modals
/// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them.
/// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
/// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls.
/// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time.
/// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered().
/// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack.
/// This is sometimes leading to confusing mistakes. May rework this in the future.
/// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window.
/// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
/// </code>
/// <code>
/// If 'p_open' is specified for a modal popup window, the popup will have a regular close button which will close the popup.
/// Note that popup visibility status is owned by Dear ImGui (and manipulated with e.g. OpenPopup).
/// - *p_open set back to false in BeginPopupModal() when popup is not open.
/// - if you set *p_open to false before calling BeginPopupModal(), it will close the popup.
/// </code>
/// </remarks>
public static unsafe bool BeginPopupModal(ImString name, ImGuiWindowFlags flags = default)
{
fixed (byte* name_fixed = name)
{
return PInvoke.BeginPopupModal(name_fixed, null, flags);
}
}
/// <summary>
/// <para>
/// only call EndPopup() if BeginPopupXXX() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L854">imgui.h:854</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12922">imgui.cpp:12922</see>
/// <br/><c>void EndPopup()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups, Modals
/// - They block normal mouse hovering detection (and therefore most mouse interactions) behind them.
/// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
/// - Their visibility state (~bool) is held internally instead of being held by the programmer as we are used to with regular Begin*() calls.
/// - The 3 properties above are related: we need to retain popup visibility state in the library because popups may be closed as any time.
/// - You can bypass the hovering restriction by using ImGuiHoveredFlags_AllowWhenBlockedByPopup when calling IsItemHovered() or IsWindowHovered().
/// - IMPORTANT: Popup identifiers are relative to the current ID stack, so OpenPopup and BeginPopup generally needs to be at the same level of the stack.
/// This is sometimes leading to confusing mistakes. May rework this in the future.
/// - BeginPopup(): query popup state, if open start appending into the window. Call EndPopup() afterwards if returned true. ImGuiWindowFlags are forwarded to the window.
/// - BeginPopupModal(): block every interaction behind the window, cannot be closed by user, add a dimming background, has a title bar.
/// </code>
/// </remarks>
public static unsafe void EndPopup() => PInvoke.EndPopup();
/// <summary>
/// <para>
/// call to mark popup as open (don't call every frame!).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L864">imgui.h:864</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12641">imgui.cpp:12641</see>
/// <br/><c>void OpenPopup(const char* str_id, ImGuiPopupFlags popup_flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups: open/close functions
/// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options.
/// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
/// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually.
/// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options).
/// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup().
/// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened.
/// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter
/// </code>
/// </remarks>
public static unsafe void OpenPopup(ImString strId, ImGuiPopupFlags popupFlags = default)
{
fixed (byte* strId_fixed = strId)
{
PInvoke.OpenPopup_0(strId_fixed, popupFlags);
}
}
/// <summary>
/// <para>
/// id overload to facilitate calling from nested stacks
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L865">imgui.h:865</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12649">imgui.cpp:12649</see>
/// <br/><c>void OpenPopup(ImGuiID id, ImGuiPopupFlags popup_flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups: open/close functions
/// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options.
/// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
/// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually.
/// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options).
/// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup().
/// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened.
/// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter
/// </code>
/// </remarks>
public static unsafe void OpenPopup(ImGuiID id, ImGuiPopupFlags popupFlags = default) =>
PInvoke.OpenPopup_1(id, popupFlags);
/// <summary>
/// <para>
/// helper to open popup when clicked on last item. Default to ImGuiPopupFlags_MouseButtonRight == 1. (note:
/// actually triggers on the mouse _released_ event to be consistent with popup behaviors)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L866">imgui.h:866</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12946">imgui.cpp:12946</see>
/// <br/><c>void OpenPopupOnItemClick(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups: open/close functions
/// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options.
/// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
/// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually.
/// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options).
/// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup().
/// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened.
/// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter
/// </code>
/// <code>
/// Helper to open a popup if mouse button is released over the item
/// - This is essentially the same as BeginPopupContextItem() but without the trailing BeginPopup()
/// </code>
/// </remarks>
public static unsafe void OpenPopupOnItemClick(
ImString strId = default,
ImGuiPopupFlags popupFlags = (ImGuiPopupFlags)1
)
{
fixed (byte* strId_fixed = strId)
{
PInvoke.OpenPopupOnItemClick(strId_fixed, popupFlags);
}
}
/// <summary>
/// <para>
/// manually close the popup we have begin-ed into.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L867">imgui.h:867</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12801">imgui.cpp:12801</see>
/// <br/><c>void CloseCurrentPopup()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups: open/close functions
/// - OpenPopup(): set popup state to open. ImGuiPopupFlags are available for opening options.
/// - If not modal: they can be closed by clicking anywhere outside them, or by pressing ESCAPE.
/// - CloseCurrentPopup(): use inside the BeginPopup()/EndPopup() scope to close manually.
/// - CloseCurrentPopup() is called by default by Selectable()/MenuItem() when activated (FIXME: need some options).
/// - Use ImGuiPopupFlags_NoOpenOverExistingPopup to avoid opening a popup if there's already one at the same level. This is equivalent to e.g. testing for !IsAnyPopupOpen() prior to OpenPopup().
/// - Use IsWindowAppearing() after BeginPopup() to tell if a window just opened.
/// - IMPORTANT: Notice that for OpenPopupOnItemClick() we exceptionally default flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter
/// </code>
/// <para>
/// Close the popup we have begin-ed into.
/// </para>
/// </remarks>
public static unsafe void CloseCurrentPopup() => PInvoke.CloseCurrentPopup();
/// <summary>
/// <para>
/// open+begin popup when clicked on last item. Use str_id==NULL to associate the popup to previous item. If
/// you want to use that on a non-interactive item such as Text() you need to pass in an explicit ID here.
/// read comments in .cpp!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L874">imgui.h:874</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12975">imgui.cpp:12975</see>
/// <br/><c>bool BeginPopupContextItem(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups: open+begin combined functions helpers
/// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking.
/// - They are convenient to easily create context menus, hence the name.
/// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future.
/// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight.
/// </code>
/// <code>
/// This is a helper to handle the simplest case of associating one named popup to one given widget.
/// - To create a popup associated to the last item, you generally want to pass a NULL value to str_id.
/// - To create a popup with a specific identifier, pass it in str_id.
/// - This is useful when using using BeginPopupContextItem() on an item which doesn't have an identifier, e.g. a Text() call.
/// - This is useful when multiple code locations may want to manipulate/open the same popup, given an explicit id.
/// - You may want to handle the whole on user side if you have specific needs (e.g. tweaking IsItemHovered() parameters).
/// This is essentially the same as:
/// id = str_id ? GetID(str_id) : GetItemID();
/// OpenPopupOnItemClick(str_id, ImGuiPopupFlags_MouseButtonRight);
/// return BeginPopup(id);
/// Which is essentially the same as:
/// id = str_id ? GetID(str_id) : GetItemID();
/// if (IsItemHovered() &amp;&amp; IsMouseReleased(ImGuiMouseButton_Right))
/// OpenPopup(id);
/// return BeginPopup(id);
/// The main difference being that this is tweaked to avoid computing the ID twice.
/// </code>
/// </remarks>
public static unsafe bool BeginPopupContextItem(
ImString strId = default,
ImGuiPopupFlags popupFlags = (ImGuiPopupFlags)1
)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.BeginPopupContextItem(strId_fixed, popupFlags);
}
}
/// <summary>
/// <para>
/// open+begin popup when clicked on current window.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L875">imgui.h:875</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12989">imgui.cpp:12989</see>
/// <br/><c>bool BeginPopupContextWindow(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups: open+begin combined functions helpers
/// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking.
/// - They are convenient to easily create context menus, hence the name.
/// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future.
/// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight.
/// </code>
/// </remarks>
public static unsafe bool BeginPopupContextWindow(
ImString strId = default,
ImGuiPopupFlags popupFlags = (ImGuiPopupFlags)1
)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.BeginPopupContextWindow(strId_fixed, popupFlags);
}
}
/// <summary>
/// <para>
/// open+begin popup when clicked in void (where there are no windows).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L876">imgui.h:876</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L13003">imgui.cpp:13003</see>
/// <br/><c>bool BeginPopupContextVoid(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups: open+begin combined functions helpers
/// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking.
/// - They are convenient to easily create context menus, hence the name.
/// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future.
/// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight.
/// </code>
/// </remarks>
public static unsafe bool BeginPopupContextVoid(
ImString strId = default,
ImGuiPopupFlags popupFlags = (ImGuiPopupFlags)1
)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.BeginPopupContextVoid(strId_fixed, popupFlags);
}
}
/// <summary>
/// <para>
/// return true if the popup is open.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L882">imgui.h:882</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L12573">imgui.cpp:12573</see>
/// <br/><c>bool IsPopupOpen(const char* str_id, ImGuiPopupFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Popups: query functions
/// - IsPopupOpen(): return true if the popup is open at the current BeginPopup() level of the popup stack.
/// - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId: return true if any popup is open at the current BeginPopup() level of the popup stack.
/// - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId + ImGuiPopupFlags_AnyPopupLevel: return true if any popup is open.
/// </code>
/// </remarks>
public static unsafe bool IsPopupOpen(ImString strId, ImGuiPopupFlags flags = default)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.IsPopupOpen(strId_fixed, flags);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L905">imgui.h:905</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L311">imgui_tables.cpp:311</see>
/// <br/>
/// <c>bool BeginTable(const char* str_id, int columns, ImGuiTableFlags flags = 0, const ImVec2&amp; outer_size = ImVec2(0.0f, 0.0f), float inner_width = 0.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables
/// - Full-featured replacement for old Columns API.
/// - See Demo-&gt;Tables for demo code. See top of imgui_tables.cpp for general commentary.
/// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags.
/// The typical call flow is:
/// - 1. Call BeginTable(), early out if returning false.
/// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults.
/// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows.
/// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
/// - 5. Populate contents:
/// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column.
/// - If you are using tables as a sort of grid, where every column is holding the same type of contents,
/// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex().
/// TableNextColumn() will automatically wrap-around into the next row if needed.
/// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
/// - Summary of possible call flow:
/// - TableNextRow() -&gt; TableSetColumnIndex(0) -&gt; Text("Hello 0") -&gt; TableSetColumnIndex(1) -&gt; Text("Hello 1") // OK
/// - TableNextRow() -&gt; TableNextColumn() -&gt; Text("Hello 0") -&gt; TableNextColumn() -&gt; Text("Hello 1") // OK
/// - TableNextColumn() -&gt; Text("Hello 0") -&gt; TableNextColumn() -&gt; Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
/// - TableNextRow() -&gt; Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
/// - 5. Call EndTable()
/// </code>
/// <para>
/// Read about "TABLE SIZING" at the top of this file.
/// </para>
/// </remarks>
public static unsafe bool BeginTable(
ImString strId,
int columns,
ImGuiTableFlags flags = default,
in float2? outerSize = default,
float innerWidth = 0f
)
{
var outerSize_default = outerSize ?? new float2(0.0f, 0.0f);
fixed (byte* strId_fixed = strId)
{
return PInvoke.BeginTable(strId_fixed, columns, flags, &outerSize_default, innerWidth);
}
}
/// <summary>
/// <para>
/// only call EndTable() if BeginTable() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L906">imgui.h:906</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1346">imgui_tables.cpp:1346</see>
/// <br/><c>void EndTable()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables
/// - Full-featured replacement for old Columns API.
/// - See Demo-&gt;Tables for demo code. See top of imgui_tables.cpp for general commentary.
/// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags.
/// The typical call flow is:
/// - 1. Call BeginTable(), early out if returning false.
/// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults.
/// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows.
/// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
/// - 5. Populate contents:
/// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column.
/// - If you are using tables as a sort of grid, where every column is holding the same type of contents,
/// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex().
/// TableNextColumn() will automatically wrap-around into the next row if needed.
/// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
/// - Summary of possible call flow:
/// - TableNextRow() -&gt; TableSetColumnIndex(0) -&gt; Text("Hello 0") -&gt; TableSetColumnIndex(1) -&gt; Text("Hello 1") // OK
/// - TableNextRow() -&gt; TableNextColumn() -&gt; Text("Hello 0") -&gt; TableNextColumn() -&gt; Text("Hello 1") // OK
/// - TableNextColumn() -&gt; Text("Hello 0") -&gt; TableNextColumn() -&gt; Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
/// - TableNextRow() -&gt; Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
/// - 5. Call EndTable()
/// </code>
/// </remarks>
public static unsafe void EndTable() => PInvoke.EndTable();
/// <summary>
/// <para>
/// append into the first cell of a new row.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L907">imgui.h:907</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1890">imgui_tables.cpp:1890</see>
/// <br/><c>void TableNextRow(ImGuiTableRowFlags row_flags = 0, float min_row_height = 0.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables
/// - Full-featured replacement for old Columns API.
/// - See Demo-&gt;Tables for demo code. See top of imgui_tables.cpp for general commentary.
/// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags.
/// The typical call flow is:
/// - 1. Call BeginTable(), early out if returning false.
/// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults.
/// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows.
/// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
/// - 5. Populate contents:
/// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column.
/// - If you are using tables as a sort of grid, where every column is holding the same type of contents,
/// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex().
/// TableNextColumn() will automatically wrap-around into the next row if needed.
/// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
/// - Summary of possible call flow:
/// - TableNextRow() -&gt; TableSetColumnIndex(0) -&gt; Text("Hello 0") -&gt; TableSetColumnIndex(1) -&gt; Text("Hello 1") // OK
/// - TableNextRow() -&gt; TableNextColumn() -&gt; Text("Hello 0") -&gt; TableNextColumn() -&gt; Text("Hello 1") // OK
/// - TableNextColumn() -&gt; Text("Hello 0") -&gt; TableNextColumn() -&gt; Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
/// - TableNextRow() -&gt; Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
/// - 5. Call EndTable()
/// </code>
/// <para>
/// [Public] Starts into the first cell of a new row
/// </para>
/// </remarks>
public static unsafe void TableNextRow(ImGuiTableRowFlags rowFlags = default, float minRowHeight = 0f) =>
PInvoke.TableNextRow(rowFlags, minRowHeight);
/// <summary>
/// <para>
/// append into the next column (or first column of next row if currently in last column). Return true when
/// column is visible.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L908">imgui.h:908</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L2143">imgui_tables.cpp:2143</see>
/// <br/><c>bool TableNextColumn()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables
/// - Full-featured replacement for old Columns API.
/// - See Demo-&gt;Tables for demo code. See top of imgui_tables.cpp for general commentary.
/// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags.
/// The typical call flow is:
/// - 1. Call BeginTable(), early out if returning false.
/// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults.
/// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows.
/// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
/// - 5. Populate contents:
/// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column.
/// - If you are using tables as a sort of grid, where every column is holding the same type of contents,
/// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex().
/// TableNextColumn() will automatically wrap-around into the next row if needed.
/// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
/// - Summary of possible call flow:
/// - TableNextRow() -&gt; TableSetColumnIndex(0) -&gt; Text("Hello 0") -&gt; TableSetColumnIndex(1) -&gt; Text("Hello 1") // OK
/// - TableNextRow() -&gt; TableNextColumn() -&gt; Text("Hello 0") -&gt; TableNextColumn() -&gt; Text("Hello 1") // OK
/// - TableNextColumn() -&gt; Text("Hello 0") -&gt; TableNextColumn() -&gt; Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
/// - TableNextRow() -&gt; Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
/// - 5. Call EndTable()
/// </code>
/// <para>
/// [Public] Append into the next column, wrap and create a new row when already on last column
/// </para>
/// </remarks>
public static unsafe bool TableNextColumn() => PInvoke.TableNextColumn();
/// <summary>
/// <para>
/// append into the specified column. Return true when column is visible.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L909">imgui.h:909</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L2118">imgui_tables.cpp:2118</see>
/// <br/><c>bool TableSetColumnIndex(int column_n)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables
/// - Full-featured replacement for old Columns API.
/// - See Demo-&gt;Tables for demo code. See top of imgui_tables.cpp for general commentary.
/// - See ImGuiTableFlags_ and ImGuiTableColumnFlags_ enums for a description of available flags.
/// The typical call flow is:
/// - 1. Call BeginTable(), early out if returning false.
/// - 2. Optionally call TableSetupColumn() to submit column name/flags/defaults.
/// - 3. Optionally call TableSetupScrollFreeze() to request scroll freezing of columns/rows.
/// - 4. Optionally call TableHeadersRow() to submit a header row. Names are pulled from TableSetupColumn() data.
/// - 5. Populate contents:
/// - In most situations you can use TableNextRow() + TableSetColumnIndex(N) to start appending into a column.
/// - If you are using tables as a sort of grid, where every column is holding the same type of contents,
/// you may prefer using TableNextColumn() instead of TableNextRow() + TableSetColumnIndex().
/// TableNextColumn() will automatically wrap-around into the next row if needed.
/// - IMPORTANT: Comparatively to the old Columns() API, we need to call TableNextColumn() for the first column!
/// - Summary of possible call flow:
/// - TableNextRow() -&gt; TableSetColumnIndex(0) -&gt; Text("Hello 0") -&gt; TableSetColumnIndex(1) -&gt; Text("Hello 1") // OK
/// - TableNextRow() -&gt; TableNextColumn() -&gt; Text("Hello 0") -&gt; TableNextColumn() -&gt; Text("Hello 1") // OK
/// - TableNextColumn() -&gt; Text("Hello 0") -&gt; TableNextColumn() -&gt; Text("Hello 1") // OK: TableNextColumn() automatically gets to next row!
/// - TableNextRow() -&gt; Text("Hello 0") // Not OK! Missing TableSetColumnIndex() or TableNextColumn()! Text will not appear!
/// - 5. Call EndTable()
/// </code>
/// <para>
/// [Public] Append into a specific column
/// </para>
/// </remarks>
public static unsafe bool TableSetColumnIndex(int columnN) => PInvoke.TableSetColumnIndex(columnN);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L919">imgui.h:919</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1599">imgui_tables.cpp:1599</see>
/// <br/>
/// <c>void TableSetupColumn(const char* label, ImGuiTableColumnFlags flags = 0, float init_width_or_weight = 0.0f, ImGuiID user_id = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Headers &amp; Columns declaration
/// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc.
/// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column.
/// Headers are required to perform: reordering, sorting, and opening the context menu.
/// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody.
/// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in
/// some advanced use cases (e.g. adding custom widgets in header row).
/// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled.
/// </code>
/// <code>
/// See "COLUMNS SIZING POLICIES" comments at the top of this file
/// If (init_width_or_weight &lt;= 0.0f) it is ignored
/// </code>
/// </remarks>
public static unsafe void TableSetupColumn(
ImString label,
ImGuiTableColumnFlags flags = default,
float initWidthOrWeight = 0f,
ImGuiID userId = default
)
{
fixed (byte* label_fixed = label)
{
PInvoke.TableSetupColumn(label_fixed, flags, initWidthOrWeight, userId);
}
}
/// <summary>
/// <para>
/// lock columns/rows so they stay visible when scrolled.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L920">imgui.h:920</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1660">imgui_tables.cpp:1660</see>
/// <br/><c>void TableSetupScrollFreeze(int cols, int rows)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Headers &amp; Columns declaration
/// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc.
/// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column.
/// Headers are required to perform: reordering, sorting, and opening the context menu.
/// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody.
/// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in
/// some advanced use cases (e.g. adding custom widgets in header row).
/// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled.
/// </code>
/// <para>
/// [Public]
/// </para>
/// </remarks>
public static unsafe void TableSetupScrollFreeze(int cols, int rows) =>
PInvoke.TableSetupScrollFreeze(cols, rows);
/// <summary>
/// <para>
/// submit one header cell manually (rarely used)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L921">imgui.h:921</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L3150">imgui_tables.cpp:3150</see>
/// <br/><c>void TableHeader(const char* label)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Headers &amp; Columns declaration
/// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc.
/// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column.
/// Headers are required to perform: reordering, sorting, and opening the context menu.
/// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody.
/// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in
/// some advanced use cases (e.g. adding custom widgets in header row).
/// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled.
/// </code>
/// <code>
/// Emit a column header (text + optional sort order)
/// We cpu-clip text here so that all columns headers can be merged into a same draw call.
/// Note that because of how we cpu-clip and display sorting indicators, you _cannot_ use SameLine() after a TableHeader()
/// </code>
/// </remarks>
public static unsafe void TableHeader(ImString label)
{
fixed (byte* label_fixed = label)
{
PInvoke.TableHeader(label_fixed);
}
}
/// <summary>
/// <para>
/// submit a row with headers cells based on data provided to TableSetupColumn() + submit context menu
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L922">imgui.h:922</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L3105">imgui_tables.cpp:3105</see>
/// <br/><c>void TableHeadersRow()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Headers &amp; Columns declaration
/// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc.
/// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column.
/// Headers are required to perform: reordering, sorting, and opening the context menu.
/// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody.
/// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in
/// some advanced use cases (e.g. adding custom widgets in header row).
/// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled.
/// </code>
/// <code>
/// [Public] This is a helper to output TableHeader() calls based on the column names declared in TableSetupColumn().
/// The intent is that advanced users willing to create customized headers would not need to use this helper
/// and can create their own! For example: TableHeader() may be preceded by Checkbox() or other custom widgets.
/// See 'Demo-&gt;Tables-&gt;Custom headers' for a demonstration of implementing a custom version of this.
/// This code is intentionally written to not make much use of internal functions, to give you better direction
/// if you need to write your own.
/// FIXME-TABLE: TableOpenContextMenu() and TableGetHeaderRowHeight() are not public.
/// </code>
/// </remarks>
public static unsafe void TableHeadersRow() => PInvoke.TableHeadersRow();
/// <summary>
/// <para>
/// submit a row with angled headers for every column with the ImGuiTableColumnFlags_AngledHeader flag. MUST
/// BE FIRST ROW.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L923">imgui.h:923</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L3297">imgui_tables.cpp:3297</see>
/// <br/><c>void TableAngledHeadersRow()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Headers &amp; Columns declaration
/// - Use TableSetupColumn() to specify label, resizing policy, default width/weight, id, various other flags etc.
/// - Use TableHeadersRow() to create a header row and automatically submit a TableHeader() for each column.
/// Headers are required to perform: reordering, sorting, and opening the context menu.
/// The context menu can also be made available in columns body using ImGuiTableFlags_ContextMenuInBody.
/// - You may manually submit headers using TableNextRow() + TableHeader() calls, but this is only useful in
/// some advanced use cases (e.g. adding custom widgets in header row).
/// - Use TableSetupScrollFreeze() to lock columns/rows so they stay visible when scrolled.
/// </code>
/// <code>
/// Unlike TableHeadersRow() it is not expected that you can reimplement or customize this with custom widgets.
/// FIXME: No hit-testing/button on the angled header.
/// </code>
/// </remarks>
public static unsafe void TableAngledHeadersRow() => PInvoke.TableAngledHeadersRow();
/// <summary>
/// <para>
/// get latest sort specs for the table (NULL if not sorting). Lifetime: don't hold on this pointer over
/// multiple frames or past any subsequent call to BeginTable().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L931">imgui.h:931</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L2880">imgui_tables.cpp:2880</see>
/// <br/><c>ImGuiTableSortSpecs* TableGetSortSpecs()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Sorting &amp; Miscellaneous functions
/// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
/// When 'sort_specs-&gt;SpecsDirty == true' you should sort your data. It will be true when sorting specs have
/// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
/// else you may wastefully sort your data every frame!
/// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
/// </code>
/// <code>
/// Return NULL if no sort specs (most often when ImGuiTableFlags_Sortable is not set)
/// When 'sort_specs-&gt;SpecsDirty == true' you should sort your data. It will be true when sorting specs have
/// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
/// else you may wastefully sort your data every frame!
/// Lifetime: don't hold on this pointer over multiple frames or past any subsequent call to BeginTable()!
/// </code>
/// </remarks>
public static unsafe ImGuiTableSortSpecsPtr TableGetSortSpecs() => PInvoke.TableGetSortSpecs();
/// <summary>
/// <para>
/// return number of columns (value passed to BeginTable)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L932">imgui.h:932</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1707">imgui_tables.cpp:1707</see>
/// <br/><c>int TableGetColumnCount()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Sorting &amp; Miscellaneous functions
/// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
/// When 'sort_specs-&gt;SpecsDirty == true' you should sort your data. It will be true when sorting specs have
/// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
/// else you may wastefully sort your data every frame!
/// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
/// </code>
/// </remarks>
public static unsafe int TableGetColumnCount() => PInvoke.TableGetColumnCount();
/// <summary>
/// <para>
/// return current column index.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L933">imgui.h:933</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L2108">imgui_tables.cpp:2108</see>
/// <br/><c>int TableGetColumnIndex()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Sorting &amp; Miscellaneous functions
/// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
/// When 'sort_specs-&gt;SpecsDirty == true' you should sort your data. It will be true when sorting specs have
/// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
/// else you may wastefully sort your data every frame!
/// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
/// </code>
/// </remarks>
public static unsafe int TableGetColumnIndex() => PInvoke.TableGetColumnIndex();
/// <summary>
/// <para>
/// return current row index (header rows are accounted for)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L934">imgui.h:934</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1880">imgui_tables.cpp:1880</see>
/// <br/><c>int TableGetRowIndex()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Sorting &amp; Miscellaneous functions
/// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
/// When 'sort_specs-&gt;SpecsDirty == true' you should sort your data. It will be true when sorting specs have
/// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
/// else you may wastefully sort your data every frame!
/// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
/// </code>
/// <para>
/// [Public] Note: for row coloring we use -&gt;RowBgColorCounter which is the same value without counting
/// header rows
/// </para>
/// </remarks>
public static unsafe int TableGetRowIndex() => PInvoke.TableGetRowIndex();
/// <summary>
/// <para>
/// return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L935">imgui.h:935</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1714">imgui_tables.cpp:1714</see>
/// <br/><c>const char* TableGetColumnName(int column_n = -1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Sorting &amp; Miscellaneous functions
/// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
/// When 'sort_specs-&gt;SpecsDirty == true' you should sort your data. It will be true when sorting specs have
/// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
/// else you may wastefully sort your data every frame!
/// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
/// </code>
/// </remarks>
public static unsafe ImString TableGetColumnName(int columnN = -1) =>
Utf8.GetNullTerminatedSpan(PInvoke.TableGetColumnName(columnN));
/// <summary>
/// <para>
/// return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use
/// current column.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L936">imgui.h:936</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1759">imgui_tables.cpp:1759</see>
/// <br/><c>ImGuiTableColumnFlags TableGetColumnFlags(int column_n = -1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Sorting &amp; Miscellaneous functions
/// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
/// When 'sort_specs-&gt;SpecsDirty == true' you should sort your data. It will be true when sorting specs have
/// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
/// else you may wastefully sort your data every frame!
/// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
/// </code>
/// <para>
/// We allow querying for an extra column in order to poll the IsHovered state of the right-most section
/// </para>
/// </remarks>
public static unsafe ImGuiTableColumnFlags TableGetColumnFlags(int columnN = -1) =>
PInvoke.TableGetColumnFlags(columnN);
/// <summary>
/// <para>
/// change user accessible enabled/disabled state of a column. Set to false to hide the column. User can use
/// the context menu to change this themselves (right-click in headers, or right-click in columns body with
/// ImGuiTableFlags_ContextMenuInBody)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L937">imgui.h:937</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1741">imgui_tables.cpp:1741</see>
/// <br/><c>void TableSetColumnEnabled(int column_n, bool v)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Sorting &amp; Miscellaneous functions
/// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
/// When 'sort_specs-&gt;SpecsDirty == true' you should sort your data. It will be true when sorting specs have
/// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
/// else you may wastefully sort your data every frame!
/// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
/// </code>
/// <code>
/// Change user accessible enabled/disabled state of a column (often perceived as "showing/hiding" from users point of view)
/// Note that end-user can use the context menu to change this themselves (right-click in headers, or right-click in columns body with ImGuiTableFlags_ContextMenuInBody)
/// - Require table to have the ImGuiTableFlags_Hideable flag because we are manipulating user accessible state.
/// - Request will be applied during next layout, which happens on the first call to TableNextRow() after BeginTable().
/// - For the getter you can test (TableGetColumnFlags() &amp; ImGuiTableColumnFlags_IsEnabled) != 0.
/// - Alternative: the ImGuiTableColumnFlags_Disabled is an overriding/master disable flag which will also hide the column from context menu.
/// </code>
/// </remarks>
public static unsafe void TableSetColumnEnabled(int columnN, bool v) =>
PInvoke.TableSetColumnEnabled(columnN, v);
/// <summary>
/// <para>
/// return hovered column. return -1 when table is not hovered. return columns_count if the unused space at
/// the right of visible columns is hovered. Can also use (TableGetColumnFlags() &amp;
/// ImGuiTableColumnFlags_IsHovered) instead.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L938">imgui.h:938</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1801">imgui_tables.cpp:1801</see>
/// <br/><c>int TableGetHoveredColumn()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Sorting &amp; Miscellaneous functions
/// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
/// When 'sort_specs-&gt;SpecsDirty == true' you should sort your data. It will be true when sorting specs have
/// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
/// else you may wastefully sort your data every frame!
/// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
/// </code>
/// <para>
/// Return -1 when table is not hovered. return columns_count if hovering the unused space at the right of
/// the right-most visible column.
/// </para>
/// </remarks>
public static unsafe int TableGetHoveredColumn() => PInvoke.TableGetHoveredColumn();
/// <summary>
/// <para>
/// change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L939">imgui.h:939</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L1823">imgui_tables.cpp:1823</see>
/// <br/><c>void TableSetBgColor(ImGuiTableBgTarget target, ImU32 color, int column_n = -1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tables: Sorting &amp; Miscellaneous functions
/// - Sorting: call TableGetSortSpecs() to retrieve latest sort specs for the table. NULL when not sorting.
/// When 'sort_specs-&gt;SpecsDirty == true' you should sort your data. It will be true when sorting specs have
/// changed since last call, or the first time. Make sure to set 'SpecsDirty = false' after sorting,
/// else you may wastefully sort your data every frame!
/// - Functions args 'int column_n' treat the default value of -1 as the same as passing the current column index.
/// </code>
/// </remarks>
public static unsafe void TableSetBgColor(ImGuiTableBgTarget target, ImColor8 color, int columnN = -1) =>
PInvoke.TableSetBgColor(target, color, columnN);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L943">imgui.h:943</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L4542">imgui_tables.cpp:4542</see>
/// <br/><c>void Columns(int count = 1, const char* id = NULL, bool borders = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Legacy Columns API (prefer using Tables!)
/// - You can also use SameLine(pos_x) to mimic simplified columns.
/// </code>
/// </remarks>
public static unsafe void Columns(int count = 1, ImString id = default, bool borders = true)
{
fixed (byte* id_fixed = id)
{
PInvoke.Columns(count, id_fixed, borders);
}
}
/// <summary>
/// <para>
/// next column, defaults to current row or next row if the current row is finished
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L944">imgui.h:944</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L4410">imgui_tables.cpp:4410</see>
/// <br/><c>void NextColumn()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Legacy Columns API (prefer using Tables!)
/// - You can also use SameLine(pos_x) to mimic simplified columns.
/// </code>
/// </remarks>
public static unsafe void NextColumn() => PInvoke.NextColumn();
/// <summary>
/// <para>
/// get current column index
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L945">imgui.h:945</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L4152">imgui_tables.cpp:4152</see>
/// <br/><c>int GetColumnIndex()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Legacy Columns API (prefer using Tables!)
/// - You can also use SameLine(pos_x) to mimic simplified columns.
/// </code>
/// </remarks>
public static unsafe int GetColumnIndex() => PInvoke.GetColumnIndex();
/// <summary>
/// <para>
/// get column width (in pixels). pass -1 to use current column
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L946">imgui.h:946</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L4222">imgui_tables.cpp:4222</see>
/// <br/><c>float GetColumnWidth(int column_index = -1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Legacy Columns API (prefer using Tables!)
/// - You can also use SameLine(pos_x) to mimic simplified columns.
/// </code>
/// </remarks>
public static unsafe float GetColumnWidth(int columnIndex = -1) => PInvoke.GetColumnWidth(columnIndex);
/// <summary>
/// <para>
/// set column width (in pixels). pass -1 to use current column
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L947">imgui.h:947</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L4257">imgui_tables.cpp:4257</see>
/// <br/><c>void SetColumnWidth(int column_index, float width)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Legacy Columns API (prefer using Tables!)
/// - You can also use SameLine(pos_x) to mimic simplified columns.
/// </code>
/// </remarks>
public static unsafe void SetColumnWidth(int columnIndex, float width) =>
PInvoke.SetColumnWidth(columnIndex, width);
/// <summary>
/// <para>
/// get position of column line (in pixels, from the left side of the contents region). pass -1 to use
/// current column, otherwise 0..GetColumnsCount() inclusive. column 0 is typically 0.0f
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L948">imgui.h:948</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L4193">imgui_tables.cpp:4193</see>
/// <br/><c>float GetColumnOffset(int column_index = -1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Legacy Columns API (prefer using Tables!)
/// - You can also use SameLine(pos_x) to mimic simplified columns.
/// </code>
/// </remarks>
public static unsafe float GetColumnOffset(int columnIndex = -1) => PInvoke.GetColumnOffset(columnIndex);
/// <summary>
/// <para>
/// set position of column line (in pixels, from the left side of the contents region). pass -1 to use
/// current column
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L949">imgui.h:949</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L4235">imgui_tables.cpp:4235</see>
/// <br/><c>void SetColumnOffset(int column_index, float offset_x)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Legacy Columns API (prefer using Tables!)
/// - You can also use SameLine(pos_x) to mimic simplified columns.
/// </code>
/// </remarks>
public static unsafe void SetColumnOffset(int columnIndex, float offsetX) =>
PInvoke.SetColumnOffset(columnIndex, offsetX);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L950">imgui.h:950</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_tables.cpp#L4158">imgui_tables.cpp:4158</see>
/// <br/><c>int GetColumnsCount()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Legacy Columns API (prefer using Tables!)
/// - You can also use SameLine(pos_x) to mimic simplified columns.
/// </code>
/// </remarks>
public static unsafe int GetColumnsCount() => PInvoke.GetColumnsCount();
/// <summary>
/// <para>
/// create and append into a TabBar
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L954">imgui.h:954</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L9440">imgui_widgets.cpp:9440</see>
/// <br/><c>bool BeginTabBar(const char* str_id, ImGuiTabBarFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tab Bars, Tabs
/// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
/// </code>
/// </remarks>
public static unsafe bool BeginTabBar(ImString strId, ImGuiTabBarFlags flags = default)
{
fixed (byte* strId_fixed = strId)
{
return PInvoke.BeginTabBar(strId_fixed, flags);
}
}
/// <summary>
/// <para>
/// only call EndTabBar() if BeginTabBar() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L955">imgui.h:955</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L9520">imgui_widgets.cpp:9520</see>
/// <br/><c>void EndTabBar()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tab Bars, Tabs
/// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
/// </code>
/// </remarks>
public static unsafe void EndTabBar() => PInvoke.EndTabBar();
/// <summary>
/// <para>
/// create a Tab. Returns true if the Tab is selected.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L956">imgui.h:956</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L10203">imgui_widgets.cpp:10203</see>
/// <br/><c>bool BeginTabItem(const char* label, bool* p_open = NULL, ImGuiTabItemFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tab Bars, Tabs
/// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
/// </code>
/// </remarks>
public static unsafe bool BeginTabItem(ImString label, ref bool pOpen, ImGuiTabItemFlags flags = default)
{
fixed (bool* pOpen_fixed = &pOpen)
{
fixed (byte* label_fixed = label)
{
return PInvoke.BeginTabItem(label_fixed, (Bool8*)pOpen_fixed, flags);
}
}
}
/// <summary>
/// <para>
/// create a Tab. Returns true if the Tab is selected.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L956">imgui.h:956</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L10203">imgui_widgets.cpp:10203</see>
/// <br/><c>bool BeginTabItem(const char* label, bool* p_open = NULL, ImGuiTabItemFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tab Bars, Tabs
/// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
/// </code>
/// </remarks>
public static unsafe bool BeginTabItem(ImString label, ImGuiTabItemFlags flags = default)
{
fixed (byte* label_fixed = label)
{
return PInvoke.BeginTabItem(label_fixed, null, flags);
}
}
/// <summary>
/// <para>
/// only call EndTabItem() if BeginTabItem() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L957">imgui.h:957</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L10227">imgui_widgets.cpp:10227</see>
/// <br/><c>void EndTabItem()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tab Bars, Tabs
/// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
/// </code>
/// </remarks>
public static unsafe void EndTabItem() => PInvoke.EndTabItem();
/// <summary>
/// <para>
/// create a Tab behaving like a button. return true when clicked. cannot be selected in the tab bar.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L958">imgui.h:958</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L10246">imgui_widgets.cpp:10246</see>
/// <br/><c>bool TabItemButton(const char* label, ImGuiTabItemFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tab Bars, Tabs
/// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
/// </code>
/// </remarks>
public static unsafe bool TabItemButton(ImString label, ImGuiTabItemFlags flags = default)
{
fixed (byte* label_fixed = label)
{
return PInvoke.TabItemButton(label_fixed, flags);
}
}
/// <summary>
/// <para>
/// notify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on
/// reorderable tab bars). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise call
/// with a window name.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L959">imgui.h:959</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L10589">imgui_widgets.cpp:10589</see>
/// <br/><c>void SetTabItemClosed(const char* tab_or_docked_window_label)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Tab Bars, Tabs
/// - Note: Tabs are automatically created by the docking system (when in 'docking' branch). Use this to create tab bars/tabs yourself.
/// </code>
/// <code>
/// [Public] This is call is 100% optional but it allows to remove some one-frame glitches when a tab has been unexpectedly removed.
/// To use it to need to call the function SetTabItemClosed() between BeginTabBar() and EndTabBar().
/// Tabs closed by the close button will automatically be flagged to avoid this issue.
/// </code>
/// </remarks>
public static unsafe void SetTabItemClosed(ImString tabOrDockedWindowLabel)
{
fixed (byte* tabOrDockedWindowLabel_fixed = tabOrDockedWindowLabel)
{
PInvoke.SetTabItemClosed(tabOrDockedWindowLabel_fixed);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L974">imgui.h:974</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L19996">imgui.cpp:19996</see>
/// <br/>
/// <c>ImGuiID DockSpace(ImGuiID dockspace_id, const ImVec2&amp; size = ImVec2(0, 0), ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Docking
/// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
/// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
/// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
/// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
/// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking.
/// About dockspaces:
/// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it.
/// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent.
/// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
/// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
/// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
/// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
/// </code>
/// <code>
/// Create an explicit dockspace node within an existing window. Also expose dock node flags and creates a CentralNode by default.
/// The Central Node is always displayed even when empty and shrink/extend according to the requested size of its neighbors.
/// DockSpace() needs to be submitted _before_ any window they can host. If you use a dockspace, submit it early in your app.
/// When ImGuiDockNodeFlags_KeepAliveOnly is set, nothing is submitted in the current window (function may be called from any location).
/// </code>
/// </remarks>
public static unsafe ImGuiID DockSpace(
ImGuiID dockspaceId,
in float2? size = default,
ImGuiDockNodeFlags flags = default,
ImGuiWindowClassPtr windowClass = default
)
{
var size_default = size ?? new float2(0f, 0f);
return PInvoke.DockSpace(dockspaceId, &size_default, flags, windowClass);
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L975">imgui.h:975</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L20106">imgui.cpp:20106</see>
/// <br/>
/// <c>ImGuiID DockSpaceOverViewport(ImGuiID dockspace_id = 0, const ImGuiViewport* viewport = NULL, ImGuiDockNodeFlags flags = 0, const ImGuiWindowClass* window_class = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Docking
/// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
/// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
/// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
/// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
/// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking.
/// About dockspaces:
/// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it.
/// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent.
/// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
/// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
/// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
/// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
/// </code>
/// <code>
/// Tips: Use with ImGuiDockNodeFlags_PassthruCentralNode!
/// The limitation with this call is that your window won't have a local menu bar, but you can also use BeginMainMenuBar().
/// Even though we could pass window flags, it would also require the user to be able to call BeginMenuBar() somehow meaning we can't Begin/End in a single function.
/// If you really want a menu bar inside the same window as the one hosting the dockspace, you will need to copy this code somewhere and tweak it.
/// </code>
/// </remarks>
public static unsafe ImGuiID DockSpaceOverViewport(
ImGuiID dockspaceId = default,
ImGuiViewportPtr viewport = default,
ImGuiDockNodeFlags flags = default,
ImGuiWindowClassPtr windowClass = default
) => PInvoke.DockSpaceOverViewport(dockspaceId, viewport, flags, windowClass);
/// <summary>
/// <para>
/// set next window dock id
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L976">imgui.h:976</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9044">imgui.cpp:9044</see>
/// <br/><c>void SetNextWindowDockID(ImGuiID dock_id, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Docking
/// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
/// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
/// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
/// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
/// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking.
/// About dockspaces:
/// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it.
/// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent.
/// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
/// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
/// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
/// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
/// </code>
/// </remarks>
public static unsafe void SetNextWindowDockID(ImGuiID dockId, ImGuiCond cond = default) =>
PInvoke.SetNextWindowDockID(dockId, cond);
/// <summary>
/// <para>
/// set next window class (control docking compatibility + provide hints to platform backend via custom
/// viewport flags and platform parent/child relationship)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L977">imgui.h:977</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9052">imgui.cpp:9052</see>
/// <br/><c>void SetNextWindowClass(const ImGuiWindowClass* window_class)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Docking
/// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
/// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
/// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
/// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
/// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking.
/// About dockspaces:
/// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it.
/// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent.
/// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
/// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
/// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
/// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
/// </code>
/// </remarks>
public static unsafe void SetNextWindowClass(ImGuiWindowClassPtr windowClass) =>
PInvoke.SetNextWindowClass(windowClass);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L978">imgui.h:978</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8810">imgui.cpp:8810</see>
/// <br/><c>ImGuiID GetWindowDockID()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Docking
/// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
/// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
/// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
/// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
/// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking.
/// About dockspaces:
/// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it.
/// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent.
/// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
/// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
/// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
/// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
/// </code>
/// </remarks>
public static unsafe ImGuiID GetWindowDockID() => PInvoke.GetWindowDockID();
/// <summary>
/// <para>
/// is current window docked into another window?
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L979">imgui.h:979</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8816">imgui.cpp:8816</see>
/// <br/><c>bool IsWindowDocked()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Docking
/// [BETA API] Enable with io.ConfigFlags |= ImGuiConfigFlags_DockingEnable.
/// Note: You can use most Docking facilities without calling any API. You DO NOT need to call DockSpace() to use Docking!
/// - Drag from window title bar or their tab to dock/undock. Hold SHIFT to disable docking.
/// - Drag from window menu button (upper-left button) to undock an entire node (all windows).
/// - When io.ConfigDockingWithShift == true, you instead need to hold SHIFT to enable docking.
/// About dockspaces:
/// - Use DockSpaceOverViewport() to create a window covering the screen or a specific viewport + a dockspace inside it.
/// This is often used with ImGuiDockNodeFlags_PassthruCentralNode to make it transparent.
/// - Use DockSpace() to create an explicit dock node _within_ an existing window. See Docking demo for details.
/// - Important: Dockspaces need to be submitted _before_ any window they can host. Submit it early in your frame!
/// - Important: Dockspaces need to be kept alive if hidden, otherwise windows docked into it will be undocked.
/// e.g. if you have multiple tabs with a dockspace inside each tab: submit the non-visible dockspaces with ImGuiDockNodeFlags_KeepAliveOnly.
/// </code>
/// </remarks>
public static unsafe bool IsWindowDocked() => PInvoke.IsWindowDocked();
/// <summary>
/// <para>
/// start logging to tty (stdout)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L983">imgui.h:983</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15624">imgui.cpp:15624</see>
/// <br/><c>void LogToTTY(int auto_open_depth = -1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Logging/Capture
/// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging.
/// </code>
/// </remarks>
public static unsafe void LogToTTY(int autoOpenDepth = -1) => PInvoke.LogToTTY(autoOpenDepth);
/// <summary>
/// <para>
/// start logging to file
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L984">imgui.h:984</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15637">imgui.cpp:15637</see>
/// <br/><c>void LogToFile(int auto_open_depth = -1, const char* filename = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Logging/Capture
/// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging.
/// </code>
/// <para>
/// Start logging/capturing text output to given file
/// </para>
/// </remarks>
public static unsafe void LogToFile(int autoOpenDepth = -1, ImString filename = default)
{
fixed (byte* filename_fixed = filename)
{
PInvoke.LogToFile(autoOpenDepth, filename_fixed);
}
}
/// <summary>
/// <para>
/// start logging to OS clipboard
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L985">imgui.h:985</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15662">imgui.cpp:15662</see>
/// <br/><c>void LogToClipboard(int auto_open_depth = -1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Logging/Capture
/// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging.
/// </code>
/// <para>
/// Start logging/capturing text output to clipboard
/// </para>
/// </remarks>
public static unsafe void LogToClipboard(int autoOpenDepth = -1) => PInvoke.LogToClipboard(autoOpenDepth);
/// <summary>
/// <para>
/// stop logging (close file, etc.)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L986">imgui.h:986</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15678">imgui.cpp:15678</see>
/// <br/><c>void LogFinish()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Logging/Capture
/// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging.
/// </code>
/// </remarks>
public static unsafe void LogFinish() => PInvoke.LogFinish();
/// <summary>
/// <para>
/// helper to display buttons for logging to tty/file/clipboard
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L987">imgui.h:987</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15714">imgui.cpp:15714</see>
/// <br/><c>void LogButtons()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Logging/Capture
/// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging.
/// </code>
/// <code>
/// Helper to display logging buttons
/// FIXME-OBSOLETE: We should probably obsolete this and let the user have their own helper (this is one of the oldest function alive!)
/// </code>
/// </remarks>
public static unsafe void LogButtons() => PInvoke.LogButtons();
/// <summary>
/// <para>
/// pass text data straight to log (without being displayed)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L988">imgui.h:988</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15515">imgui.cpp:15515</see>
/// <br/><c>void LogText(const char* fmt, ...) IM_FMTARGS(1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Logging/Capture
/// - All text output from the interface can be captured into tty/file/clipboard. By default, tree nodes are automatically opened during logging.
/// </code>
/// </remarks>
public static unsafe void LogText(ImString text)
{
fixed (byte* text_fixed = text)
{
PInvoke.LogText(text_fixed);
}
}
/// <summary>
/// <para>
/// call after submitting an item which may be dragged. when this return true, you can call
/// SetDragDropPayload() + EndDragDropSource()
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L996">imgui.h:996</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15174">imgui.cpp:15174</see>
/// <br/><c>bool BeginDragDropSource(ImGuiDragDropFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Drag and Drop
/// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource().
/// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget().
/// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)
/// - An item can be both drag source and drop target.
/// </code>
/// <code>
/// When this returns true you need to: a) call SetDragDropPayload() exactly once, b) you may render the payload visual/description, c) call EndDragDropSource()
/// If the item has an identifier:
/// - This assume/require the item to be activated (typically via ButtonBehavior).
/// - Therefore if you want to use this with a mouse button other than left mouse button, it is up to the item itself to activate with another button.
/// - We then pull and use the mouse button that was used to activate the item and use it to carry on the drag.
/// If the item has no identifier:
/// - Currently always assume left mouse button.
/// </code>
/// </remarks>
public static unsafe bool BeginDragDropSource(ImGuiDragDropFlags flags = default) =>
PInvoke.BeginDragDropSource(flags);
/// <summary>
/// <para>
/// type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear
/// imgui internal types. Data is copied and held by imgui. Return true when payload has been accepted.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L997">imgui.h:997</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15309">imgui.cpp:15309</see>
/// <br/><c>bool SetDragDropPayload(const char* type, const void* data, size_t sz, ImGuiCond cond = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Drag and Drop
/// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource().
/// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget().
/// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)
/// - An item can be both drag source and drop target.
/// </code>
/// <para>
/// Use 'cond' to choose to submit payload on drag start or every frame
/// </para>
/// </remarks>
public static unsafe bool SetDragDropPayload(ImString type, Ptr data, nuint sz, ImGuiCond cond = default)
{
fixed (byte* type_fixed = type)
{
return PInvoke.SetDragDropPayload(type_fixed, data, sz, cond);
}
}
/// <summary>
/// <para>
/// only call EndDragDropSource() if BeginDragDropSource() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L998">imgui.h:998</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15293">imgui.cpp:15293</see>
/// <br/><c>void EndDragDropSource()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Drag and Drop
/// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource().
/// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget().
/// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)
/// - An item can be both drag source and drop target.
/// </code>
/// </remarks>
public static unsafe void EndDragDropSource() => PInvoke.EndDragDropSource();
/// <summary>
/// <para>
/// call after submitting an item that may receive a payload. If this returns true, you can call
/// AcceptDragDropPayload() + EndDragDropTarget()
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L999">imgui.h:999</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15381">imgui.cpp:15381</see>
/// <br/><c>bool BeginDragDropTarget()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Drag and Drop
/// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource().
/// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget().
/// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)
/// - An item can be both drag source and drop target.
/// </code>
/// <code>
/// We don't use BeginDragDropTargetCustom() and duplicate its code because:
/// 1) we use LastItemData's ImGuiItemStatusFlags_HoveredRect which handles items that push a temporarily clip rectangle in their code. Calling BeginDragDropTargetCustom(LastItemRect) would not handle them.
/// 2) and it's faster. as this code may be very frequently called, we want to early out as fast as we can.
/// Also note how the HoveredWindow test is positioned differently in both functions (in both functions we optimize for the cheapest early out case)
/// </code>
/// </remarks>
public static unsafe bool BeginDragDropTarget() => PInvoke.BeginDragDropTarget();
/// <summary>
/// <para>
/// accept contents of a given type. If ImGuiDragDropFlags_AcceptBeforeDelivery is set you can peek into the
/// payload before the mouse button is released.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1000">imgui.h:1000</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15418">imgui.cpp:15418</see>
/// <br/><c>const ImGuiPayload* AcceptDragDropPayload(const char* type, ImGuiDragDropFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Drag and Drop
/// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource().
/// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget().
/// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)
/// - An item can be both drag source and drop target.
/// </code>
/// </remarks>
public static unsafe ImGuiPayloadPtr AcceptDragDropPayload(ImString type, ImGuiDragDropFlags flags = default)
{
fixed (byte* type_fixed = type)
{
return PInvoke.AcceptDragDropPayload(type_fixed, flags);
}
}
/// <summary>
/// <para>
/// only call EndDragDropTarget() if BeginDragDropTarget() returns true!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1001">imgui.h:1001</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15481">imgui.cpp:15481</see>
/// <br/><c>void EndDragDropTarget()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Drag and Drop
/// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource().
/// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget().
/// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)
/// - An item can be both drag source and drop target.
/// </code>
/// </remarks>
public static unsafe void EndDragDropTarget() => PInvoke.EndDragDropTarget();
/// <summary>
/// <para>
/// peek directly into the current payload from anywhere. returns NULL when drag and drop is finished or
/// inactive. use ImGuiPayload::IsDataType() to test for the payload type.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1002">imgui.h:1002</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15475">imgui.cpp:15475</see>
/// <br/><c>const ImGuiPayload* GetDragDropPayload()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Drag and Drop
/// - On source items, call BeginDragDropSource(), if it returns true also call SetDragDropPayload() + EndDragDropSource().
/// - On target candidates, call BeginDragDropTarget(), if it returns true also call AcceptDragDropPayload() + EndDragDropTarget().
/// - If you stop calling BeginDragDropSource() the payload is preserved however it won't have a preview tooltip (we currently display a fallback "..." tooltip, see #1725)
/// - An item can be both drag source and drop target.
/// </code>
/// </remarks>
public static unsafe ImGuiPayloadPtr GetDragDropPayload() => PInvoke.GetDragDropPayload();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1009">imgui.h:1009</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8619">imgui.cpp:8619</see>
/// <br/><c>void BeginDisabled(bool disabled = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Disabling [BETA API]
/// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
/// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled)
/// - Tooltips windows by exception are opted out of disabling.
/// - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls)
/// </code>
/// <code>
/// BeginDisabled()/EndDisabled()
/// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled)
/// - Visually this is currently altering alpha, but it is expected that in a future styling system this would work differently.
/// - Feedback welcome at https://github.com/ocornut/imgui/issues/211
/// - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions.
/// (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls)
/// - Note: mixing up BeginDisabled() and PushItemFlag(ImGuiItemFlags_Disabled) is currently NOT SUPPORTED.
/// </code>
/// </remarks>
public static unsafe void BeginDisabled(bool disabled = true) => PInvoke.BeginDisabled(disabled);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1010">imgui.h:1010</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L8634">imgui.cpp:8634</see>
/// <br/><c>void EndDisabled()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Disabling [BETA API]
/// - Disable all user interactions and dim items visuals (applying style.DisabledAlpha over current colors)
/// - Those can be nested but it cannot be used to enable an already disabled section (a single BeginDisabled(true) in the stack is enough to keep everything disabled)
/// - Tooltips windows by exception are opted out of disabling.
/// - BeginDisabled(false)/EndDisabled() essentially does nothing but is provided to facilitate use of boolean expressions (as a micro-optimization: if you have tens of thousands of BeginDisabled(false)/EndDisabled() pairs, you might want to reformulate your code to avoid making those calls)
/// </code>
/// </remarks>
public static unsafe void EndDisabled() => PInvoke.EndDisabled();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1014">imgui.h:1014</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5879">imgui.cpp:5879</see>
/// <br/>
/// <c>void PushClipRect(const ImVec2&amp; clip_rect_min, const ImVec2&amp; clip_rect_max, bool intersect_with_current_clip_rect)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Clipping
/// - Mouse hovering is affected by ImGui::PushClipRect() calls, unlike direct calls to ImDrawList::PushClipRect() which are render only.
/// </code>
/// <code>
/// Push a clipping rectangle for both ImGui logic (hit-testing etc.) and low-level ImDrawList rendering.
/// - When using this function it is sane to ensure that float are perfectly rounded to integer values,
/// so that e.g. (int)(max.x-min.x) in user's render produce correct result.
/// - If the code here changes, may need to update code of functions like NextColumn() and PushColumnClipRect():
/// some frequently called functions which to modify both channels and clipping simultaneously tend to use the
/// more specialized SetWindowClipRectBeforeSetChannel() to avoid extraneous updates of underlying ImDrawCmds.
/// - This is analogous to PushFont()/PopFont() in the sense that are a mixing a global stack and a window stack,
/// which in the case of ClipRect is not so problematic but tends to be more restrictive for fonts.
/// </code>
/// </remarks>
public static unsafe void PushClipRect(
in float2 clipRectMin,
in float2 clipRectMax,
bool intersectWithCurrentClipRect
)
{
fixed (float2* clipRectMax_fixed = &clipRectMax)
{
fixed (float2* clipRectMin_fixed = &clipRectMin)
{
PInvoke.PushClipRect(clipRectMin_fixed, clipRectMax_fixed, intersectWithCurrentClipRect);
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1015">imgui.h:1015</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5886">imgui.cpp:5886</see>
/// <br/><c>void PopClipRect()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Clipping
/// - Mouse hovering is affected by ImGui::PushClipRect() calls, unlike direct calls to ImDrawList::PushClipRect() which are render only.
/// </code>
/// </remarks>
public static unsafe void PopClipRect() => PInvoke.PopClipRect();
/// <summary>
/// <para>
/// make last item the default focused item of a newly appearing window.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1018">imgui.h:1018</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9231">imgui.cpp:9231</see>
/// <br/><c>void SetItemDefaultFocus()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Focus, Activation
/// </para>
/// </remarks>
public static unsafe void SetItemDefaultFocus() => PInvoke.SetItemDefaultFocus();
/// <summary>
/// <para>
/// focus keyboard on the next widget. Use positive 'offset' to access sub components of a multiple
/// component widget. Use -1 to access previous widget.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1019">imgui.h:1019</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9198">imgui.cpp:9198</see>
/// <br/><c>void SetKeyboardFocusHere(int offset = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Focus, Activation
/// </para>
/// <code>
/// Note: this will likely be called ActivateItem() once we rework our Focus/Activation system!
/// But ActivateItem() should function without altering scroll/focus?
/// </code>
/// </remarks>
public static unsafe void SetKeyboardFocusHere(int offset = 0) => PInvoke.SetKeyboardFocusHere(offset);
/// <summary>
/// <para>
/// alter visibility of keyboard/gamepad cursor. by default: show when using an arrow key, hide when
/// clicking with mouse.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1022">imgui.h:1022</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L13464">imgui.cpp:13464</see>
/// <br/><c>void SetNavCursorVisible(bool visible)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Keyboard/Gamepad Navigation
/// </para>
/// </remarks>
public static unsafe void SetNavCursorVisible(bool visible) => PInvoke.SetNavCursorVisible(visible);
/// <summary>
/// <para>
/// allow next item to be overlapped by a subsequent item. Useful with invisible buttons, selectable,
/// treenode covering an area where subsequent items may need to be added. Note that both Selectable() and
/// TreeNode() have dedicated flags doing this.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1025">imgui.h:1025</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6414">imgui.cpp:6414</see>
/// <br/><c>void SetNextItemAllowOverlap()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Overlapping mode
/// </para>
/// <code>
/// Allow next item to be overlapped by subsequent items.
/// This works by requiring HoveredId to match for two subsequent frames,
/// so if a following items overwrite it our interactions will naturally be disabled.
/// </code>
/// </remarks>
public static unsafe void SetNextItemAllowOverlap() => PInvoke.SetNextItemAllowOverlap();
/// <summary>
/// <para>
/// is the last item hovered? (and usable, aka not blocked by a popup, etc.). See ImGuiHoveredFlags for more
/// options.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1030">imgui.h:1030</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L4770">imgui.cpp:4770</see>
/// <br/><c>bool IsItemHovered(ImGuiHoveredFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// <code>
/// This is roughly matching the behavior of internal-facing ItemHoverable()
/// - this should work even for non-interactive items that have no ID, so we cannot use LastItemId
/// </code>
/// </remarks>
public static unsafe bool IsItemHovered(ImGuiHoveredFlags flags = default) => PInvoke.IsItemHovered(flags);
/// <summary>
/// <para>
/// is the last item active? (e.g. button being held, text field being edited. This will continuously return
/// true while holding mouse button on an item. Items that don't interact will always return false)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1031">imgui.h:1031</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6306">imgui.cpp:6306</see>
/// <br/><c>bool IsItemActive()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe bool IsItemActive() => PInvoke.IsItemActive();
/// <summary>
/// <para>
/// is the last item focused for keyboard/gamepad navigation?
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1032">imgui.h:1032</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6338">imgui.cpp:6338</see>
/// <br/><c>bool IsItemFocused()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// <para>
/// == (GetItemID() == GetFocusID() &amp;&amp; GetFocusID() != 0)
/// </para>
/// </remarks>
public static unsafe bool IsItemFocused() => PInvoke.IsItemFocused();
/// <summary>
/// <para>
/// is the last item hovered and mouse clicked on? (**) == IsMouseClicked(mouse_button) &amp;&amp;
/// IsItemHovered()Important. (**) this is NOT equivalent to the behavior of e.g. Button(). Read comments in
/// function definition.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1033">imgui.h:1033</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6355">imgui.cpp:6355</see>
/// <br/><c>bool IsItemClicked(ImGuiMouseButton mouse_button = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// <code>
/// Important: this can be useful but it is NOT equivalent to the behavior of e.g.Button()!
/// Most widgets have specific reactions based on mouse-up/down state, mouse position etc.
/// </code>
/// </remarks>
public static unsafe bool IsItemClicked(ImGuiMouseButton mouseButton = default) =>
PInvoke.IsItemClicked(mouseButton);
/// <summary>
/// <para>
/// is the last item visible? (items may be out of sight because of clipping/scrolling)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1034">imgui.h:1034</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6399">imgui.cpp:6399</see>
/// <br/><c>bool IsItemVisible()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe bool IsItemVisible() => PInvoke.IsItemVisible();
/// <summary>
/// <para>
/// did the last item modify its underlying value this frame? or was pressed? This is generally the same as
/// the "bool" return value of many widgets.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1035">imgui.h:1035</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6405">imgui.cpp:6405</see>
/// <br/><c>bool IsItemEdited()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe bool IsItemEdited() => PInvoke.IsItemEdited();
/// <summary>
/// <para>
/// was the last item just made active (item was previously inactive).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1036">imgui.h:1036</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6314">imgui.cpp:6314</see>
/// <br/><c>bool IsItemActivated()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe bool IsItemActivated() => PInvoke.IsItemActivated();
/// <summary>
/// <para>
/// was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with
/// widgets that require continuous editing.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1037">imgui.h:1037</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6323">imgui.cpp:6323</see>
/// <br/><c>bool IsItemDeactivated()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe bool IsItemDeactivated() => PInvoke.IsItemDeactivated();
/// <summary>
/// <para>
/// was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag
/// moved). Useful for Undo/Redo patterns with widgets that require continuous editing. Note that you may
/// get false positives (some widgets such as Combo()/ListBox()/Selectable() will return true even when
/// clicking an already selected item).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1038">imgui.h:1038</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6331">imgui.cpp:6331</see>
/// <br/><c>bool IsItemDeactivatedAfterEdit()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe bool IsItemDeactivatedAfterEdit() => PInvoke.IsItemDeactivatedAfterEdit();
/// <summary>
/// <para>
/// was the last item open state toggled? set by TreeNode().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1039">imgui.h:1039</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6360">imgui.cpp:6360</see>
/// <br/><c>bool IsItemToggledOpen()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe bool IsItemToggledOpen() => PInvoke.IsItemToggledOpen();
/// <summary>
/// <para>
/// is any item hovered?
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1040">imgui.h:1040</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6381">imgui.cpp:6381</see>
/// <br/><c>bool IsAnyItemHovered()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// <code>
/// IMPORTANT: If you are trying to check whether your mouse should be dispatched to Dear ImGui or to your underlying app,
/// you should not use this function! Use the 'io.WantCaptureMouse' boolean for that!
/// Refer to FAQ entry "How can I tell whether to dispatch mouse/keyboard to Dear ImGui or my application?" for details.
/// </code>
/// </remarks>
public static unsafe bool IsAnyItemHovered() => PInvoke.IsAnyItemHovered();
/// <summary>
/// <para>
/// is any item active?
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1041">imgui.h:1041</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6387">imgui.cpp:6387</see>
/// <br/><c>bool IsAnyItemActive()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe bool IsAnyItemActive() => PInvoke.IsAnyItemActive();
/// <summary>
/// <para>
/// is any item focused?
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1042">imgui.h:1042</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6393">imgui.cpp:6393</see>
/// <br/><c>bool IsAnyItemFocused()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe bool IsAnyItemFocused() => PInvoke.IsAnyItemFocused();
/// <summary>
/// <para>
/// get ID of last item (~~ often same ImGui::GetID(label) beforehand)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1043">imgui.h:1043</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6445">imgui.cpp:6445</see>
/// <br/><c>ImGuiID GetItemID()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe ImGuiID GetItemID() => PInvoke.GetItemID();
/// <summary>
/// <para>
/// get upper-left bounding rectangle of the last item (screen space)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1044">imgui.h:1044</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6451">imgui.cpp:6451</see>
/// <br/><c>ImVec2 GetItemRectMin()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe float2 GetItemRectMin() => PInvoke.GetItemRectMin();
/// <summary>
/// <para>
/// get lower-right bounding rectangle of the last item (screen space)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1045">imgui.h:1045</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6457">imgui.cpp:6457</see>
/// <br/><c>ImVec2 GetItemRectMax()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe float2 GetItemRectMax() => PInvoke.GetItemRectMax();
/// <summary>
/// <para>
/// get size of last item
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1046">imgui.h:1046</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6463">imgui.cpp:6463</see>
/// <br/><c>ImVec2 GetItemRectSize()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Item/Widgets Utilities and Query Functions
/// - Most of the functions are referring to the previous Item that has been submitted.
/// - See Demo Window under "Widgets-&gt;Querying Status" for an interactive visualization of most of those functions.
/// </code>
/// </remarks>
public static unsafe float2 GetItemRectSize() => PInvoke.GetItemRectSize();
/// <summary>
/// <para>
/// return primary/default viewport. This can never be NULL.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1052">imgui.h:1052</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L16170">imgui.cpp:16170</see>
/// <br/><c>ImGuiViewport* GetMainViewport()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Viewports
/// - Currently represents the Platform Window created by the application which is hosting our Dear ImGui windows.
/// - In 'docking' branch with multi-viewport enabled, we extend this concept to have multiple active viewports.
/// - In the future we will extend this concept further to also represent Platform Monitor and support a "no main platform window" operation mode.
/// </code>
/// </remarks>
public static unsafe ImGuiViewportPtr GetMainViewport() => PInvoke.GetMainViewport();
/// <summary>
/// <para>
/// get background draw list for the given viewport or viewport associated to the current window. this draw
/// list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1055">imgui.h:1055</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5151">imgui.cpp:5151</see>
/// <br/><c>ImDrawList* GetBackgroundDrawList(ImGuiViewport* viewport = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Background/Foreground Draw Lists
/// </para>
/// </remarks>
public static unsafe ImDrawListPtr GetBackgroundDrawList(ImGuiViewportPtr viewport = default) =>
PInvoke.GetBackgroundDrawList(viewport);
/// <summary>
/// <para>
/// get foreground draw list for the given viewport or viewport associated to the current window. this draw
/// list will be the top-most rendered one. Useful to quickly draw shapes/text over dear imgui contents.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1056">imgui.h:1056</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5158">imgui.cpp:5158</see>
/// <br/><c>ImDrawList* GetForegroundDrawList(ImGuiViewport* viewport = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Background/Foreground Draw Lists
/// </para>
/// </remarks>
public static unsafe ImDrawListPtr GetForegroundDrawList(ImGuiViewportPtr viewport = default) =>
PInvoke.GetForegroundDrawList(viewport);
/// <summary>
/// <para>
/// test if rectangle (of given size, starting from cursor position) is visible / not clipped.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1059">imgui.h:1059</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9261">imgui.cpp:9261</see>
/// <br/><c>bool IsRectVisible(const ImVec2&amp; size)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Miscellaneous Utilities
/// </para>
/// </remarks>
public static unsafe bool IsRectVisible(in float2 size)
{
fixed (float2* size_fixed = &size)
{
return PInvoke.IsRectVisible_0(size_fixed);
}
}
/// <summary>
/// <para>
/// test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1060">imgui.h:1060</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9267">imgui.cpp:9267</see>
/// <br/><c>bool IsRectVisible(const ImVec2&amp; rect_min, const ImVec2&amp; rect_max)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Miscellaneous Utilities
/// </para>
/// </remarks>
public static unsafe bool IsRectVisible(in float2 rectMin, in float2 rectMax)
{
fixed (float2* rectMax_fixed = &rectMax)
{
fixed (float2* rectMin_fixed = &rectMin)
{
return PInvoke.IsRectVisible_1(rectMin_fixed, rectMax_fixed);
}
}
}
/// <summary>
/// <para>
/// get global imgui time. incremented by io.DeltaTime every frame.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1061">imgui.h:1061</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5117">imgui.cpp:5117</see>
/// <br/><c>double GetTime()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Miscellaneous Utilities
/// </para>
/// </remarks>
public static unsafe double GetTime() => PInvoke.GetTime();
/// <summary>
/// <para>
/// get global imgui frame count. incremented by 1 every frame.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1062">imgui.h:1062</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5122">imgui.cpp:5122</see>
/// <br/><c>int GetFrameCount()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Miscellaneous Utilities
/// </para>
/// </remarks>
public static unsafe int GetFrameCount() => PInvoke.GetFrameCount();
/// <summary>
/// <para>
/// you may use this when creating your own ImDrawList instances.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1063">imgui.h:1063</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5165">imgui.cpp:5165</see>
/// <br/><c>ImDrawListSharedData* GetDrawListSharedData()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Miscellaneous Utilities
/// </para>
/// </remarks>
public static unsafe ImDrawListSharedDataPtr GetDrawListSharedData() => PInvoke.GetDrawListSharedData();
/// <summary>
/// <para>
/// get a string corresponding to the enum value (for display, saving, etc.).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1064">imgui.h:1064</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L3679">imgui.cpp:3679</see>
/// <br/><c>const char* GetStyleColorName(ImGuiCol idx)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Miscellaneous Utilities
/// </para>
/// </remarks>
public static unsafe ImString GetStyleColorName(ImGuiCol idx) =>
Utf8.GetNullTerminatedSpan(PInvoke.GetStyleColorName(idx));
/// <summary>
/// <para>
/// replace current window storage with our own (if you want to manipulate it yourself, typically clear
/// subsection of it)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1065">imgui.h:1065</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9249">imgui.cpp:9249</see>
/// <br/><c>void SetStateStorage(ImGuiStorage* storage)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Miscellaneous Utilities
/// </para>
/// </remarks>
public static unsafe void SetStateStorage(ImGuiStoragePtr storage) => PInvoke.SetStateStorage(storage);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1066">imgui.h:1066</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9255">imgui.cpp:9255</see>
/// <br/><c>ImGuiStorage* GetStateStorage()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Miscellaneous Utilities
/// </para>
/// </remarks>
public static unsafe ImGuiStoragePtr GetStateStorage() => PInvoke.GetStateStorage();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1069">imgui.h:1069</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L6205">imgui.cpp:6205</see>
/// <br/>
/// <c>ImVec2 CalcTextSize(const char* text, const char* text_end = NULL, bool hide_text_after_double_hash = false, float wrap_width = -1.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Text Utilities
/// </para>
/// <code>
/// Calculate text size. Text can be multi-line. Optionally ignore text after a ## marker.
/// CalcTextSize("") should return ImVec2(0.0f, g.FontSize)
/// </code>
/// </remarks>
public static unsafe float2 CalcTextSize(
ImString text,
bool hideTextAfterDoubleHash = false,
float wrapWidth = -1f
)
{
fixed (byte* text_fixed = text)
{
return PInvoke.CalcTextSize(text_fixed, text_fixed + text.Length, hideTextAfterDoubleHash, wrapWidth);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1072">imgui.h:1072</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2750">imgui.cpp:2750</see>
/// <br/><c>ImVec4 ColorConvertU32ToFloat4(ImU32 in)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Color Utilities
/// </para>
/// </remarks>
public static unsafe float4 ColorConvertU32ToFloat4(uint @in) => PInvoke.ColorConvertU32ToFloat4(@in);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1073">imgui.h:1073</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2760">imgui.cpp:2760</see>
/// <br/><c>ImU32 ColorConvertFloat4ToU32(const ImVec4&amp; in)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Color Utilities
/// </para>
/// </remarks>
public static unsafe uint ColorConvertFloat4ToU32(in float4 @in)
{
fixed (float4* @in_fixed = &@in)
{
return PInvoke.ColorConvertFloat4ToU32(@in_fixed);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1074">imgui.h:1074</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2772">imgui.cpp:2772</see>
/// <br/>
/// <c>void ColorConvertRGBtoHSV(float r, float g, float b, float&amp; out_h, float&amp; out_s, float&amp; out_v)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Color Utilities
/// </para>
/// <code>
/// Convert rgb floats ([0-1],[0-1],[0-1]) to hsv floats ([0-1],[0-1],[0-1]), from Foley &amp; van Dam p592
/// Optimized http://lolengine.net/blog/2013/01/13/fast-rgb-to-hsv
/// </code>
/// </remarks>
public static unsafe void ColorConvertRGBtoHSV(
float r,
float g,
float b,
out float outH,
out float outS,
out float outV
)
{
fixed (float* outV_fixed = &outV)
{
fixed (float* outS_fixed = &outS)
{
fixed (float* outH_fixed = &outH)
{
PInvoke.ColorConvertRGBtoHSV(r, g, b, outH_fixed, outS_fixed, outV_fixed);
}
}
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1075">imgui.h:1075</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2794">imgui.cpp:2794</see>
/// <br/>
/// <c>void ColorConvertHSVtoRGB(float h, float s, float v, float&amp; out_r, float&amp; out_g, float&amp; out_b)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Color Utilities
/// </para>
/// <code>
/// Convert hsv floats ([0-1],[0-1],[0-1]) to rgb floats ([0-1],[0-1],[0-1]), from Foley &amp; van Dam p593
/// also http://en.wikipedia.org/wiki/HSL_and_HSV
/// </code>
/// </remarks>
public static unsafe void ColorConvertHSVtoRGB(
float h,
float s,
float v,
out float outR,
out float outG,
out float outB
)
{
fixed (float* outB_fixed = &outB)
{
fixed (float* outG_fixed = &outG)
{
fixed (float* outR_fixed = &outR)
{
PInvoke.ColorConvertHSVtoRGB(h, s, v, outR_fixed, outG_fixed, outB_fixed);
}
}
}
}
/// <summary>
/// <para>
/// is key being held.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1081">imgui.h:1081</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10171">imgui.cpp:10171</see>
/// <br/><c>bool IsKeyDown(ImGuiKey key)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Keyboard/Mouse/Gamepad
/// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
/// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
/// - (legacy: any use of ImGuiKey will assert when key &lt; 512 to detect passing legacy native/user indices)
/// </code>
/// <code>
/// Note that Dear ImGui doesn't know the meaning/semantic of ImGuiKey from 0..511: they are legacy native keycodes.
/// Consider transitioning from 'IsKeyDown(MY_ENGINE_KEY_A)' (&lt;1.87) to IsKeyDown(ImGuiKey_A) (&gt;= 1.87)
/// </code>
/// </remarks>
public static unsafe bool IsKeyDown(ImGuiKey key) => PInvoke.IsKeyDown(key);
/// <summary>
/// <para>
/// was key pressed (went from !Down to Down)? if repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1082">imgui.h:1082</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10186">imgui.cpp:10186</see>
/// <br/><c>bool IsKeyPressed(ImGuiKey key, bool repeat = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Keyboard/Mouse/Gamepad
/// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
/// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
/// - (legacy: any use of ImGuiKey will assert when key &lt; 512 to detect passing legacy native/user indices)
/// </code>
/// </remarks>
public static unsafe bool IsKeyPressed(ImGuiKey key, bool repeat = true) => PInvoke.IsKeyPressed(key, repeat);
/// <summary>
/// <para>
/// was key released (went from Down to !Down)?
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1083">imgui.h:1083</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10231">imgui.cpp:10231</see>
/// <br/><c>bool IsKeyReleased(ImGuiKey key)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Keyboard/Mouse/Gamepad
/// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
/// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
/// - (legacy: any use of ImGuiKey will assert when key &lt; 512 to detect passing legacy native/user indices)
/// </code>
/// </remarks>
public static unsafe bool IsKeyReleased(ImGuiKey key) => PInvoke.IsKeyReleased(key);
/// <summary>
/// <para>
/// was key chord (mods + key) pressed, e.g. you can pass 'ImGuiMod_Ctrl | ImGuiKey_S' as a key-chord. This
/// doesn't do any routing or focus check, please consider using Shortcut() function instead.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1084">imgui.h:1084</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11067">imgui.cpp:11067</see>
/// <br/><c>bool IsKeyChordPressed(ImGuiKeyChord key_chord)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Keyboard/Mouse/Gamepad
/// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
/// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
/// - (legacy: any use of ImGuiKey will assert when key &lt; 512 to detect passing legacy native/user indices)
/// </code>
/// <para>
/// This is the only public API until we expose owner_id versions of the API as replacements.
/// </para>
/// </remarks>
public static unsafe bool IsKeyChordPressed(ImGuiKeyChord keyChord) => PInvoke.IsKeyChordPressed(keyChord);
/// <summary>
/// <para>
/// uses provided repeat rate/delay. return a count, most often 0 or 1 but might be &gt;1 if RepeatRate is
/// small enough that DeltaTime &gt; RepeatRate
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1085">imgui.h:1085</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9895">imgui.cpp:9895</see>
/// <br/><c>int GetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Keyboard/Mouse/Gamepad
/// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
/// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
/// - (legacy: any use of ImGuiKey will assert when key &lt; 512 to detect passing legacy native/user indices)
/// </code>
/// <code>
/// Return value representing the number of presses in the last time period, for the given repeat rate
/// (most often returns 0 or 1. The result is generally only &gt;1 when RepeatRate is smaller than DeltaTime, aka large DeltaTime or fast RepeatRate)
/// </code>
/// </remarks>
public static unsafe int GetKeyPressedAmount(ImGuiKey key, float repeatDelay, float rate) =>
PInvoke.GetKeyPressedAmount(key, repeatDelay, rate);
/// <summary>
/// <para>
/// [DEBUG] returns English name of the key. Those names are provided for debugging purpose and are not
/// meant to be saved persistently nor compared.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1086">imgui.h:1086</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L9829">imgui.cpp:9829</see>
/// <br/><c>const char* GetKeyName(ImGuiKey key)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Keyboard/Mouse/Gamepad
/// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
/// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
/// - (legacy: any use of ImGuiKey will assert when key &lt; 512 to detect passing legacy native/user indices)
/// </code>
/// </remarks>
public static unsafe ImString GetKeyName(ImGuiKey key) => Utf8.GetNullTerminatedSpan(PInvoke.GetKeyName(key));
/// <summary>
/// <para>
/// Override io.WantCaptureKeyboard flag next frame (said flag is left for your application to handle,
/// typically when true it instructs your app to ignore inputs). e.g. force capture keyboard when your
/// widget is being hovered. This is equivalent to setting "io.WantCaptureKeyboard = want_capture_keyboard";
/// after the next NewFrame() call.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1087">imgui.h:1087</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10775">imgui.cpp:10775</see>
/// <br/><c>void SetNextFrameWantCaptureKeyboard(bool want_capture_keyboard)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Keyboard/Mouse/Gamepad
/// - the ImGuiKey enum contains all possible keyboard, mouse and gamepad inputs (e.g. ImGuiKey_A, ImGuiKey_MouseLeft, ImGuiKey_GamepadDpadUp...).
/// - (legacy: before v1.87, we used ImGuiKey to carry native/user indices as defined by each backends. This was obsoleted in 1.87 (2022-02) and completely removed in 1.91.5 (2024-11). See https://github.com/ocornut/imgui/issues/4921)
/// - (legacy: any use of ImGuiKey will assert when key &lt; 512 to detect passing legacy native/user indices)
/// </code>
/// </remarks>
public static unsafe void SetNextFrameWantCaptureKeyboard(bool wantCaptureKeyboard) =>
PInvoke.SetNextFrameWantCaptureKeyboard(wantCaptureKeyboard);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1104">imgui.h:1104</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11123">imgui.cpp:11123</see>
/// <br/><c>bool Shortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Shortcut Testing &amp; Routing [BETA]
/// - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super.
/// ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments)
/// ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments)
/// only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values.
/// - The general idea is that several callers may register interest in a shortcut, and only one owner gets it.
/// Parent -&gt; call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut.
/// Child1 -&gt; call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts)
/// Child2 -&gt; no call // When Child2 is focused, Parent gets the shortcut.
/// The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical.
/// This is an important property as it facilitate working with foreign code or larger codebase.
/// - To understand the difference:
/// - IsKeyChordPressed() compares mods and call IsKeyPressed() -&gt; function has no side-effect.
/// - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed() -&gt; function has (desirable) side-effects as it can prevents another call from getting the route.
/// - Visualize registered routes in 'Metrics/Debugger-&gt;Inputs'.
/// </code>
/// </remarks>
public static unsafe bool Shortcut(ImGuiKeyChord keyChord, ImGuiInputFlags flags = default) =>
PInvoke.Shortcut(keyChord, flags);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1105">imgui.h:1105</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11090">imgui.cpp:11090</see>
/// <br/><c>void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Shortcut Testing &amp; Routing [BETA]
/// - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super.
/// ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments)
/// ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments)
/// only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values.
/// - The general idea is that several callers may register interest in a shortcut, and only one owner gets it.
/// Parent -&gt; call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut.
/// Child1 -&gt; call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts)
/// Child2 -&gt; no call // When Child2 is focused, Parent gets the shortcut.
/// The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical.
/// This is an important property as it facilitate working with foreign code or larger codebase.
/// - To understand the difference:
/// - IsKeyChordPressed() compares mods and call IsKeyPressed() -&gt; function has no side-effect.
/// - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed() -&gt; function has (desirable) side-effects as it can prevents another call from getting the route.
/// - Visualize registered routes in 'Metrics/Debugger-&gt;Inputs'.
/// </code>
/// </remarks>
public static unsafe void SetNextItemShortcut(ImGuiKeyChord keyChord, ImGuiInputFlags flags = default) =>
PInvoke.SetNextItemShortcut(keyChord, flags);
/// <summary>
/// <para>
/// Set key owner to last item ID if it is hovered or active. Equivalent to 'if (IsItemHovered() ||
/// IsItemActive()) { SetKeyOwner(key, GetItemID());'.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1113">imgui.h:1113</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11061">imgui.cpp:11061</see>
/// <br/><c>void SetItemKeyOwner(ImGuiKey key)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Key/Input Ownership [BETA]
/// - One common use case would be to allow your items to disable standard inputs behaviors such
/// as Tab or Alt key handling, Mouse Wheel scrolling, etc.
/// e.g. Button(...); SetItemKeyOwner(ImGuiKey_MouseWheelY); to make hovering/activating a button disable wheel for scrolling.
/// - Reminder ImGuiKey enum include access to mouse buttons and gamepad, so key ownership can apply to them.
/// - Many related features are still in imgui_internal.h. For instance, most IsKeyXXX()/IsMouseXXX() functions have an owner-id-aware version.
/// </code>
/// </remarks>
public static unsafe void SetItemKeyOwner(ImGuiKey key) => PInvoke.SetItemKeyOwner(key);
/// <summary>
/// <para>
/// is mouse button held?
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1119">imgui.h:1119</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10246">imgui.cpp:10246</see>
/// <br/><c>bool IsMouseDown(ImGuiMouseButton button)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// </remarks>
public static unsafe bool IsMouseDown(ImGuiMouseButton button) => PInvoke.IsMouseDown(button);
/// <summary>
/// <para>
/// did mouse button clicked? (went from !Down to Down). Same as GetMouseClickedCount() == 1.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1120">imgui.h:1120</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10260">imgui.cpp:10260</see>
/// <br/><c>bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// </remarks>
public static unsafe bool IsMouseClicked(ImGuiMouseButton button, bool repeat = false) =>
PInvoke.IsMouseClicked(button, repeat);
/// <summary>
/// <para>
/// did mouse button released? (went from Down to !Down)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1121">imgui.h:1121</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10287">imgui.cpp:10287</see>
/// <br/><c>bool IsMouseReleased(ImGuiMouseButton button)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// </remarks>
public static unsafe bool IsMouseReleased(ImGuiMouseButton button) => PInvoke.IsMouseReleased(button);
/// <summary>
/// <para>
/// did mouse button double-clicked? Same as GetMouseClickedCount() == 2. (note that a double-click will
/// also report IsMouseClicked() == true)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1122">imgui.h:1122</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10312">imgui.cpp:10312</see>
/// <br/><c>bool IsMouseDoubleClicked(ImGuiMouseButton button)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// </remarks>
public static unsafe bool IsMouseDoubleClicked(ImGuiMouseButton button) => PInvoke.IsMouseDoubleClicked(button);
/// <summary>
/// <para>
/// delayed mouse release (use very sparingly!). Generally used with 'delay &gt;= io.MouseDoubleClickTime' +
/// combined with a 'io.MouseClickedLastCount==1' test. This is a very rarely used UI idiom, but some apps
/// use this: e.g. MS Explorer single click on an icon to rename.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1123">imgui.h:1123</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10304">imgui.cpp:10304</see>
/// <br/><c>bool IsMouseReleasedWithDelay(ImGuiMouseButton button, float delay)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// <code>
/// Use if you absolutely need to distinguish single-click from double-click by introducing a delay.
/// Generally use with 'delay &gt;= io.MouseDoubleClickTime' + combined with a 'io.MouseClickedLastCount == 1' test.
/// This is a very rarely used UI idiom, but some apps use this: e.g. MS Explorer single click on an icon to rename.
/// </code>
/// </remarks>
public static unsafe bool IsMouseReleasedWithDelay(ImGuiMouseButton button, float delay) =>
PInvoke.IsMouseReleasedWithDelay(button, delay);
/// <summary>
/// <para>
/// return the number of successive mouse-clicks at the time where a click happen (otherwise 0).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1124">imgui.h:1124</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10326">imgui.cpp:10326</see>
/// <br/><c>int GetMouseClickedCount(ImGuiMouseButton button)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// </remarks>
public static unsafe int GetMouseClickedCount(ImGuiMouseButton button) => PInvoke.GetMouseClickedCount(button);
/// <summary>
/// <para>
/// is mouse hovering given bounding rect (in screen space). clipped by current clipping settings, but
/// disregarding of other consideration of focus/window ordering/popup-block.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1125">imgui.h:1125</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10336">imgui.cpp:10336</see>
/// <br/><c>bool IsMouseHoveringRect(const ImVec2&amp; r_min, const ImVec2&amp; r_max, bool clip = true)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// <code>
/// Test if mouse cursor is hovering given rectangle
/// NB- Rectangle is clipped by our current clip setting
/// NB- Expand the rectangle to be generous on imprecise inputs systems (g.Style.TouchExtraPadding)
/// </code>
/// </remarks>
public static unsafe bool IsMouseHoveringRect(in float2 rMin, in float2 rMax, bool clip = true)
{
fixed (float2* rMax_fixed = &rMax)
{
fixed (float2* rMin_fixed = &rMin)
{
return PInvoke.IsMouseHoveringRect(rMin_fixed, rMax_fixed, clip);
}
}
}
/// <summary>
/// <para>
/// by convention we use (-FLT_MAX,-FLT_MAX) to denote that there is no mouse available
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1126">imgui.h:1126</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10400">imgui.cpp:10400</see>
/// <br/><c>bool IsMousePosValid(const ImVec2* mouse_pos = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// <para>
/// We typically use ImVec2(-FLT_MAX,-FLT_MAX) to denote an invalid mouse position.
/// </para>
/// </remarks>
public static unsafe bool IsMousePosValid(in float2? mousePos = null)
{
var mousePos_ptr = mousePos is { } mousePos_value ? &mousePos_value : null;
return PInvoke.IsMousePosValid((float2*)mousePos_ptr);
}
/// <summary>
/// <para>
/// [WILL OBSOLETE] is any mouse button held? This was designed for backends, but prefer having backend
/// maintain a mask of held mouse buttons, because upcoming input queue system will make this invalid.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1127">imgui.h:1127</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10411">imgui.cpp:10411</see>
/// <br/><c>bool IsAnyMouseDown()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// <para>
/// [WILL OBSOLETE] This was designed for backends, but prefer having backend maintain a mask of held mouse
/// buttons, because upcoming input queue system will make this invalid.
/// </para>
/// </remarks>
public static unsafe bool IsAnyMouseDown() => PInvoke.IsAnyMouseDown();
/// <summary>
/// <para>
/// shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1128">imgui.h:1128</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10373">imgui.cpp:10373</see>
/// <br/><c>ImVec2 GetMousePos()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// </remarks>
public static unsafe float2 GetMousePos() => PInvoke.GetMousePos();
/// <summary>
/// <para>
/// retrieve mouse position at the time of opening popup we have BeginPopup() into (helper to avoid user
/// backing that value themselves)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1129">imgui.h:1129</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10391">imgui.cpp:10391</see>
/// <br/><c>ImVec2 GetMousePosOnOpeningCurrentPopup()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// <para>
/// NB: prefer to call right after BeginPopup(). At the time Selectable/MenuItem is activated, the popup is
/// already closed!
/// </para>
/// </remarks>
public static unsafe float2 GetMousePosOnOpeningCurrentPopup() => PInvoke.GetMousePosOnOpeningCurrentPopup();
/// <summary>
/// <para>
/// is mouse dragging? (uses io.MouseDraggingThreshold if lock_threshold &lt; 0.0f)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1130">imgui.h:1130</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10364">imgui.cpp:10364</see>
/// <br/><c>bool IsMouseDragging(ImGuiMouseButton button, float lock_threshold = -1.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// </remarks>
public static unsafe bool IsMouseDragging(ImGuiMouseButton button, float lockThreshold = -1f) =>
PInvoke.IsMouseDragging(button, lockThreshold);
/// <summary>
/// <para>
/// return the delta from the initial clicking position while the mouse button is pressed or was just
/// released. This is locked and return 0.0f until the mouse moves past a distance threshold at least once
/// (uses io.MouseDraggingThreshold if lock_threshold &lt; 0.0f)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1131">imgui.h:1131</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10423">imgui.cpp:10423</see>
/// <br/><c>ImVec2 GetMouseDragDelta(ImGuiMouseButton button = 0, float lock_threshold = -1.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// <code>
/// Return the delta from the initial clicking position while the mouse button is clicked or was just released.
/// This is locked and return 0.0f until the mouse moves past a distance threshold at least once.
/// NB: This is only valid if IsMousePosValid(). backends in theory should always keep mouse position valid when dragging even outside the client window.
/// </code>
/// </remarks>
public static unsafe float2 GetMouseDragDelta(ImGuiMouseButton button = default, float lockThreshold = -1f) =>
PInvoke.GetMouseDragDelta(button, lockThreshold);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1132">imgui.h:1132</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10436">imgui.cpp:10436</see>
/// <br/><c>void ResetMouseDragDelta(ImGuiMouseButton button = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// </remarks>
public static unsafe void ResetMouseDragDelta(ImGuiMouseButton button = default) =>
PInvoke.ResetMouseDragDelta(button);
/// <summary>
/// <para>
/// get desired mouse cursor shape. Important: reset in ImGui::NewFrame(), this is updated during the frame.
/// valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render
/// those for you
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1133">imgui.h:1133</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10448">imgui.cpp:10448</see>
/// <br/><c>ImGuiMouseCursor GetMouseCursor()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// <code>
/// Get desired mouse cursor shape.
/// Important: this is meant to be used by a platform backend, it is reset in ImGui::NewFrame(),
/// updated during the frame, and locked in EndFrame()/Render().
/// If you use software rendering by setting io.MouseDrawCursor then Dear ImGui will render those for you
/// </code>
/// </remarks>
public static unsafe ImGuiMouseCursor GetMouseCursor() => PInvoke.GetMouseCursor();
/// <summary>
/// <para>
/// set desired mouse cursor shape
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1134">imgui.h:1134</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10457">imgui.cpp:10457</see>
/// <br/><c>void SetMouseCursor(ImGuiMouseCursor cursor_type)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// <code>
/// We intentionally accept values of ImGuiMouseCursor that are outside our bounds, in case users needs to hack-in a custom cursor value.
/// Custom cursors may be handled by custom backends. If you are using a standard backend and want to hack in a custom cursor, you may
/// handle it before the backend _NewFrame() call and temporarily set ImGuiConfigFlags_NoMouseCursorChange during the backend _NewFrame() call.
/// </code>
/// </remarks>
public static unsafe void SetMouseCursor(ImGuiMouseCursor cursorType) => PInvoke.SetMouseCursor(cursorType);
/// <summary>
/// <para>
/// Override io.WantCaptureMouse flag next frame (said flag is left for your application to handle, typical
/// when true it instructs your app to ignore inputs). This is equivalent to setting "io.WantCaptureMouse =
/// want_capture_mouse;" after the next NewFrame() call.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1135">imgui.h:1135</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L10781">imgui.cpp:10781</see>
/// <br/><c>void SetNextFrameWantCaptureMouse(bool want_capture_mouse)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Mouse
/// - To refer to a mouse button, you may use named enums in your code e.g. ImGuiMouseButton_Left, ImGuiMouseButton_Right.
/// - You can also use regular integer: it is forever guaranteed that 0=Left, 1=Right, 2=Middle.
/// - Dragging operations are only reported after mouse has moved a certain distance away from the initial clicking position (see 'lock_threshold' and 'io.MouseDraggingThreshold')
/// </code>
/// </remarks>
public static unsafe void SetNextFrameWantCaptureMouse(bool wantCaptureMouse) =>
PInvoke.SetNextFrameWantCaptureMouse(wantCaptureMouse);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1139">imgui.h:1139</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5065">imgui.cpp:5065</see>
/// <br/><c>const char* GetClipboardText()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Clipboard Utilities
/// - Also see the LogToClipboard() function to capture GUI into clipboard, or easily output text data to the clipboard.
/// </code>
/// </remarks>
public static unsafe ImString GetClipboardText() => Utf8.GetNullTerminatedSpan(PInvoke.GetClipboardText());
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1140">imgui.h:1140</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5071">imgui.cpp:5071</see>
/// <br/><c>void SetClipboardText(const char* text)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Clipboard Utilities
/// - Also see the LogToClipboard() function to capture GUI into clipboard, or easily output text data to the clipboard.
/// </code>
/// </remarks>
public static unsafe void SetClipboardText(ImString text)
{
fixed (byte* text_fixed = text)
{
PInvoke.SetClipboardText(text_fixed);
}
}
/// <summary>
/// <para>
/// call after CreateContext() and before the first call to NewFrame(). NewFrame() automatically calls
/// LoadIniSettingsFromDisk(io.IniFilename).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1146">imgui.h:1146</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15837">imgui.cpp:15837</see>
/// <br/><c>void LoadIniSettingsFromDisk(const char* ini_filename)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Settings/.Ini Utilities
/// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini").
/// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
/// - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables).
/// </code>
/// </remarks>
public static unsafe void LoadIniSettingsFromDisk(ImString iniFilename)
{
fixed (byte* iniFilename_fixed = iniFilename)
{
PInvoke.LoadIniSettingsFromDisk(iniFilename_fixed);
}
}
/// <summary>
/// <para>
/// this is automatically called (if io.IniFilename is not empty) a few seconds after any modification that
/// should be reflected in the .ini file (and also by DestroyContext).
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1148">imgui.h:1148</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L15920">imgui.cpp:15920</see>
/// <br/><c>void SaveIniSettingsToDisk(const char* ini_filename)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Settings/.Ini Utilities
/// - The disk functions are automatically called if io.IniFilename != NULL (default is "imgui.ini").
/// - Set io.IniFilename to NULL to load/save manually. Read io.WantSaveIniSettings description about handling .ini saving manually.
/// - Important: default value "imgui.ini" is relative to current working dir! Most apps will want to lock this to an absolute path (e.g. same path as executables).
/// </code>
/// </remarks>
public static unsafe void SaveIniSettingsToDisk(ImString iniFilename)
{
fixed (byte* iniFilename_fixed = iniFilename)
{
PInvoke.SaveIniSettingsToDisk(iniFilename_fixed);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1153">imgui.h:1153</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L21509">imgui.cpp:21509</see>
/// <br/><c>void DebugTextEncoding(const char* text)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Debug Utilities
/// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo-&gt;Tools-&gt;Metrics Debugger
/// </code>
/// <para>
/// Helper tool to diagnose between text encoding issues and font loading issues. Pass your UTF-8 string and
/// verify that there are correct.
/// </para>
/// </remarks>
public static unsafe void DebugTextEncoding(ImString text)
{
fixed (byte* text_fixed = text)
{
PInvoke.DebugTextEncoding(text_fixed);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1154">imgui.h:1154</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L21555">imgui.cpp:21555</see>
/// <br/><c>void DebugFlashStyleColor(ImGuiCol idx)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Debug Utilities
/// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo-&gt;Tools-&gt;Metrics Debugger
/// </code>
/// <para>
/// Flash a given style color for some + inhibit modifications of this color via PushStyleColor() calls.
/// </para>
/// </remarks>
public static unsafe void DebugFlashStyleColor(ImGuiCol idx) => PInvoke.DebugFlashStyleColor(idx);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1155">imgui.h:1155</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L23442">imgui.cpp:23442</see>
/// <br/><c>void DebugStartItemPicker()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Debug Utilities
/// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo-&gt;Tools-&gt;Metrics Debugger
/// </code>
/// </remarks>
public static unsafe void DebugStartItemPicker() => PInvoke.DebugStartItemPicker();
/// <summary>
/// <para>
/// This is called by IMGUI_CHECKVERSION() macro.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1156">imgui.h:1156</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11187">imgui.cpp:11187</see>
/// <br/>
/// <c>bool DebugCheckVersionAndDataLayout(const char* version_str, size_t sz_io, size_t sz_style, size_t sz_vec2, size_t sz_vec4, size_t sz_drawvert, size_t sz_drawidx)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Debug Utilities
/// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo-&gt;Tools-&gt;Metrics Debugger
/// </code>
/// <code>
/// Verify ABI compatibility between caller code and compiled version of Dear ImGui. This helps detects some build issues.
/// Called by IMGUI_CHECKVERSION().
/// Verify that the type sizes are matching between the calling file's compilation unit and imgui.cpp's compilation unit
/// If this triggers you have mismatched headers and compiled code versions.
/// - It could be because of a build issue (using new headers with old compiled code)
/// - It could be because of mismatched configuration #define, compilation settings, packing pragma etc.
/// THE CONFIGURATION SETTINGS MENTIONED IN imconfig.h MUST BE SET FOR ALL COMPILATION UNITS INVOLVED WITH DEAR IMGUI.
/// Which is why it is required you put them in your imconfig file (and NOT only before including imgui.h).
/// Otherwise it is possible that different compilation units would see different structure layout.
/// If you don't want to modify imconfig.h you can use the IMGUI_USER_CONFIG define to change filename.
/// </code>
/// </remarks>
public static unsafe bool DebugCheckVersionAndDataLayout(
ImString versionStr,
nuint szIo,
nuint szStyle,
nuint szVec2,
nuint szVec4,
nuint szDrawvert,
nuint szDrawidx
)
{
fixed (byte* versionStr_fixed = versionStr)
{
return PInvoke.DebugCheckVersionAndDataLayout(
versionStr_fixed,
szIo,
szStyle,
szVec2,
szVec4,
szDrawvert,
szDrawidx
);
}
}
/// <summary>
/// <para>
/// Call via IMGUI_DEBUG_LOG() for maximum stripping in caller code!
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1158">imgui.h:1158</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L23202">imgui.cpp:23202</see>
/// <br/><c>void DebugLog(const char* fmt, ...) IM_FMTARGS(1)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Debug Utilities
/// - Your main debugging friend is the ShowMetricsWindow() function, which is also accessible from Demo-&gt;Tools-&gt;Metrics Debugger
/// </code>
/// </remarks>
public static unsafe void DebugLog(ImString text)
{
fixed (byte* text_fixed = text)
{
PInvoke.DebugLog(text_fixed);
}
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1166">imgui.h:1166</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L4027">imgui.cpp:4027</see>
/// <br/>
/// <c>void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func, void* user_data = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Memory Allocators
/// - Those functions are not reliant on the current context.
/// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
/// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
/// </code>
/// </remarks>
public static unsafe void SetAllocatorFunctions(
ImGuiMemAllocFunc allocFunc,
ImGuiMemFreeFunc freeFunc,
Ptr userData = default
) =>
PInvoke.SetAllocatorFunctions(
Marshal.GetFunctionPointerForDelegate(allocFunc),
Marshal.GetFunctionPointerForDelegate(freeFunc),
userData
);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1166">imgui.h:1166</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L4027">imgui.cpp:4027</see>
/// <br/>
/// <c>void SetAllocatorFunctions(ImGuiMemAllocFunc alloc_func, ImGuiMemFreeFunc free_func, void* user_data = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Memory Allocators
/// - Those functions are not reliant on the current context.
/// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
/// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
/// </code>
/// </remarks>
public static unsafe void SetAllocatorFunctions(
delegate* unmanaged[Cdecl]<nuint, void*, void*> allocFunc,
delegate* unmanaged[Cdecl]<void*, void*, void> freeFunc,
Ptr userData = default
) => PInvoke.SetAllocatorFunctions((nint)allocFunc, (nint)freeFunc, userData);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1168">imgui.h:1168</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5018">imgui.cpp:5018</see>
/// <br/><c>void* MemAlloc(size_t size)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Memory Allocators
/// - Those functions are not reliant on the current context.
/// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
/// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
/// </code>
/// <para>
/// IM_ALLOC() == ImGui::MemAlloc()
/// </para>
/// </remarks>
public static unsafe Ptr MemAlloc(nuint size) => PInvoke.MemAlloc(size);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1169">imgui.h:1169</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L5029">imgui.cpp:5029</see>
/// <br/><c>void MemFree(void* ptr)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Memory Allocators
/// - Those functions are not reliant on the current context.
/// - DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions()
/// for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details.
/// </code>
/// <para>
/// IM_FREE() == ImGui::MemFree()
/// </para>
/// </remarks>
public static unsafe void MemFree(Ptr ptr) => PInvoke.MemFree(ptr);
/// <summary>
/// <para>
/// call in main loop. will call CreateWindow/ResizeWindow/etc. platform functions for each secondary
/// viewport, and DestroyWindow for each inactive viewport.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1174">imgui.h:1174</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L16926">imgui.cpp:16926</see>
/// <br/><c>void UpdatePlatformWindows()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// (Optional) Platform/OS interface for multi-viewport support
/// Read comments around the ImGuiPlatformIO structure for more details.
/// Note: You may use GetWindowViewport() to get the current viewport of the current window.
/// </code>
/// <code>
/// Called by user at the end of the main loop, after EndFrame()
/// This will handle the creation/update of all OS windows via function defined in the ImGuiPlatformIO api.
/// </code>
/// </remarks>
public static unsafe void UpdatePlatformWindows() => PInvoke.UpdatePlatformWindows();
/// <summary>
/// <para>
/// call in main loop. will call RenderWindow/SwapBuffers platform functions for each secondary viewport
/// which doesn't have the ImGuiViewportFlags_Minimized flag set. May be reimplemented by user for custom
/// rendering needs.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1175">imgui.h:1175</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L17038">imgui.cpp:17038</see>
/// <br/>
/// <c>void RenderPlatformWindowsDefault(void* platform_render_arg = NULL, void* renderer_render_arg = NULL)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// (Optional) Platform/OS interface for multi-viewport support
/// Read comments around the ImGuiPlatformIO structure for more details.
/// Note: You may use GetWindowViewport() to get the current viewport of the current window.
/// </code>
/// </remarks>
public static unsafe void RenderPlatformWindowsDefault(
Ptr platformRenderArg = default,
Ptr rendererRenderArg = default
) => PInvoke.RenderPlatformWindowsDefault(platformRenderArg, rendererRenderArg);
/// <summary>
/// <para>
/// call DestroyWindow platform functions for all viewports. call from backend Shutdown() if you need to
/// close platform windows before imgui shutdown. otherwise will be called by DestroyContext().
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1176">imgui.h:1176</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L17148">imgui.cpp:17148</see>
/// <br/><c>void DestroyPlatformWindows()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// (Optional) Platform/OS interface for multi-viewport support
/// Read comments around the ImGuiPlatformIO structure for more details.
/// Note: You may use GetWindowViewport() to get the current viewport of the current window.
/// </code>
/// </remarks>
public static unsafe void DestroyPlatformWindows() => PInvoke.DestroyPlatformWindows();
/// <summary>
/// <para>
/// this is a helper for backends.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1177">imgui.h:1177</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L16177">imgui.cpp:16177</see>
/// <br/><c>ImGuiViewport* FindViewportByID(ImGuiID id)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// (Optional) Platform/OS interface for multi-viewport support
/// Read comments around the ImGuiPlatformIO structure for more details.
/// Note: You may use GetWindowViewport() to get the current viewport of the current window.
/// </code>
/// <para>
/// FIXME: This leaks access to viewports not listed in PlatformIO.Viewports[]. Problematic? (#4236)
/// </para>
/// </remarks>
public static unsafe ImGuiViewportPtr FindViewportByID(ImGuiID id) => PInvoke.FindViewportByID(id);
/// <summary>
/// <para>
/// this is a helper for backends. the type platform_handle is decided by the backend (e.g. HWND, MyWindow*,
/// GLFWwindow* etc.)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1178">imgui.h:1178</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L16186">imgui.cpp:16186</see>
/// <br/><c>ImGuiViewport* FindViewportByPlatformHandle(void* platform_handle)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// (Optional) Platform/OS interface for multi-viewport support
/// Read comments around the ImGuiPlatformIO structure for more details.
/// Note: You may use GetWindowViewport() to get the current viewport of the current window.
/// </code>
/// </remarks>
public static unsafe ImGuiViewportPtr FindViewportByPlatformHandle(Ptr platformHandle) =>
PInvoke.FindViewportByPlatformHandle(platformHandle);
}
}