mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
|
|
@ -0,0 +1,185 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.ImGui.Generator; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
namespace Brutal.ImGuiApi
|
||||
{
|
||||
public static partial class ImGuiSelectionBasicStorageExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Apply selection requests coming from BeginMultiSelect() and EndMultiSelect() functions. It uses
|
||||
/// 'items_count' passed to BeginMultiSelect()
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3174">imgui.h:3174</see>
|
||||
/// ,
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8359">imgui_widgets.cpp:8359</see>
|
||||
/// <br/><c>void ApplyRequests(ImGuiMultiSelectIO* ms_io)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Methods
|
||||
/// </para>
|
||||
/// <code>
|
||||
/// Apply requests coming from BeginMultiSelect() and EndMultiSelect().
|
||||
/// - Enable 'Demo->Tools->Debug Log->Selection' to see selection requests as they happen.
|
||||
/// - Honoring SetRange requests requires that you can iterate/interpolate between RangeFirstItem and RangeLastItem.
|
||||
/// - In this demo we often submit indices to SetNextItemSelectionUserData() + store the same indices in persistent selection.
|
||||
/// - Your code may do differently. If you store pointers or objects ID in ImGuiSelectionUserData you may need to perform
|
||||
/// a lookup in order to have some way to iterate/interpolate between two items.
|
||||
/// - A full-featured application is likely to allow search/filtering which is likely to lead to using indices
|
||||
/// and constructing a view index <> object id/ptr data structure anyway.
|
||||
/// WHEN YOUR APPLICATION SETTLES ON A CHOICE, YOU WILL PROBABLY PREFER TO GET RID OF THIS UNNECESSARY 'ImGuiSelectionBasicStorage' INDIRECTION LOGIC.
|
||||
/// Notice that with the simplest adapter (using indices everywhere), all functions return their parameters.
|
||||
/// The most simple implementation (using indices everywhere) would look like:
|
||||
/// for (ImGuiSelectionRequest& req : ms_io->Requests)
|
||||
/// {
|
||||
/// if (req.Type == ImGuiSelectionRequestType_SetAll) { Clear(); if (req.Selected) { for (int n = 0; n < items_count; n++) { SetItemSelected(n, true); } }
|
||||
/// if (req.Type == ImGuiSelectionRequestType_SetRange) { for (int n = (int)ms_io->RangeFirstItem; n <= (int)ms_io->RangeLastItem; n++) { SetItemSelected(n, ms_io->Selected); } }
|
||||
/// }
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public static unsafe void ApplyRequests(
|
||||
this ImGuiSelectionBasicStoragePtr target,
|
||||
ImGuiMultiSelectIOPtr msIo
|
||||
) => PInvoke.ImGuiSelectionBasicStorage_ApplyRequests(target, msIo);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Query if an item id is in selection.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3175">imgui.h:3175</see>
|
||||
/// ,
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8280">imgui_widgets.cpp:8280</see>
|
||||
/// <br/><c>bool Contains(ImGuiID id) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Methods
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static unsafe bool Contains(this ImGuiSelectionBasicStoragePtr target, ImGuiID id) =>
|
||||
PInvoke.ImGuiSelectionBasicStorage_Contains(target, id);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Clear selection
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3176">imgui.h:3176</see>
|
||||
/// ,
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8266">imgui_widgets.cpp:8266</see>
|
||||
/// <br/><c>void Clear()</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Methods
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static unsafe void Clear(this ImGuiSelectionBasicStoragePtr target) =>
|
||||
PInvoke.ImGuiSelectionBasicStorage_Clear(target);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Swap two selections
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3177">imgui.h:3177</see>
|
||||
/// ,
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8273">imgui_widgets.cpp:8273</see>
|
||||
/// <br/><c>void Swap(ImGuiSelectionBasicStorage& r)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Methods
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static unsafe void Swap(this ImGuiSelectionBasicStoragePtr target, ImGuiSelectionBasicStoragePtr r) =>
|
||||
PInvoke.ImGuiSelectionBasicStorage_Swap(target, r);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Add/remove an item from selection (generally done by ApplyRequests() function)
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3178">imgui.h:3178</see>
|
||||
/// ,
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8314">imgui_widgets.cpp:8314</see>
|
||||
/// <br/><c>void SetItemSelected(ImGuiID id, bool selected)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Methods
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static unsafe void SetItemSelected(
|
||||
this ImGuiSelectionBasicStoragePtr target,
|
||||
ImGuiID id,
|
||||
bool selected
|
||||
) => PInvoke.ImGuiSelectionBasicStorage_SetItemSelected(target, id, selected);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Iterate selection with 'void* it = NULL; ImGuiID id; while (selection.GetNextSelectedItem(&it,
|
||||
/// &id)) { ... }'
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3179">imgui.h:3179</see>
|
||||
/// ,
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_widgets.cpp#L8294">imgui_widgets.cpp:8294</see>
|
||||
/// <br/><c>bool GetNextSelectedItem(void** opaque_it, ImGuiID* out_id)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Methods
|
||||
/// </para>
|
||||
/// <code>
|
||||
/// GetNextSelectedItem() is an abstraction allowing us to change our underlying actual storage system without impacting user.
|
||||
/// (e.g. store unselected vs compact down, compact down on demand, use raw ImVector<ImGuiID> instead of ImGuiStorage...)
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public static unsafe bool GetNextSelectedItem(
|
||||
this ImGuiSelectionBasicStoragePtr target,
|
||||
Ptr<Ptr> opaqueIt,
|
||||
out ImGuiID outId
|
||||
)
|
||||
{
|
||||
fixed (ImGuiID* outId_fixed = &outId)
|
||||
{
|
||||
return PInvoke.ImGuiSelectionBasicStorage_GetNextSelectedItem(target, (void**)opaqueIt, outId_fixed);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Convert index to item id based on provided adapter.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L3180">imgui.h:3180</see>
|
||||
/// <br/><c>inline ImGuiID GetStorageIdFromIndex(int idx)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Methods
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static unsafe ImGuiID GetStorageIdFromIndex(this ImGuiSelectionBasicStoragePtr target, int idx) =>
|
||||
PInvoke.ImGuiSelectionBasicStorage_GetStorageIdFromIndex(target, idx);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue