/// <summary> /// Adds a <see cref="Terminal.Gui.Pos"/> to a <see cref="Terminal.Gui.Pos"/>, yielding a new <see cref="T:Terminal.Gui.Pos"/>. /// </summary> /// <param name="left">The first <see cref="Terminal.Gui.Pos"/> to add.</param> /// <param name="right">The second <see cref="Terminal.Gui.Pos"/> to add.</param> /// <returns>The <see cref="T:Terminal.Gui.Pos"/> that is the sum of the values of <c>left</c> and <c>right</c>.</returns> public static Pos operator +(Pos left, Pos right) { PosCombine newPos = new PosCombine(true, left, right); if (posCombine?.ToString() != newPos.ToString()) { ((PosView)left).Target.SetNeedsLayout(); } return(posCombine = newPos); }
/// <summary> /// Adds a <see cref="Terminal.Gui.Pos"/> to a <see cref="Terminal.Gui.Pos"/>, yielding a new <see cref="Pos"/>. /// </summary> /// <param name="left">The first <see cref="Terminal.Gui.Pos"/> to add.</param> /// <param name="right">The second <see cref="Terminal.Gui.Pos"/> to add.</param> /// <returns>The <see cref="Pos"/> that is the sum of the values of <c>left</c> and <c>right</c>.</returns> public static Pos operator +(Pos left, Pos right) { PosCombine newPos = new PosCombine(true, left, right); if (posCombine?.ToString() != newPos.ToString()) { var view = left as PosView; if (view != null) { view.Target.SetNeedsLayout(); } } return(posCombine = newPos); }
static void SetPosCombine(Pos left, PosCombine newPos) { if (posCombine?.ToString() != newPos.ToString()) { var view = left as PosView; if (view != null) { view.Target.SetNeedsLayout(); } } }