/// <summary> /// Mouse has left the view. /// </summary> /// <param name="c">Reference to the source control instance.</param> /// <param name="next">Reference to view that is next to have the mouse.</param> public virtual void MouseLeave(Control c, ViewBase next) { // Only if mouse is leaving all the children monitored by controller. if (!_target.ContainsRecurse(next)) { _mouseOver = false; _mouseReallyOver = false; _mouseDown = false; ViewManager.ClearTarget(this); UpdateTarget(); } }
/// <summary> /// Determines whether any part of the view hierarchy is the specified view. /// </summary> /// <param name="item">ViewBase reference.</param> /// <returns>True if view found; otherwise false.</returns> public override bool ContainsRecurse(ViewBase item) { return(_child.ContainsRecurse(item)); }
/// <summary> /// Discovers if the provided view is part of the button. /// </summary> /// <param name="next">View to investigate.</param> /// <returns>True is part of button; otherwise false.</returns> protected virtual bool ViewIsPartOfButton(ViewBase next) { return(_target.ContainsRecurse(next)); }