// Handle the edge case of a popup being closed while clicking in its empty space.
// Handle the edge case of a popup being closed while clicking in its empty space.
// If we try to focus it, FocusWindow() > ClosePopupsOverWindow() will accidentally close any parent popups because they are not linked together any more.
// If we try to focus it, FocusWindow() > ClosePopupsOverWindow() will accidentally close any parent popups because they are not linked together any more.
@ -161,6 +161,7 @@ typedef int ImGuiFocusedFlags; // -> enum ImGuiFocusedFlags_ // Flags: f
typedefintImGuiHoveredFlags;// -> enum ImGuiHoveredFlags_ // Flags: for IsItemHovered(), IsWindowHovered() etc.
typedefintImGuiHoveredFlags;// -> enum ImGuiHoveredFlags_ // Flags: for IsItemHovered(), IsWindowHovered() etc.
typedefintImGuiInputTextFlags;// -> enum ImGuiInputTextFlags_ // Flags: for InputText(), InputTextMultiline()
typedefintImGuiInputTextFlags;// -> enum ImGuiInputTextFlags_ // Flags: for InputText(), InputTextMultiline()
typedefintImGuiKeyModFlags;// -> enum ImGuiKeyModFlags_ // Flags: for io.KeyMods (Ctrl/Shift/Alt/Super)
typedefintImGuiKeyModFlags;// -> enum ImGuiKeyModFlags_ // Flags: for io.KeyMods (Ctrl/Shift/Alt/Super)
typedefintImGuiPopupFlags;// -> enum ImGuiPopupFlags_ // Flags: for OpenPopup*(), BeginPopupContext*(), IsPopupOpen()
typedefintImGuiSelectableFlags;// -> enum ImGuiSelectableFlags_ // Flags: for Selectable()
typedefintImGuiSelectableFlags;// -> enum ImGuiSelectableFlags_ // Flags: for Selectable()
typedefintImGuiTabBarFlags;// -> enum ImGuiTabBarFlags_ // Flags: for BeginTabBar()
typedefintImGuiTabBarFlags;// -> enum ImGuiTabBarFlags_ // Flags: for BeginTabBar()
typedefintImGuiTabItemFlags;// -> enum ImGuiTabItemFlags_ // Flags: for BeginTabItem()
typedefintImGuiTabItemFlags;// -> enum ImGuiTabItemFlags_ // Flags: for BeginTabItem()
@ -612,13 +613,17 @@ namespace ImGui
IMGUI_APIvoidOpenPopup(constchar*str_id);// call to mark popup as open (don't call every frame!).
IMGUI_APIvoidOpenPopup(constchar*str_id);// call to mark popup as open (don't call every frame!).
IMGUI_APIboolOpenPopupContextItem(constchar*str_id=NULL,ImGuiMouseButtonmouse_b=1);// helper to open popup when clicked on last item. return true when just opened. (note: actually triggers on the mouse _released_ event to be consistent with popup behaviors)
IMGUI_APIboolOpenPopupContextItem(constchar*str_id=NULL,ImGuiMouseButtonmouse_b=1);// helper to open popup when clicked on last item. return true when just opened. (note: actually triggers on the mouse _released_ event to be consistent with popup behaviors)
IMGUI_APIvoidCloseCurrentPopup();// manually close the popup we have begin-ed into.
IMGUI_APIvoidCloseCurrentPopup();// manually close the popup we have begin-ed into.
IMGUI_APIboolIsPopupOpen(constchar*str_id);// return true if the popup is open at the current BeginPopup() level of the popup stack
// Popups: open+begin combined functions helpers
// 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.
// - 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.
// - They are convenient to easily create context menus, hence the name.
IMGUI_APIboolBeginPopupContextItem(constchar*str_id=NULL,ImGuiMouseButtonmouse_b=1);// open+begin popup when clicked on last item. if you can pass a NULL str_id only if the previous item had an id. 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!
IMGUI_APIboolBeginPopupContextItem(constchar*str_id=NULL,ImGuiMouseButtonmouse_b=1);// open+begin popup when clicked on last item. if you can pass a NULL str_id only if the previous item had an id. 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!
IMGUI_APIboolBeginPopupContextWindow(constchar*str_id=NULL,ImGuiMouseButtonmouse_b=1,boolalso_over_items=true);// open+begin popup when clicked on current window.
IMGUI_APIboolBeginPopupContextWindow(constchar*str_id=NULL,ImGuiMouseButtonmouse_b=1,boolalso_over_items=true);// open+begin popup when clicked on current window.
IMGUI_APIboolBeginPopupContextVoid(constchar*str_id=NULL,ImGuiMouseButtonmouse_b=1);// open+begin popup when clicked in void (where there are no windows).
IMGUI_APIboolBeginPopupContextVoid(constchar*str_id=NULL,ImGuiMouseButtonmouse_b=1);// open+begin popup when clicked in void (where there are no windows).
// Popups: test function
// - IsPopupOpen(): return true if the popup is open at the current BeginPopup() level of the popup stack.
// - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId: return true if any popup is open at the current BeginPopup() level of the popup stack.
// - IsPopupOpen() with ImGuiPopupFlags_AnyPopupId + ImGuiPopupFlags_AnyPopupLevel: return true if any popup is open.
IMGUI_APIboolIsPopupOpen(constchar*str_id,ImGuiPopupFlagsflags=0);// return true if the popup is open.
// Columns
// Columns
// - You can also use SameLine(pos_x) to mimic simplified columns.
// - You can also use SameLine(pos_x) to mimic simplified columns.
// Sub-menus are ChildWindow so that mouse can be hovering across them (otherwise top-most popup menu would steal focus and not allow hovering on parent menu)
// Sub-menus are ChildWindow so that mouse can be hovering across them (otherwise top-most popup menu would steal focus and not allow hovering on parent menu)
if(!enabled)// explicitly close if an open menu becomes disabled, facilitate users code a lot in pattern such as 'if (BeginMenu("options", has_object)) { ..use object.. }'
if(!enabled)// explicitly close if an open menu becomes disabled, facilitate users code a lot in pattern such as 'if (BeginMenu("options", has_object)) { ..use object.. }'