// This is a sensible default, but widgets are free to override it after calling ItemAdd()
constboolhovered=IsMouseHoveringRect(bb);
//const bool hovered = (g.ActiveId == 0 || (id && g.ActiveId == *id) || g.ActiveIdIsFocusedOnly) && IsMouseHoveringRect(bb); // matching the behavior of IsHovered(), not always what the user wants?
window->DC.LastItemHovered=hovered;
ImGuiState&g=*GImGui;
if(IsMouseHoveringRect(bb))
{
// Matching the behavior of IsHovered() but ignore if ActiveId==window->MoveID (we clicked on the window background)
// So that clicking on items with no active id such as Text() still returns true with IsItemHovered()
IMGUI_APIboolIsItemHovered();// was the last item hovered by mouse?
IMGUI_APIboolIsItemHoveredRectOnly();// was the last item hovered by mouse? even if another item is active while we are hovering this.
IMGUI_APIboolIsItemActive();// was the last item active? (e.g. button being held, text field being edited- items that don't interact will always return false)
IMGUI_APIboolIsAnyItemActive();//
IMGUI_APIImVec2GetItemActiveDragDelta();// mouse delta from the time the item first got active