//
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
namespace Brutal.ImGuiApi
{
///
///
/// Optional helper to store multi-selection state + apply multi-selection requests.
///
///
/// C++:
/// imgui.h:206
///
struct ImGuiSelectionBasicStorage
///
///
///
///
/// Forward declarations: ImGui layer
///
///
[StructLayout(LayoutKind.Explicit, Size = 48)]
public partial struct ImGuiSelectionBasicStorage
{
///
///
/// // Number of selected items, maintained by this helper.
///
///
/// C++:
/// imgui.h:3165
///
int Size
///
///
///
///
/// Members
///
///
[FieldOffset(0)]
public int Size;
///
///
/// = false // GetNextSelectedItem() will return ordered selection (currently implemented by two additional
/// sorts of selection. Could be improved)
///
///
/// C++:
/// imgui.h:3166
///
bool PreserveOrder
///
///
///
///
/// Members
///
///
[FieldOffset(4)]
public Bool8 PreserveOrder;
///
///
/// = NULL // User data for use by adapter function // e.g. selection.UserData = (void*)my_items;
///
///
/// C++:
/// imgui.h:3167
///
void* UserData
///
///
///
///
/// Members
///
///
[FieldOffset(8)]
public nint UserData;
///
///
/// e.g. selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return
/// ((MyItems**)self->UserData)[idx]->ID; };
///
///
/// C++:
/// imgui.h:3168
///
ImGuiID (*AdapterIndexToStorageId)(ImGuiSelectionBasicStorage* self, int idx)
///
///
///
///
/// Members
///
///
[FieldOffset(16)]
public nint AdapterIndexToStorageId;
///
///
/// [Internal] Increasing counter to store selection order
///
///
/// C++:
/// imgui.h:3169
///
int _SelectionOrder
///
///
///
///
/// Members
///
///
[FieldOffset(24)]
public int _SelectionOrder;
///
///
/// [Internal] Selection set. Think of this as similar to e.g. std::set<ImGuiID>. Prefer not accessing
/// directly: iterate with GetNextSelectedItem().
///
///
/// C++:
/// imgui.h:3170
///
ImGuiStorage _Storage
///
///
///
///
/// Members
///
///
[FieldOffset(32)]
public ImGuiStorage _Storage;
}
///
///
/// Optional helper to store multi-selection state + apply multi-selection requests.
///
///
/// C++:
/// imgui.h:206
///
struct ImGuiSelectionBasicStorage
///
///
///
///
/// Forward declarations: ImGui layer
///
///
public unsafe partial struct ImGuiSelectionBasicStoragePtr(ImGuiSelectionBasicStorage* ptr) : INullable
{
private ImGuiSelectionBasicStorage* _ptr = ptr;
public ImGuiSelectionBasicStorage* Ptr => _ptr;
public bool IsNull() => _ptr is null;
public static implicit operator ImGuiSelectionBasicStoragePtr(ImGuiSelectionBasicStorage* ptr) => new(ptr);
public static implicit operator ImGuiSelectionBasicStorage*(ImGuiSelectionBasicStoragePtr wrapper) =>
wrapper.Ptr;
///
///
/// // Number of selected items, maintained by this helper.
///
///
/// C++:
/// imgui.h:3165
///
int Size
///
///
///
///
/// Members
///
///
public ref int Size => ref Unsafe.AsRef(&_ptr->Size);
///
///
/// = false // GetNextSelectedItem() will return ordered selection (currently implemented by two additional
/// sorts of selection. Could be improved)
///
///
/// C++:
/// imgui.h:3166
///
bool PreserveOrder
///
///
///
///
/// Members
///
///
public ref bool PreserveOrder => ref Unsafe.AsRef(&_ptr->PreserveOrder);
///
///
/// = NULL // User data for use by adapter function // e.g. selection.UserData = (void*)my_items;
///
///
/// C++:
/// imgui.h:3167
///
void* UserData
///
///
///
///
/// Members
///
///
public ref nint UserData => ref Unsafe.AsRef(&_ptr->UserData);
///
///
/// e.g. selection.AdapterIndexToStorageId = [](ImGuiSelectionBasicStorage* self, int idx) { return
/// ((MyItems**)self->UserData)[idx]->ID; };
///
///
/// C++:
/// imgui.h:3168
///
ImGuiID (*AdapterIndexToStorageId)(ImGuiSelectionBasicStorage* self, int idx)
///
///
///
///
/// Members
///
///
public ref nint AdapterIndexToStorageId => ref Unsafe.AsRef(&_ptr->AdapterIndexToStorageId);
///
///
/// [Internal] Increasing counter to store selection order
///
///
/// C++:
/// imgui.h:3169
///
int _SelectionOrder
///
///
///
///
/// Members
///
///
public ref int _SelectionOrder => ref Unsafe.AsRef(&_ptr->_SelectionOrder);
///
///
/// [Internal] Selection set. Think of this as similar to e.g. std::set<ImGuiID>. Prefer not accessing
/// directly: iterate with GetNextSelectedItem().
///
///
/// C++:
/// imgui.h:3170
///
ImGuiStorage _Storage
///
///
///
///
/// Members
///
///
public ref ImGuiStorage _Storage => ref Unsafe.AsRef(&_ptr->_Storage);
}
}