//
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
namespace Brutal.ImGuiApi
{
public static partial class ImGuiStorageExtensions
{
///
///
/// C++:
/// imgui.h:2882
///
void Clear()
///
///
///
///
/// - 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.
///
///
public static unsafe void Clear(this ImGuiStoragePtr target) => PInvoke.ImGuiStorage_Clear(target);
///
///
/// C++:
/// imgui.h:2883
/// ,
/// imgui.cpp:2862
///
int GetInt(ImGuiID key, int default_val = 0) const
///
///
///
///
/// - 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.
///
///
public static unsafe int GetInt(this ImGuiStoragePtr target, ImGuiID key, int defaultVal = 0) =>
PInvoke.ImGuiStorage_GetInt(target, key, defaultVal);
///
///
/// C++:
/// imgui.h:2884
/// ,
/// imgui.cpp:2922
///
void SetInt(ImGuiID key, int val)
///
///
///
///
/// - 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.
///
///
/// 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)
///
///
public static unsafe void SetInt(this ImGuiStoragePtr target, ImGuiID key, int val) =>
PInvoke.ImGuiStorage_SetInt(target, key, val);
///
///
/// C++:
/// imgui.h:2885
/// ,
/// imgui.cpp:2870
///
bool GetBool(ImGuiID key, bool default_val = false) const
///
///
///
///
/// - 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.
///
///
public static unsafe bool GetBool(this ImGuiStoragePtr target, ImGuiID key, bool defaultVal = false) =>
PInvoke.ImGuiStorage_GetBool(target, key, defaultVal);
///
///
/// C++:
/// imgui.h:2886
/// ,
/// imgui.cpp:2931
///
void SetBool(ImGuiID key, bool val)
///
///
///
///
/// - 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.
///
///
public static unsafe void SetBool(this ImGuiStoragePtr target, ImGuiID key, bool val) =>
PInvoke.ImGuiStorage_SetBool(target, key, val);
///
///
/// C++:
/// imgui.h:2887
/// ,
/// imgui.cpp:2875
///
float GetFloat(ImGuiID key, float default_val = 0.0f) const
///
///
///
///
/// - 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.
///
///
public static unsafe float GetFloat(this ImGuiStoragePtr target, ImGuiID key, float defaultVal = 0f) =>
PInvoke.ImGuiStorage_GetFloat(target, key, defaultVal);
///
///
/// C++:
/// imgui.h:2888
/// ,
/// imgui.cpp:2936
///
void SetFloat(ImGuiID key, float val)
///
///
///
///
/// - 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.
///
///
public static unsafe void SetFloat(this ImGuiStoragePtr target, ImGuiID key, float val) =>
PInvoke.ImGuiStorage_SetFloat(target, key, val);
///
///
/// default_val is NULL
///
///
/// C++:
/// imgui.h:2889
/// ,
/// imgui.cpp:2883
///
void* GetVoidPtr(ImGuiID key) const
///
///
///
///
/// - 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.
///
///
public static unsafe Ptr GetVoidPtr(this ImGuiStoragePtr target, ImGuiID key) =>
PInvoke.ImGuiStorage_GetVoidPtr(target, key);
///
///
/// C++:
/// imgui.h:2890
/// ,
/// imgui.cpp:2945
///
void SetVoidPtr(ImGuiID key, void* val)
///
///
///
///
/// - 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.
///
///
public static unsafe void SetVoidPtr(this ImGuiStoragePtr target, ImGuiID key, Ptr val) =>
PInvoke.ImGuiStorage_SetVoidPtr(target, key, val);
///
///
/// C++:
/// imgui.h:2896
/// ,
/// imgui.cpp:2892
///
int* GetIntRef(ImGuiID key, int default_val = 0)
///
///
///
///
/// - 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;
///
///
/// 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.
///
///
public static unsafe ref int GetIntRef(this ImGuiStoragePtr target, ImGuiID key, int defaultVal = 0) =>
ref Unsafe.AsRef(PInvoke.ImGuiStorage_GetIntRef(target, key, defaultVal));
///
///
/// C++:
/// imgui.h:2897
/// ,
/// imgui.cpp:2900
///
bool* GetBoolRef(ImGuiID key, bool default_val = false)
///
///
///
///
/// - 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;
///
///
public static unsafe ref bool GetBoolRef(this ImGuiStoragePtr target, ImGuiID key, bool defaultVal = false) =>
ref Unsafe.AsRef(PInvoke.ImGuiStorage_GetBoolRef(target, key, defaultVal));
///
///
/// C++:
/// imgui.h:2898
/// ,
/// imgui.cpp:2905
///
float* GetFloatRef(ImGuiID key, float default_val = 0.0f)
///
///
///
///
/// - 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;
///
///
public static unsafe ref float GetFloatRef(this ImGuiStoragePtr target, ImGuiID key, float defaultVal = 0f) =>
ref Unsafe.AsRef(PInvoke.ImGuiStorage_GetFloatRef(target, key, defaultVal));
///
///
/// C++:
/// imgui.h:2899
/// ,
/// imgui.cpp:2913
///
void** GetVoidPtrRef(ImGuiID key, void* default_val = NULL)
///
///
///
///
/// - 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;
///
///
public static unsafe ref Ptr GetVoidPtrRef(
this ImGuiStoragePtr target,
ImGuiID key,
Ptr defaultVal = default
) => ref Unsafe.AsRef(PInvoke.ImGuiStorage_GetVoidPtrRef(target, key, defaultVal));
///
///
/// C++:
/// imgui.h:2902
/// ,
/// imgui.cpp:2857
///
void BuildSortByKey()
///
///
///
///
/// Advanced: for quicker full rebuild of a storage (instead of an incremental one), you may add all your
/// contents and then sort once.
///
///
/// For quicker full rebuild of a storage (instead of an incremental one), you may add all your contents and
/// then sort once.
///
///
public static unsafe void BuildSortByKey(this ImGuiStoragePtr target) =>
PInvoke.ImGuiStorage_BuildSortByKey(target);
///
///
/// C++:
/// imgui.h:2904
/// ,
/// imgui.cpp:2954
///
void SetAllInt(int val)
///
///
///
///
/// Obsolete: use on your own storage if you know only integer are being stored (open/close all tree nodes)
///
///
public static unsafe void SetAllInt(this ImGuiStoragePtr target, int val) =>
PInvoke.ImGuiStorage_SetAllInt(target, val);
}
}