//
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
namespace Brutal.ImGuiApi
{
public partial class ImGui
{
public unsafe partial class PInvoke
{
///
///
/// open+begin popup when clicked on last item. Use str_id==NULL to associate the popup to previous
/// item. If you want to use that on a non-interactive item such as Text() you need to pass in an
/// explicit ID here. read comments in .cpp!
///
///
/// C++:
/// imgui.h:874
/// ,
/// imgui.cpp:12975
///
bool BeginPopupContextItem(const char* str_id = NULL, ImGuiPopupFlags popup_flags = 1)
///
///
///
///
/// Popups: open+begin combined functions helpers
/// - Helpers to do OpenPopup+BeginPopup where the Open action is triggered by e.g. hovering an item and right-clicking.
/// - They are convenient to easily create context menus, hence the name.
/// - IMPORTANT: Notice that BeginPopupContextXXX takes ImGuiPopupFlags just like OpenPopup() and unlike BeginPopup(). For full consistency, we may add ImGuiWindowFlags to the BeginPopupContextXXX functions in the future.
/// - IMPORTANT: Notice that we exceptionally default their flags to 1 (== ImGuiPopupFlags_MouseButtonRight) for backward compatibility with older API taking 'int mouse_button = 1' parameter, so if you add other flags remember to re-add the ImGuiPopupFlags_MouseButtonRight.
///
///
/// This is a helper to handle the simplest case of associating one named popup to one given widget.
/// - To create a popup associated to the last item, you generally want to pass a NULL value to str_id.
/// - To create a popup with a specific identifier, pass it in str_id.
/// - This is useful when using using BeginPopupContextItem() on an item which doesn't have an identifier, e.g. a Text() call.
/// - This is useful when multiple code locations may want to manipulate/open the same popup, given an explicit id.
/// - You may want to handle the whole on user side if you have specific needs (e.g. tweaking IsItemHovered() parameters).
/// This is essentially the same as:
/// id = str_id ? GetID(str_id) : GetItemID();
/// OpenPopupOnItemClick(str_id, ImGuiPopupFlags_MouseButtonRight);
/// return BeginPopup(id);
/// Which is essentially the same as:
/// id = str_id ? GetID(str_id) : GetItemID();
/// if (IsItemHovered() && IsMouseReleased(ImGuiMouseButton_Right))
/// OpenPopup(id);
/// return BeginPopup(id);
/// The main difference being that this is tweaked to avoid computing the ID twice.
///
///
[LibraryImport("imgui")]
public static unsafe partial Bool8 BeginPopupContextItem(byte* str_id, ImGuiPopupFlags popup_flags);
}
}
}