brutal/Brutal.ImGui/Generated/PInvoke/SetNextItemShortcut.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

43 lines
2.8 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>
/// C++:
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.h#L1105">imgui.h:1105</see>
/// ,
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11090">imgui.cpp:11090</see>
/// <br/><c>void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags = 0)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Inputs Utilities: Shortcut Testing &amp; Routing [BETA]
/// - ImGuiKeyChord = a ImGuiKey + optional ImGuiMod_Alt/ImGuiMod_Ctrl/ImGuiMod_Shift/ImGuiMod_Super.
/// ImGuiKey_C // Accepted by functions taking ImGuiKey or ImGuiKeyChord arguments)
/// ImGuiMod_Ctrl | ImGuiKey_C // Accepted by functions taking ImGuiKeyChord arguments)
/// only ImGuiMod_XXX values are legal to combine with an ImGuiKey. You CANNOT combine two ImGuiKey values.
/// - The general idea is that several callers may register interest in a shortcut, and only one owner gets it.
/// Parent -&gt; call Shortcut(Ctrl+S) // When Parent is focused, Parent gets the shortcut.
/// Child1 -&gt; call Shortcut(Ctrl+S) // When Child1 is focused, Child1 gets the shortcut (Child1 overrides Parent shortcuts)
/// Child2 -&gt; no call // When Child2 is focused, Parent gets the shortcut.
/// The whole system is order independent, so if Child1 makes its calls before Parent, results will be identical.
/// This is an important property as it facilitate working with foreign code or larger codebase.
/// - To understand the difference:
/// - IsKeyChordPressed() compares mods and call IsKeyPressed() -&gt; function has no side-effect.
/// - Shortcut() submits a route, routes are resolved, if it currently can be routed it calls IsKeyChordPressed() -&gt; function has (desirable) side-effects as it can prevents another call from getting the route.
/// - Visualize registered routes in 'Metrics/Debugger-&gt;Inputs'.
/// </code>
/// </remarks>
[LibraryImport("imgui")]
public static unsafe partial void SetNextItemShortcut(ImGuiKeyChord key_chord, ImGuiInputFlags flags);
}
}
}