Exemple #1
0
        /// <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);
        }
Exemple #2
0
        /// <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);
        }
Exemple #3
0
 static void SetPosCombine(Pos left, PosCombine newPos)
 {
     if (posCombine?.ToString() != newPos.ToString())
     {
         var view = left as PosView;
         if (view != null)
         {
             view.Target.SetNeedsLayout();
         }
     }
 }