// Child menus typically request _any_ position within the parent menu item, and then our FindBestPopupWindowPos() function will move the new menu outside the parent bounds.
// This is how we end up with child menus appearing (most-commonly) on the right of the parent menu.
IM_ASSERT(window_pos_set_by_api);
floathorizontal_overlap=style.ItemSpacing.x;// We want some overlap to convey the relative depth of each popup (currently the amount of overlap it is hard-coded to style.ItemSpacing.x, may need to introduce another style value).
rect_to_avoid=ImRect(parent_window->Pos.x+style.ItemSpacing.x,-FLT_MAX,parent_window->Pos.x+parent_window->Size.x-style.ItemSpacing.x-parent_window->ScrollbarSizes.x,FLT_MAX);// We want some overlap to convey the relative depth of each popup (here hard-coded to 4)