AddOrSubtract.cs (one type per file!) <g>

This commit is contained in:
Tig
2024-05-17 12:24:38 -04:00
parent d4d2c92142
commit d151267eb0
3 changed files with 20 additions and 22 deletions

View File

@@ -0,0 +1,17 @@
namespace Terminal.Gui;
/// <summary>
/// Describes whether an operation should add or subtract values.
/// </summary>
public enum AddOrSubtract
{
/// <summary>
/// The operation should use addition.
/// </summary>
Add = 0,
/// <summary>
/// The operation should use subtraction.
/// </summary>
Subtract = 1
}

View File

@@ -565,28 +565,11 @@ public class DimAuto () : Dim
}
/// <summary>
/// Describes whether an operation should add or subtract values.
/// </summary>
public enum AddOrSubtract
{
/// <summary>
/// The operation should use addition.
/// </summary>
Add = 0,
/// <summary>
/// The operation should use subtraction.
/// </summary>
Subtract = 1
}
/// <summary>
/// Represents a dimension that is a combination of two other dimensions.
/// </summary>
/// <param name="add">
/// Indicates whether the two dimensions are added or subtracted. If <see langword="true"/>, the dimensions are added,
/// otherwise they are subtracted.
/// Indicates whether the two dimensions are added or subtracted.
/// </param>
/// <remarks>
/// This is a low-level API that is typically used internally by the layout system. Use the various static

View File

@@ -510,16 +510,14 @@ public class PosCenter : Pos
/// </para>
/// </remarks>
/// <param name="add">
/// Indicates whether the two positions are added or subtracted. If <see langword="true"/>, the positions are added,
/// otherwise they are subtracted.
/// Indicates whether the two positions are added or subtracted.
/// </param>
/// <param name="left">The left position.</param>
/// <param name="right">The right position.</param>
public class PosCombine (AddOrSubtract add, Pos left, Pos right) : Pos
{
/// <summary>
/// Gets whether the two positions are added or subtracted. If <see langword="true"/>, the positions are added,
/// otherwise they are subtracted.
/// Gets whether the two positions are added or subtracted.
/// </summary>
public AddOrSubtract Add { get; } = add;