// Enforce cdecl calling convention for functions called by the standard library, in case compilation settings changed the default to e.g. __vectorcall
// FIXME: Provided a rectangle perhaps e.g. a BeginMenuBarEx() could be used anywhere..
// Currently the main responsibility of this function being to setup clip-rect + horizontal layout + menu navigation layer.
// Ideally we also want this to be responsible for claiming space out of the main window scrolling rectangle, in which case ImGuiWindowFlags_MenuBar will become unnecessary.
// Then later the same system could be used for multiple menu-bars, scrollbars, side-bars.
boolImGui::BeginMenuBar()
{
ImGuiWindow*window=GetCurrentWindow();
@ -5956,7 +5960,7 @@ bool ImGui::BeginMenuBar()
returnfalse;
IM_ASSERT(!window->DC.MenuBarAppending);
BeginGroup();// Backup position on layer 0
BeginGroup();// Backup position on layer 0 // FIXME: Misleading to use a group for that backup/restore
PushID("##menubar");
// We don't clip with current window clipping rectangle as it is already set to the area below. However we clip with window full rect.