mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
310 lines
17 KiB
C#
310 lines
17 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.ImGui.Generator; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.ImGuiApi
|
|
{
|
|
public static partial class ImGuiStorageExtensions
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2882">imgui.h:2882</see>
|
|
/// <br/><c>void Clear()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N)
|
|
/// - Set***() functions find pair, insertion on demand if missing.
|
|
/// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair.
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe void Clear(this ImGuiStoragePtr target) => PInvoke.ImGuiStorage_Clear(target);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2883">imgui.h:2883</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2862">imgui.cpp:2862</see>
|
|
/// <br/><c>int GetInt(ImGuiID key, int default_val = 0) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N)
|
|
/// - Set***() functions find pair, insertion on demand if missing.
|
|
/// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair.
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe int GetInt(this ImGuiStoragePtr target, ImGuiID key, int defaultVal = 0) =>
|
|
PInvoke.ImGuiStorage_GetInt(target, key, defaultVal);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2884">imgui.h:2884</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2922">imgui.cpp:2922</see>
|
|
/// <br/><c>void SetInt(ImGuiID key, int val)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N)
|
|
/// - Set***() functions find pair, insertion on demand if missing.
|
|
/// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair.
|
|
/// </code>
|
|
/// <para>
|
|
/// FIXME-OPT: Need a way to reuse the result of lower_bound when doing GetInt()/SetInt() - not too bad
|
|
/// because it only happens on explicit interaction (maximum one a frame)
|
|
/// </para>
|
|
/// </remarks>
|
|
public static unsafe void SetInt(this ImGuiStoragePtr target, ImGuiID key, int val) =>
|
|
PInvoke.ImGuiStorage_SetInt(target, key, val);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2885">imgui.h:2885</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2870">imgui.cpp:2870</see>
|
|
/// <br/><c>bool GetBool(ImGuiID key, bool default_val = false) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N)
|
|
/// - Set***() functions find pair, insertion on demand if missing.
|
|
/// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair.
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe bool GetBool(this ImGuiStoragePtr target, ImGuiID key, bool defaultVal = false) =>
|
|
PInvoke.ImGuiStorage_GetBool(target, key, defaultVal);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2886">imgui.h:2886</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2931">imgui.cpp:2931</see>
|
|
/// <br/><c>void SetBool(ImGuiID key, bool val)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N)
|
|
/// - Set***() functions find pair, insertion on demand if missing.
|
|
/// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair.
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe void SetBool(this ImGuiStoragePtr target, ImGuiID key, bool val) =>
|
|
PInvoke.ImGuiStorage_SetBool(target, key, val);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2887">imgui.h:2887</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2875">imgui.cpp:2875</see>
|
|
/// <br/><c>float GetFloat(ImGuiID key, float default_val = 0.0f) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N)
|
|
/// - Set***() functions find pair, insertion on demand if missing.
|
|
/// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair.
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe float GetFloat(this ImGuiStoragePtr target, ImGuiID key, float defaultVal = 0f) =>
|
|
PInvoke.ImGuiStorage_GetFloat(target, key, defaultVal);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2888">imgui.h:2888</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2936">imgui.cpp:2936</see>
|
|
/// <br/><c>void SetFloat(ImGuiID key, float val)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N)
|
|
/// - Set***() functions find pair, insertion on demand if missing.
|
|
/// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair.
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe void SetFloat(this ImGuiStoragePtr target, ImGuiID key, float val) =>
|
|
PInvoke.ImGuiStorage_SetFloat(target, key, val);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// default_val is NULL
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2889">imgui.h:2889</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2883">imgui.cpp:2883</see>
|
|
/// <br/><c>void* GetVoidPtr(ImGuiID key) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N)
|
|
/// - Set***() functions find pair, insertion on demand if missing.
|
|
/// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair.
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe Ptr GetVoidPtr(this ImGuiStoragePtr target, ImGuiID key) =>
|
|
PInvoke.ImGuiStorage_GetVoidPtr(target, key);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2890">imgui.h:2890</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2945">imgui.cpp:2945</see>
|
|
/// <br/><c>void SetVoidPtr(ImGuiID key, void* val)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***() functions find pair, never add/allocate. Pairs are sorted so a query is O(log N)
|
|
/// - Set***() functions find pair, insertion on demand if missing.
|
|
/// - Sorted insertion is costly, paid once. A typical frame shouldn't need to insert any new pair.
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe void SetVoidPtr(this ImGuiStoragePtr target, ImGuiID key, Ptr val) =>
|
|
PInvoke.ImGuiStorage_SetVoidPtr(target, key, val);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2896">imgui.h:2896</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2892">imgui.cpp:2892</see>
|
|
/// <br/><c>int* GetIntRef(ImGuiID key, int default_val = 0)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set.
|
|
/// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer.
|
|
/// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct)
|
|
/// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar;
|
|
/// </code>
|
|
/// <para>
|
|
/// References are only valid until a new value is added to the storage. Calling a Set***() function or a
|
|
/// Get***Ref() function invalidates the pointer.
|
|
/// </para>
|
|
/// </remarks>
|
|
public static unsafe ref int GetIntRef(this ImGuiStoragePtr target, ImGuiID key, int defaultVal = 0) =>
|
|
ref Unsafe.AsRef<int>(PInvoke.ImGuiStorage_GetIntRef(target, key, defaultVal));
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2897">imgui.h:2897</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2900">imgui.cpp:2900</see>
|
|
/// <br/><c>bool* GetBoolRef(ImGuiID key, bool default_val = false)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set.
|
|
/// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer.
|
|
/// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct)
|
|
/// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar;
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe ref bool GetBoolRef(this ImGuiStoragePtr target, ImGuiID key, bool defaultVal = false) =>
|
|
ref Unsafe.AsRef<bool>(PInvoke.ImGuiStorage_GetBoolRef(target, key, defaultVal));
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2898">imgui.h:2898</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2905">imgui.cpp:2905</see>
|
|
/// <br/><c>float* GetFloatRef(ImGuiID key, float default_val = 0.0f)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set.
|
|
/// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer.
|
|
/// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct)
|
|
/// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar;
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe ref float GetFloatRef(this ImGuiStoragePtr target, ImGuiID key, float defaultVal = 0f) =>
|
|
ref Unsafe.AsRef<float>(PInvoke.ImGuiStorage_GetFloatRef(target, key, defaultVal));
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2899">imgui.h:2899</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2913">imgui.cpp:2913</see>
|
|
/// <br/><c>void** GetVoidPtrRef(ImGuiID key, void* default_val = NULL)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// - Get***Ref() functions finds pair, insert on demand if missing, return pointer. Useful if you intend to do Get+Set.
|
|
/// - References are only valid until a new value is added to the storage. Calling a Set***() function or a Get***Ref() function invalidates the pointer.
|
|
/// - A typical use case where this is convenient for quick hacking (e.g. add storage during a live Edit&Continue session if you can't modify existing struct)
|
|
/// float* pvar = ImGui::GetFloatRef(key); ImGui::SliderFloat("var", pvar, 0, 100.0f); some_var += *pvar;
|
|
/// </code>
|
|
/// </remarks>
|
|
public static unsafe ref Ptr GetVoidPtrRef(
|
|
this ImGuiStoragePtr target,
|
|
ImGuiID key,
|
|
Ptr defaultVal = default
|
|
) => ref Unsafe.AsRef<Ptr>(PInvoke.ImGuiStorage_GetVoidPtrRef(target, key, defaultVal));
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2902">imgui.h:2902</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2857">imgui.cpp:2857</see>
|
|
/// <br/><c>void BuildSortByKey()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Advanced: for quicker full rebuild of a storage (instead of an incremental one), you may add all your
|
|
/// contents and then sort once.
|
|
/// </para>
|
|
/// <para>
|
|
/// For quicker full rebuild of a storage (instead of an incremental one), you may add all your contents and
|
|
/// then sort once.
|
|
/// </para>
|
|
/// </remarks>
|
|
public static unsafe void BuildSortByKey(this ImGuiStoragePtr target) =>
|
|
PInvoke.ImGuiStorage_BuildSortByKey(target);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L2904">imgui.h:2904</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L2954">imgui.cpp:2954</see>
|
|
/// <br/><c>void SetAllInt(int val)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Obsolete: use on your own storage if you know only integer are being stored (open/close all tree nodes)
|
|
/// </para>
|
|
/// </remarks>
|
|
public static unsafe void SetAllInt(this ImGuiStoragePtr target, int val) =>
|
|
PInvoke.ImGuiStorage_SetAllInt(target, val);
|
|
}
|
|
}
|