mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
194 lines
9.3 KiB
C#
194 lines
9.3 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.ImGui.Generator; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.ImGuiApi
|
|
{
|
|
public partial class ImGui
|
|
{
|
|
public unsafe partial class PInvoke
|
|
{
|
|
/// <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>
|
|
[LibraryImport("imgui")]
|
|
public static unsafe partial void ImGuiSelectionBasicStorage_ApplyRequests(
|
|
ImGuiSelectionBasicStorage* target,
|
|
ImGuiMultiSelectIO* ms_io
|
|
);
|
|
|
|
/// <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>
|
|
[LibraryImport("imgui")]
|
|
public static unsafe partial Bool8 ImGuiSelectionBasicStorage_Contains(
|
|
ImGuiSelectionBasicStorage* target,
|
|
ImGuiID 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>
|
|
[LibraryImport("imgui")]
|
|
public static unsafe partial void ImGuiSelectionBasicStorage_Clear(ImGuiSelectionBasicStorage* 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>
|
|
[LibraryImport("imgui")]
|
|
public static unsafe partial void ImGuiSelectionBasicStorage_Swap(
|
|
ImGuiSelectionBasicStorage* target,
|
|
ImGuiSelectionBasicStorage* 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>
|
|
[LibraryImport("imgui")]
|
|
public static unsafe partial void ImGuiSelectionBasicStorage_SetItemSelected(
|
|
ImGuiSelectionBasicStorage* target,
|
|
ImGuiID id,
|
|
Bool8 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>
|
|
[LibraryImport("imgui")]
|
|
public static unsafe partial Bool8 ImGuiSelectionBasicStorage_GetNextSelectedItem(
|
|
ImGuiSelectionBasicStorage* target,
|
|
void** opaque_it,
|
|
ImGuiID* out_id
|
|
);
|
|
|
|
/// <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>
|
|
[LibraryImport("imgui")]
|
|
public static unsafe partial ImGuiID ImGuiSelectionBasicStorage_GetStorageIdFromIndex(
|
|
ImGuiSelectionBasicStorage* target,
|
|
int idx
|
|
);
|
|
}
|
|
}
|
|
}
|