From d151267eb059dcfd8ed1866258d26d33ef962245 Mon Sep 17 00:00:00 2001 From: Tig Date: Fri, 17 May 2024 12:24:38 -0400 Subject: [PATCH] AddOrSubtract.cs (one type per file!) --- Terminal.Gui/View/Layout/AddOrSubtract.cs | 17 +++++++++++++++++ Terminal.Gui/View/Layout/Dim.cs | 19 +------------------ Terminal.Gui/View/Layout/Pos.cs | 6 ++---- 3 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 Terminal.Gui/View/Layout/AddOrSubtract.cs diff --git a/Terminal.Gui/View/Layout/AddOrSubtract.cs b/Terminal.Gui/View/Layout/AddOrSubtract.cs new file mode 100644 index 000000000..83d1dd12c --- /dev/null +++ b/Terminal.Gui/View/Layout/AddOrSubtract.cs @@ -0,0 +1,17 @@ +namespace Terminal.Gui; + +/// +/// Describes whether an operation should add or subtract values. +/// +public enum AddOrSubtract +{ + /// + /// The operation should use addition. + /// + Add = 0, + + /// + /// The operation should use subtraction. + /// + Subtract = 1 +} diff --git a/Terminal.Gui/View/Layout/Dim.cs b/Terminal.Gui/View/Layout/Dim.cs index 47b382f2c..a04b9798d 100644 --- a/Terminal.Gui/View/Layout/Dim.cs +++ b/Terminal.Gui/View/Layout/Dim.cs @@ -565,28 +565,11 @@ public class DimAuto () : Dim } -/// -/// Describes whether an operation should add or subtract values. -/// -public enum AddOrSubtract -{ - /// - /// The operation should use addition. - /// - Add = 0, - - /// - /// The operation should use subtraction. - /// - Subtract = 1 -} - /// /// Represents a dimension that is a combination of two other dimensions. /// /// -/// Indicates whether the two dimensions are added or subtracted. If , the dimensions are added, -/// otherwise they are subtracted. +/// Indicates whether the two dimensions are added or subtracted. /// /// /// This is a low-level API that is typically used internally by the layout system. Use the various static diff --git a/Terminal.Gui/View/Layout/Pos.cs b/Terminal.Gui/View/Layout/Pos.cs index 10fe58eee..1935e3c02 100644 --- a/Terminal.Gui/View/Layout/Pos.cs +++ b/Terminal.Gui/View/Layout/Pos.cs @@ -510,16 +510,14 @@ public class PosCenter : Pos /// /// /// -/// Indicates whether the two positions are added or subtracted. If , the positions are added, -/// otherwise they are subtracted. +/// Indicates whether the two positions are added or subtracted. /// /// The left position. /// The right position. public class PosCombine (AddOrSubtract add, Pos left, Pos right) : Pos { /// - /// Gets whether the two positions are added or subtracted. If , the positions are added, - /// otherwise they are subtracted. + /// Gets whether the two positions are added or subtracted. /// public AddOrSubtract Add { get; } = add;