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.. }'
IMGUI_APIvoidOpenPopup(constchar*str_id);// mark popup as open. popups are closed when user click outside, or activate a pressable item, or CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level).
IMGUI_APIboolIsPopupOpen(constchar*str_id);// return true if the popup is open
IMGUI_APIboolBeginPopup(constchar*str_id);// return true if the popup is open, and you can start outputting to it. only call EndPopup() if BeginPopup() returned true!
IMGUI_APIboolBeginPopupModal(constchar*name,bool*p_open=NULL,ImGuiWindowFlagsextra_flags=0);// modal dialog (can't close them by clicking outside)
IMGUI_APIboolBeginPopupContextItem(constchar*str_id,intmouse_button=1);// helper to open and begin popup when clicked on last item. read comments in .cpp!