diff --git a/Terminal.Gui/Drawing/Justification.cs b/Terminal.Gui/Drawing/Justification.cs
index 4273acb95..d2b87a9a6 100644
--- a/Terminal.Gui/Drawing/Justification.cs
+++ b/Terminal.Gui/Drawing/Justification.cs
@@ -4,13 +4,13 @@ using static Terminal.Gui.Pos;
namespace Terminal.Gui;
///
-/// Controls how the justifies items within a container.
+/// Controls how the aligns items within a container.
///
-public enum Justification
+public enum Alignment
{
///
/// The items will be aligned to the left.
- /// Set to to ensure at least one space between
+ /// Set to to ensure at least one space between
/// each item.
///
///
@@ -27,14 +27,14 @@ public enum Justification
///
/// The items will be aligned to the top.
- /// Set to to ensure at least one line between
+ /// Set to to ensure at least one line between
/// each item.
///
Top = Left,
///
/// The items will be aligned to the right.
- /// Set to to ensure at least one space between
+ /// Set to to ensure at least one space between
/// each item.
///
///
@@ -51,15 +51,15 @@ public enum Justification
///
/// The items will be aligned to the bottom.
- /// Set to to ensure at least one line between
+ /// Set to to ensure at least one line between
/// each item.
///
Bottom = Right,
///
/// The group will be centered in the container.
- /// If centering is not possible, the group will be left-justified.
- /// Set to to ensure at least one space between
+ /// If centering is not possible, the group will be left-aligned.
+ /// Set to to ensure at least one space between
/// each item.
///
///
@@ -77,7 +77,7 @@ public enum Justification
///
/// The items will be justified. Space will be added between the items such that the first item
/// is at the start and the right side of the last item against the end.
- /// Set to to ensure at least one space between
+ /// Set to to ensure at least one space between
/// each item.
///
///
@@ -94,7 +94,7 @@ public enum Justification
///
/// The first item will be aligned to the left and the remaining will aligned to the right.
- /// Set to to ensure at least one space between
+ /// Set to to ensure at least one space between
/// each item.
///
///
@@ -111,14 +111,14 @@ public enum Justification
///
/// The first item will be aligned to the top and the remaining will aligned to the bottom.
- /// Set to to ensure at least one line between
+ /// Set to to ensure at least one line between
/// each item.
///
FirstTopRestBottom = FirstLeftRestRight,
///
/// The last item will be aligned to the right and the remaining will aligned to the left.
- /// Set to to ensure at least one space between
+ /// Set to to ensure at least one space between
/// each item.
///
///
@@ -135,29 +135,29 @@ public enum Justification
///
/// The last item will be aligned to the bottom and the remaining will aligned to the left.
- /// Set to to ensure at least one line between
+ /// Set to to ensure at least one line between
/// each item.
///
LastBottomRestTop = LastRightRestLeft,
}
///
-/// Justifies items within a container based on the specified .
+/// Aligns items within a container based on the specified .
///
-public class Justifier : INotifyPropertyChanged
+public class Aligner : INotifyPropertyChanged
{
- private Justification _justification;
+ private Alignment _alignment;
///
- /// Gets or sets how the justifies items within a container.
+ /// Gets or sets how the aligns items within a container.
///
- public Justification Justification
+ public Alignment Alignment
{
- get => _justification;
+ get => _alignment;
set
{
- _justification = value;
- PropertyChanged?.Invoke (this, new PropertyChangedEventArgs (nameof (Justification)));
+ _alignment = value;
+ PropertyChanged?.Invoke (this, new PropertyChangedEventArgs (nameof (Alignment)));
}
}
@@ -179,7 +179,7 @@ public class Justifier : INotifyPropertyChanged
private bool _putSpaceBetweenItems;
///
- /// Gets or sets whether puts a space is placed between items. Default is
+ /// Gets or sets whether puts a space is placed between items. Default is
/// . If , a space will be
/// placed between each item, which is useful for justifying text.
///
@@ -203,25 +203,25 @@ public class Justifier : INotifyPropertyChanged
public event PropertyChangedEventHandler PropertyChanged;
///
- /// Takes a list of items and returns their positions when justified within a container
+ /// Takes a list of items and returns their positions when aligned within a container
/// wide based on the specified
- /// .
+ /// .
///
- /// The sizes of the items to justify.
+ /// The sizes of the items to align.
/// The locations of the items, from left to right.
- public int [] Justify (int [] sizes) { return Justify (Justification, PutSpaceBetweenItems, ContainerSize, sizes); }
+ public int [] Align (int [] sizes) { return Align (Alignment, PutSpaceBetweenItems, ContainerSize, sizes); }
///
- /// Takes a list of items and returns their positions when justified within a container
+ /// Takes a list of items and returns their positions when aligned within a container
/// wide based on the specified
- /// .
+ /// .
///
- /// The sizes of the items to justify.
- /// The justification style.
+ /// The sizes of the items to align.
+ /// Specifies how the items will be aligned.
/// Puts a space is placed between items.
/// The size of the container.
/// The locations of the items, from left to right.
- public static int [] Justify (Justification justification, bool putSpaceBetweenItems, int containerSize, int [] sizes)
+ public static int [] Align (Alignment alignment, bool putSpaceBetweenItems, int containerSize, int [] sizes)
{
if (sizes.Length == 0)
{
@@ -246,9 +246,9 @@ public class Justifier : INotifyPropertyChanged
spaces = containerSize - totalItemsSize;
}
- switch (justification)
+ switch (alignment)
{
- case Justification.Left:
+ case Alignment.Left:
var currentPosition = 0;
for (var i = 0; i < sizes.Length; i++)
@@ -269,7 +269,7 @@ public class Justifier : INotifyPropertyChanged
}
break;
- case Justification.Right:
+ case Alignment.Right:
currentPosition = containerSize - totalItemsSize - spaces;
for (var i = 0; i < sizes.Length; i++)
@@ -283,7 +283,7 @@ public class Justifier : INotifyPropertyChanged
break;
- case Justification.Centered:
+ case Alignment.Centered:
if (sizes.Length > 1)
{
// remaining space to be distributed before first and after the items
@@ -314,7 +314,7 @@ public class Justifier : INotifyPropertyChanged
break;
- case Justification.Justified:
+ case Alignment.Justified:
int spaceBetween = sizes.Length > 1 ? (containerSize - totalItemsSize) / (sizes.Length - 1) : 0;
int remainder = sizes.Length > 1 ? (containerSize - totalItemsSize) % (sizes.Length - 1) : 0;
currentPosition = 0;
@@ -330,7 +330,7 @@ public class Justifier : INotifyPropertyChanged
break;
// 111 2222 33333
- case Justification.LastRightRestLeft:
+ case Alignment.LastRightRestLeft:
if (sizes.Length > 1)
{
if (totalItemsSize > containerSize)
@@ -367,7 +367,7 @@ public class Justifier : INotifyPropertyChanged
break;
// 111 2222 33333
- case Justification.FirstLeftRestRight:
+ case Alignment.FirstLeftRestRight:
if (sizes.Length > 1)
{
currentPosition = 0;
@@ -402,7 +402,7 @@ public class Justifier : INotifyPropertyChanged
break;
default:
- throw new ArgumentOutOfRangeException (nameof (justification), justification, null);
+ throw new ArgumentOutOfRangeException (nameof (alignment), alignment, null);
}
return positions;
diff --git a/Terminal.Gui/Drawing/Thickness.cs b/Terminal.Gui/Drawing/Thickness.cs
index 68f78c3d3..3ee360f50 100644
--- a/Terminal.Gui/Drawing/Thickness.cs
+++ b/Terminal.Gui/Drawing/Thickness.cs
@@ -232,8 +232,8 @@ public class Thickness : IEquatable
var tf = new TextFormatter
{
Text = label is null ? string.Empty : $"{label} {this}",
- Justification = Justification.Centered,
- VerticalJustification = Justification.Bottom,
+ Justification = Alignment.Centered,
+ VerticalJustification = Alignment.Bottom,
AutoSize = true
};
tf.Draw (rect, Application.Driver.CurrentAttribute, Application.Driver.CurrentAttribute, rect);
diff --git a/Terminal.Gui/Text/TextFormatter.cs b/Terminal.Gui/Text/TextFormatter.cs
index efa179a7e..c05b84e7e 100644
--- a/Terminal.Gui/Text/TextFormatter.cs
+++ b/Terminal.Gui/Text/TextFormatter.cs
@@ -17,14 +17,14 @@ public class TextFormatter
private Size _size;
private int _tabWidth = 4;
private string _text;
- private Justification _textJustification;
+ private Alignment _textJustification;
private TextDirection _textDirection;
- private Justification _textVerticalJustification;
+ private Alignment _textVerticalJustification;
private bool _wordWrap = true;
/// Get or sets the horizontal text justification.
/// The text justification.
- public Justification Justification
+ public Alignment Justification
{
get => _textJustification;
set => _textJustification = EnableNeedsFormat (value);
@@ -34,7 +34,7 @@ public class TextFormatter
///
/// Used when is using to resize the view's to fit .
///
- /// AutoSize is ignored if is used.
+ /// AutoSize is ignored if is used.
///
///
public bool AutoSize
@@ -224,7 +224,7 @@ public class TextFormatter
/// Gets or sets the vertical text-justification.
/// The text vertical justification.
- public Justification VerticalJustification
+ public Alignment VerticalJustification
{
get => _textVerticalJustification;
set => _textVerticalJustification = EnableNeedsFormat (value);
@@ -320,7 +320,7 @@ public class TextFormatter
int x = 0, y = 0;
// Horizontal Justification
- if (Justification is Justification.Right)
+ if (Justification is Alignment.Right)
{
if (isVertical)
{
@@ -335,7 +335,7 @@ public class TextFormatter
CursorPosition = screen.Width - runesWidth + (_hotKeyPos > -1 ? _hotKeyPos : 0);
}
}
- else if (Justification is Justification.Left)
+ else if (Justification is Alignment.Left)
{
if (isVertical)
{
@@ -351,7 +351,7 @@ public class TextFormatter
CursorPosition = _hotKeyPos > -1 ? _hotKeyPos : 0;
}
- else if (Justification is Justification.Justified)
+ else if (Justification is Alignment.Justified)
{
if (isVertical)
{
@@ -374,7 +374,7 @@ public class TextFormatter
CursorPosition = _hotKeyPos > -1 ? _hotKeyPos : 0;
}
- else if (Justification is Justification.Centered)
+ else if (Justification is Alignment.Centered)
{
if (isVertical)
{
@@ -400,7 +400,7 @@ public class TextFormatter
}
// Vertical Justification
- if (VerticalJustification is Justification.Bottom)
+ if (VerticalJustification is Alignment.Bottom)
{
if (isVertical)
{
@@ -411,7 +411,7 @@ public class TextFormatter
y = screen.Bottom - linesFormatted.Count + line;
}
}
- else if (VerticalJustification is Justification.Top)
+ else if (VerticalJustification is Alignment.Top)
{
if (isVertical)
{
@@ -422,7 +422,7 @@ public class TextFormatter
y = screen.Top + line;
}
}
- else if (VerticalJustification is Justification.Justified)
+ else if (VerticalJustification is Alignment.Justified)
{
if (isVertical)
{
@@ -436,7 +436,7 @@ public class TextFormatter
line < linesFormatted.Count - 1 ? screen.Height - interval <= 1 ? screen.Top + 1 : screen.Top + line * interval : screen.Bottom - 1;
}
}
- else if (VerticalJustification is Justification.Centered)
+ else if (VerticalJustification is Alignment.Centered)
{
if (isVertical)
{
@@ -474,8 +474,8 @@ public class TextFormatter
{
if (idx < 0
|| (isVertical
- ? VerticalJustification != Justification.Bottom && current < 0
- : Justification != Justification.Right && x + current + colOffset < 0))
+ ? VerticalJustification != Alignment.Bottom && current < 0
+ : Justification != Alignment.Right && x + current + colOffset < 0))
{
current++;
@@ -564,7 +564,7 @@ public class TextFormatter
if (HotKeyPos > -1 && idx == HotKeyPos)
{
- if ((isVertical && VerticalJustification == Justification.Justified) || (!isVertical && Justification == Justification.Justified))
+ if ((isVertical && VerticalJustification == Alignment.Justified) || (!isVertical && Justification == Alignment.Justified))
{
CursorPosition = idx - start;
}
@@ -702,7 +702,7 @@ public class TextFormatter
_lines = Format (
text,
Size.Height,
- VerticalJustification == Justification.Justified,
+ VerticalJustification == Alignment.Justified,
Size.Width > colsWidth && WordWrap,
PreserveTrailingSpaces,
TabWidth,
@@ -726,7 +726,7 @@ public class TextFormatter
_lines = Format (
text,
Size.Width,
- Justification == Justification.Justified,
+ Justification == Alignment.Justified,
Size.Height > 1 && WordWrap,
PreserveTrailingSpaces,
TabWidth,
@@ -1034,7 +1034,7 @@ public class TextFormatter
List runes = StripCRLF (text).ToRuneList ();
int start = Math.Max (
- !runes.Contains ((Rune)' ') && textFormatter is { VerticalJustification: Justification.Bottom } && IsVerticalDirection (textDirection)
+ !runes.Contains ((Rune)' ') && textFormatter is { VerticalJustification: Alignment.Bottom } && IsVerticalDirection (textDirection)
? runes.Count - width
: 0,
0);
@@ -1260,13 +1260,13 @@ public class TextFormatter
public static string ClipAndJustify (
string text,
int width,
- Justification textJustification,
+ Alignment textJustification,
TextDirection textDirection = TextDirection.LeftRight_TopBottom,
int tabWidth = 0,
TextFormatter textFormatter = null
)
{
- return ClipAndJustify (text, width, textJustification == Justification.Justified, textDirection, tabWidth, textFormatter);
+ return ClipAndJustify (text, width, textJustification == Alignment.Justified, textDirection, tabWidth, textFormatter);
}
/// Justifies text within a specified width.
@@ -1307,12 +1307,12 @@ public class TextFormatter
{
if (IsHorizontalDirection (textDirection))
{
- if (textFormatter is { Justification: Justification.Right })
+ if (textFormatter is { Justification: Alignment.Right })
{
return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection);
}
- if (textFormatter is { Justification: Justification.Centered })
+ if (textFormatter is { Justification: Alignment.Centered })
{
return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection);
}
@@ -1322,12 +1322,12 @@ public class TextFormatter
if (IsVerticalDirection (textDirection))
{
- if (textFormatter is { VerticalJustification: Justification.Bottom })
+ if (textFormatter is { VerticalJustification: Alignment.Bottom })
{
return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection);
}
- if (textFormatter is { VerticalJustification: Justification.Centered })
+ if (textFormatter is { VerticalJustification: Alignment.Centered })
{
return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection);
}
@@ -1345,14 +1345,14 @@ public class TextFormatter
if (IsHorizontalDirection (textDirection))
{
- if (textFormatter is { Justification: Justification.Right })
+ if (textFormatter is { Justification: Alignment.Right })
{
if (GetRuneWidth (text, tabWidth, textDirection) > width)
{
return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection);
}
}
- else if (textFormatter is { Justification: Justification.Centered })
+ else if (textFormatter is { Justification: Alignment.Centered })
{
return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection);
}
@@ -1364,14 +1364,14 @@ public class TextFormatter
if (IsVerticalDirection (textDirection))
{
- if (textFormatter is { VerticalJustification: Justification.Bottom })
+ if (textFormatter is { VerticalJustification: Alignment.Bottom })
{
if (runes.Count - zeroLength > width)
{
return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection);
}
}
- else if (textFormatter is { VerticalJustification: Justification.Centered })
+ else if (textFormatter is { VerticalJustification: Alignment.Centered })
{
return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection);
}
@@ -1501,7 +1501,7 @@ public class TextFormatter
public static List Format (
string text,
int width,
- Justification textJustification,
+ Alignment textJustification,
bool wordWrap,
bool preserveTrailingSpaces = false,
int tabWidth = 0,
@@ -1513,7 +1513,7 @@ public class TextFormatter
return Format (
text,
width,
- textJustification == Justification.Justified,
+ textJustification == Alignment.Justified,
wordWrap,
preserveTrailingSpaces,
tabWidth,
diff --git a/Terminal.Gui/View/Layout/PosDim.cs b/Terminal.Gui/View/Layout/PosDim.cs
index ce2f3d1fc..79bd498b2 100644
--- a/Terminal.Gui/View/Layout/PosDim.cs
+++ b/Terminal.Gui/View/Layout/PosDim.cs
@@ -211,7 +211,7 @@ public class Pos
///
/// The optional, unique identifier for the set of views to justify according to .
///
- public static Pos Justify (Justification justification, int groupId = 0) { return new PosJustify (justification, groupId); }
+ public static Pos Justify (Alignment justification, int groupId = 0) { return new PosJustify (justification, groupId); }
/// Serves as the default hash function.
/// A hash code for the current object.
@@ -526,7 +526,7 @@ public class Pos
///
/// Gets the justification settings.
///
- public Justifier Justifier { get; } = new ();
+ public Aligner Justifier { get; } = new ();
///
@@ -542,7 +542,7 @@ public class Pos
{
return;
}
- Justifier firstInGroup = null;
+ Aligner firstInGroup = null;
List dimensionsList = new ();
List viewsInGroup = views.Where (
v =>
@@ -585,7 +585,7 @@ public class Pos
}
firstInGroup.ContainerSize = size;
- var locations = firstInGroup.Justify (dimensionsList.ToArray ());
+ var locations = firstInGroup.Align (dimensionsList.ToArray ());
for (var index = 0; index < viewsInGroup.Count; index++)
{
@@ -604,10 +604,10 @@ public class Pos
///
///
/// The unique identifier for the set of views to justify according to .
- public PosJustify (Justification justification, int groupId = 0)
+ public PosJustify (Alignment justification, int groupId = 0)
{
Justifier.PutSpaceBetweenItems = true;
- Justifier.Justification = justification;
+ Justifier.Alignment = justification;
_groupId = groupId;
Justifier.PropertyChanged += Justifier_PropertyChanged;
}
@@ -632,7 +632,7 @@ public class Pos
///
public override string ToString ()
{
- return $"Justify(groupId={_groupId}, justification={Justifier.Justification})";
+ return $"Justify(groupId={_groupId}, justification={Justifier.Alignment})";
}
internal override int Anchor (int width)
diff --git a/Terminal.Gui/View/ViewText.cs b/Terminal.Gui/View/ViewText.cs
index 306a67cc3..6e2ec991a 100644
--- a/Terminal.Gui/View/ViewText.cs
+++ b/Terminal.Gui/View/ViewText.cs
@@ -87,7 +87,7 @@ public partial class View
/// or are using , the will be adjusted to fit the text.
///
/// The text justification.
- public virtual Justification TextJustification
+ public virtual Alignment TextJustification
{
get => TextFormatter.Justification;
set
@@ -130,7 +130,7 @@ public partial class View
/// or are using , the will be adjusted to fit the text.
///
/// The vertical text justification.
- public virtual Justification VerticalTextJustification
+ public virtual Alignment VerticalTextJustification
{
get => TextFormatter.VerticalJustification;
set
diff --git a/Terminal.Gui/Views/Button.cs b/Terminal.Gui/Views/Button.cs
index 3530b42f6..0a0fa5040 100644
--- a/Terminal.Gui/Views/Button.cs
+++ b/Terminal.Gui/Views/Button.cs
@@ -37,8 +37,8 @@ public class Button : View
/// The width of the is computed based on the text length. The height will always be 1.
public Button ()
{
- Justification = Justification.Centered;
- VerticalJustification = Justification.Centered;
+ TextJustification = Alignment.Centered;
+ VerticalTextJustification = Alignment.Centered;
_leftBracket = Glyphs.LeftBracket;
_rightBracket = Glyphs.RightBracket;
diff --git a/Terminal.Gui/Views/CheckBox.cs b/Terminal.Gui/Views/CheckBox.cs
index e97e3ca10..8d598be2e 100644
--- a/Terminal.Gui/Views/CheckBox.cs
+++ b/Terminal.Gui/Views/CheckBox.cs
@@ -153,15 +153,15 @@ public class CheckBox : View
///
protected override void UpdateTextFormatterText ()
{
- switch (Justification)
+ switch (TextJustification)
{
- case Justification.Left:
- case Justification.Centered:
- case Justification.Justified:
+ case Alignment.Left:
+ case Alignment.Centered:
+ case Alignment.Justified:
TextFormatter.Text = $"{GetCheckedState ()} {GetFormatterText ()}";
break;
- case Justification.Right:
+ case Alignment.Right:
TextFormatter.Text = $"{GetFormatterText ()} {GetCheckedState ()}";
break;
diff --git a/Terminal.Gui/Views/Dialog.cs b/Terminal.Gui/Views/Dialog.cs
index 6f9c251f7..f7210744b 100644
--- a/Terminal.Gui/Views/Dialog.cs
+++ b/Terminal.Gui/Views/Dialog.cs
@@ -98,7 +98,7 @@ public class Dialog : Window
// TODO: Update button.X = Pos.Justify when justification changes
/// Determines how the s are justified along the bottom of the dialog.
- public Justification ButtonJustification { get; set; }
+ public Alignment ButtonJustification { get; set; }
/// Optional buttons to lay out at the bottom of the dialog.
public Button [] Buttons
@@ -118,11 +118,11 @@ public class Dialog : Window
}
}
- /// The default for .
+ /// The default for .
/// This property can be set in a Theme.
[SerializableConfigurationProperty (Scope = typeof (ThemeScope))]
[JsonConverter (typeof (JsonStringEnumConverter))]
- public static Justification DefaultButtonJustification { get; set; } = Justification.Right;
+ public static Alignment DefaultButtonJustification { get; set; } = Alignment.Right;
///
/// Adds a to the , its layout will be controlled by the
diff --git a/Terminal.Gui/Views/ListView.cs b/Terminal.Gui/Views/ListView.cs
index 77439ee8e..c30e44fb1 100644
--- a/Terminal.Gui/Views/ListView.cs
+++ b/Terminal.Gui/Views/ListView.cs
@@ -1002,7 +1002,7 @@ public class ListWrapper : IListDataSource
private void RenderUstr (ConsoleDriver driver, string ustr, int col, int line, int width, int start = 0)
{
string str = start > ustr.GetColumns () ? string.Empty : ustr.Substring (Math.Min (start, ustr.ToRunes ().Length - 1));
- string u = TextFormatter.ClipAndJustify (str, width, Justification.Left);
+ string u = TextFormatter.ClipAndJustify (str, width, Alignment.Left);
driver.AddStr (u);
width -= u.GetColumns ();
diff --git a/Terminal.Gui/Views/Menu/Menu.cs b/Terminal.Gui/Views/Menu/Menu.cs
index 3033985ab..b55bdfac5 100644
--- a/Terminal.Gui/Views/Menu/Menu.cs
+++ b/Terminal.Gui/Views/Menu/Menu.cs
@@ -891,7 +891,7 @@ internal sealed class Menu : View
var tf = new TextFormatter
{
AutoSize = true,
- Justification = Justification.Centered, HotKeySpecifier = MenuBar.HotKeySpecifier, Text = textToDraw
+ Justification = Alignment.Centered, HotKeySpecifier = MenuBar.HotKeySpecifier, Text = textToDraw
};
// The -3 is left/right border + one space (not sure what for)
diff --git a/Terminal.Gui/Views/MessageBox.cs b/Terminal.Gui/Views/MessageBox.cs
index da7342794..72e0f42b1 100644
--- a/Terminal.Gui/Views/MessageBox.cs
+++ b/Terminal.Gui/Views/MessageBox.cs
@@ -340,8 +340,8 @@ public static class MessageBox
}
}
- Justification buttonJust = Dialog.DefaultButtonJustification;
- Dialog.DefaultButtonJustification = Justification.Centered;
+ Alignment buttonJust = Dialog.DefaultButtonJustification;
+ Dialog.DefaultButtonJustification = Alignment.Centered;
var d = new Dialog
{
Buttons = buttonList.ToArray (),
@@ -374,7 +374,7 @@ public static class MessageBox
var messageLabel = new Label
{
Text = message,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
X = Pos.Center (),
Y = 0
};
diff --git a/Terminal.Gui/Views/ProgressBar.cs b/Terminal.Gui/Views/ProgressBar.cs
index cebe9900a..9c56625b2 100644
--- a/Terminal.Gui/Views/ProgressBar.cs
+++ b/Terminal.Gui/Views/ProgressBar.cs
@@ -181,7 +181,7 @@ public class ProgressBar : View
if (ProgressBarFormat != ProgressBarFormat.Simple && !_isActivity)
{
- var tf = new TextFormatter { Justification = Justification.Centered, Text = Text };
+ var tf = new TextFormatter { Justification = Alignment.Centered, Text = Text };
var attr = new Attribute (ColorScheme.HotNormal.Foreground, ColorScheme.HotNormal.Background);
if (_fraction > .5)
diff --git a/Terminal.Gui/Views/Slider.cs b/Terminal.Gui/Views/Slider.cs
index 6ae7df30c..95ed09fd8 100644
--- a/Terminal.Gui/Views/Slider.cs
+++ b/Terminal.Gui/Views/Slider.cs
@@ -930,7 +930,7 @@ public class Slider : View
}
}
- private string JustifyText (string text, int width, Justification justification)
+ private string JustifyText (string text, int width, Alignment justification)
{
if (text is null)
{
@@ -949,18 +949,18 @@ public class Slider : View
// Note: The formatter doesn't handle all of this ???
switch (justification)
{
- case Justification.Justified:
+ case Alignment.Justified:
return TextFormatter.Justify (text, width);
- case Justification.Left:
+ case Alignment.Left:
return text + s1 + s1 + s2;
- case Justification.Centered:
+ case Alignment.Centered:
if (text.Length % 2 != 0)
{
return s1 + text + s1 + s2;
}
return s1 + s2 + text + s1;
- case Justification.Right:
+ case Alignment.Right:
return s1 + s1 + s2 + text;
default:
return text;
@@ -1293,7 +1293,7 @@ public class Slider : View
switch (_config._legendsOrientation)
{
case Orientation.Horizontal:
- text = JustifyText (text, _config._innerSpacing + 1, Justification.Centered);
+ text = JustifyText (text, _config._innerSpacing + 1, Alignment.Centered);
break;
case Orientation.Vertical:
@@ -1311,7 +1311,7 @@ public class Slider : View
break;
case Orientation.Vertical:
- text = JustifyText (text, _config._innerSpacing + 1, Justification.Centered);
+ text = JustifyText (text, _config._innerSpacing + 1, Alignment.Centered);
break;
}
diff --git a/Terminal.Gui/Views/TableView/ColumnStyle.cs b/Terminal.Gui/Views/TableView/ColumnStyle.cs
index 17b22dc5b..02615e696 100644
--- a/Terminal.Gui/Views/TableView/ColumnStyle.cs
+++ b/Terminal.Gui/Views/TableView/ColumnStyle.cs
@@ -11,7 +11,7 @@ public class ColumnStyle
/// Defines a delegate for returning custom justification per cell based on cell values. When specified this will
/// override
///
- public Func JustificationGetter;
+ public Func JustificationGetter;
///
/// Defines a delegate for returning a custom color scheme per cell based on cell values. Return null for the
@@ -32,7 +32,7 @@ public class ColumnStyle
/// Defines the default justification for all values rendered in this column. For custom justification based on cell
/// contents use .
///
- public Justification Justification { get; set; }
+ public Alignment Justification { get; set; }
/// Defines the format for values e.g. "yyyy-MM-dd" for dates
public string Format { get; set; }
@@ -74,7 +74,7 @@ public class ColumnStyle
///
///
///
- public Justification GetJustification (object cellValue)
+ public Alignment GetJustification (object cellValue)
{
if (JustificationGetter is { })
{
diff --git a/Terminal.Gui/Views/TableView/TableView.cs b/Terminal.Gui/Views/TableView/TableView.cs
index db03e33ab..0931faa31 100644
--- a/Terminal.Gui/Views/TableView/TableView.cs
+++ b/Terminal.Gui/Views/TableView/TableView.cs
@@ -2085,16 +2085,16 @@ public class TableView : View
- (representation.EnumerateRunes ().Sum (c => c.GetColumns ())
+ 1 /*leave 1 space for cell boundary*/);
- switch (colStyle?.GetJustification (originalCellValue) ?? Justification.Left)
+ switch (colStyle?.GetJustification (originalCellValue) ?? Alignment.Left)
{
- case Justification.Left:
+ case Alignment.Left:
return representation + new string (' ', toPad);
- case Justification.Right:
+ case Alignment.Right:
return new string (' ', toPad) + representation;
// TODO: With single line cells, centered and justified are the same right?
- case Justification.Centered:
- case Justification.Justified:
+ case Alignment.Centered:
+ case Alignment.Justified:
return
new string (' ', (int)Math.Floor (toPad / 2.0))
+ // round down
diff --git a/Terminal.Gui/Views/TextValidateField.cs b/Terminal.Gui/Views/TextValidateField.cs
index 9ffa318b7..034a0a69b 100644
--- a/Terminal.Gui/Views/TextValidateField.cs
+++ b/Terminal.Gui/Views/TextValidateField.cs
@@ -539,7 +539,7 @@ namespace Terminal.Gui
{
int c = _provider.Cursor (mouseEvent.X - GetMargins (Viewport.Width).left);
- if (_provider.Fixed == false && Justification == Justification.Right && Text.Length > 0)
+ if (_provider.Fixed == false && TextJustification == Alignment.Right && Text.Length > 0)
{
c++;
}
@@ -633,7 +633,7 @@ namespace Terminal.Gui
// When it's right-aligned and it's a normal input, the cursor behaves differently.
int curPos;
- if (_provider?.Fixed == false && Justification == Justification.Right)
+ if (_provider?.Fixed == false && TextJustification == Alignment.Right)
{
curPos = _cursorPosition + left - 1;
}
@@ -650,7 +650,7 @@ namespace Terminal.Gui
///
private bool BackspaceKeyHandler ()
{
- if (_provider.Fixed == false && Justification == Justification.Right && _cursorPosition <= 1)
+ if (_provider.Fixed == false && TextJustification == Alignment.Right && _cursorPosition <= 1)
{
return false;
}
@@ -688,7 +688,7 @@ namespace Terminal.Gui
///
private bool DeleteKeyHandler ()
{
- if (_provider.Fixed == false && Justification == Justification.Right)
+ if (_provider.Fixed == false && TextJustification == Alignment.Right)
{
_cursorPosition = _provider.CursorLeft (_cursorPosition);
}
@@ -717,13 +717,13 @@ namespace Terminal.Gui
int count = Text.Length;
int total = width - count;
- switch (Justification)
+ switch (TextJustification)
{
- case Justification.Left:
+ case Alignment.Left:
return (0, total);
- case Justification.Centered:
+ case Alignment.Centered:
return (total / 2, total / 2 + total % 2);
- case Justification.Right:
+ case Alignment.Right:
return (total, 0);
default:
return (0, total);
diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs
index 47ecca855..6d6e4db51 100644
--- a/Terminal.Gui/Views/TextView.cs
+++ b/Terminal.Gui/Views/TextView.cs
@@ -1776,7 +1776,7 @@ internal class WordWrapManager
TextFormatter.Format (
TextModel.ToString (line),
width,
- Justification.Left,
+ Alignment.Left,
true,
preserveTrailingSpaces,
tabWidth
diff --git a/Terminal.Gui/Views/Wizard/Wizard.cs b/Terminal.Gui/Views/Wizard/Wizard.cs
index 8046106eb..049668e5e 100644
--- a/Terminal.Gui/Views/Wizard/Wizard.cs
+++ b/Terminal.Gui/Views/Wizard/Wizard.cs
@@ -85,7 +85,7 @@ public class Wizard : Dialog
{
// Using Justify causes the Back and Next buttons to be hard justified against
// the left and right edge
- ButtonJustification = Justification.Justified;
+ ButtonJustification = Alignment.Justified;
BorderStyle = LineStyle.Double;
//// Add a horiz separator
diff --git a/UICatalog/Scenarios/BasicColors.cs b/UICatalog/Scenarios/BasicColors.cs
index 08a3c642d..510d36d40 100644
--- a/UICatalog/Scenarios/BasicColors.cs
+++ b/UICatalog/Scenarios/BasicColors.cs
@@ -32,7 +32,7 @@ public class BasicColors : Scenario
Y = 0,
Width = 1,
Height = 13,
- VerticalJustification = Justification.Bottom,
+ VerticalTextJustification = Alignment.Bottom,
ColorScheme = new ColorScheme { Normal = attr },
Text = bg.ToString (),
TextDirection = TextDirection.TopBottom_LeftRight
@@ -45,7 +45,7 @@ public class BasicColors : Scenario
Y = y,
Width = 13,
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
ColorScheme = new ColorScheme { Normal = attr },
Text = bg.ToString ()
};
diff --git a/UICatalog/Scenarios/Buttons.cs b/UICatalog/Scenarios/Buttons.cs
index bd2e9de04..1f0943d28 100644
--- a/UICatalog/Scenarios/Buttons.cs
+++ b/UICatalog/Scenarios/Buttons.cs
@@ -287,39 +287,39 @@ public class Buttons : Scenario
switch (args.SelectedItem)
{
case 0:
- moveBtn.Justification = Justification.Left;
- sizeBtn.Justification = Justification.Left;
- moveBtnA.Justification = Justification.Left;
- sizeBtnA.Justification = Justification.Left;
- moveHotKeyBtn.Justification = Justification.Left;
- moveUnicodeHotKeyBtn.Justification = Justification.Left;
+ moveBtn.TextJustification = Alignment.Left;
+ sizeBtn.TextJustification = Alignment.Left;
+ moveBtnA.TextJustification = Alignment.Left;
+ sizeBtnA.TextJustification = Alignment.Left;
+ moveHotKeyBtn.TextJustification = Alignment.Left;
+ moveUnicodeHotKeyBtn.TextJustification = Alignment.Left;
break;
case 1:
- moveBtn.Justification = Justification.Right;
- sizeBtn.Justification = Justification.Right;
- moveBtnA.Justification = Justification.Right;
- sizeBtnA.Justification = Justification.Right;
- moveHotKeyBtn.Justification = Justification.Right;
- moveUnicodeHotKeyBtn.Justification = Justification.Right;
+ moveBtn.TextJustification = Alignment.Right;
+ sizeBtn.TextJustification = Alignment.Right;
+ moveBtnA.TextJustification = Alignment.Right;
+ sizeBtnA.TextJustification = Alignment.Right;
+ moveHotKeyBtn.TextJustification = Alignment.Right;
+ moveUnicodeHotKeyBtn.TextJustification = Alignment.Right;
break;
case 2:
- moveBtn.Justification = Justification.Centered;
- sizeBtn.Justification = Justification.Centered;
- moveBtnA.Justification = Justification.Centered;
- sizeBtnA.Justification = Justification.Centered;
- moveHotKeyBtn.Justification = Justification.Centered;
- moveUnicodeHotKeyBtn.Justification = Justification.Centered;
+ moveBtn.TextJustification = Alignment.Centered;
+ sizeBtn.TextJustification = Alignment.Centered;
+ moveBtnA.TextJustification = Alignment.Centered;
+ sizeBtnA.TextJustification = Alignment.Centered;
+ moveHotKeyBtn.TextJustification = Alignment.Centered;
+ moveUnicodeHotKeyBtn.TextJustification = Alignment.Centered;
break;
case 3:
- moveBtn.Justification = Justification.Justified;
- sizeBtn.Justification = Justification.Justified;
- moveBtnA.Justification = Justification.Justified;
- sizeBtnA.Justification = Justification.Justified;
- moveHotKeyBtn.Justification = Justification.Justified;
- moveUnicodeHotKeyBtn.Justification = Justification.Justified;
+ moveBtn.TextJustification = Alignment.Justified;
+ sizeBtn.TextJustification = Alignment.Justified;
+ moveBtnA.TextJustification = Alignment.Justified;
+ sizeBtnA.TextJustification = Alignment.Justified;
+ moveHotKeyBtn.TextJustification = Alignment.Justified;
+ moveUnicodeHotKeyBtn.TextJustification = Alignment.Justified;
break;
}
@@ -439,7 +439,7 @@ public class Buttons : Scenario
Y = Pos.Top (_down),
Width = Dim.Function (() => Digits),
Height = 1,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
CanFocus = true
};
diff --git a/UICatalog/Scenarios/CharacterMap.cs b/UICatalog/Scenarios/CharacterMap.cs
index c8d62b716..cb4d77a70 100644
--- a/UICatalog/Scenarios/CharacterMap.cs
+++ b/UICatalog/Scenarios/CharacterMap.cs
@@ -958,7 +958,7 @@ internal class CharMap : View
Y = 1,
Width = Dim.Fill (),
Height = Dim.Fill (1),
- Justification = Justification.Centered
+ TextJustification = Alignment.Centered
};
var spinner = new SpinnerView { X = Pos.Center (), Y = Pos.Center (), Style = new Aesthetic () };
spinner.AutoSpin = true;
diff --git a/UICatalog/Scenarios/CollectionNavigatorTester.cs b/UICatalog/Scenarios/CollectionNavigatorTester.cs
index 480e5f65f..69d8f51a1 100644
--- a/UICatalog/Scenarios/CollectionNavigatorTester.cs
+++ b/UICatalog/Scenarios/CollectionNavigatorTester.cs
@@ -142,7 +142,7 @@ public class CollectionNavigatorTester : Scenario
var label = new Label
{
Text = "ListView",
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
X = 0,
Y = 1, // for menu
Width = Dim.Percent (50),
@@ -171,7 +171,7 @@ public class CollectionNavigatorTester : Scenario
var label = new Label
{
Text = "TreeView",
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
X = Pos.Right (_listView) + 2,
Y = 1, // for menu
Width = Dim.Percent (50),
diff --git a/UICatalog/Scenarios/ColorPicker.cs b/UICatalog/Scenarios/ColorPicker.cs
index cf2b7512e..5b92f96dd 100644
--- a/UICatalog/Scenarios/ColorPicker.cs
+++ b/UICatalog/Scenarios/ColorPicker.cs
@@ -69,8 +69,8 @@ public class ColorPickers : Scenario
{
Title = "Color Sample",
Text = "Lorem Ipsum",
- Justification = Justification.Centered,
- VerticalJustification = Justification.Centered,
+ TextJustification = Alignment.Centered,
+ VerticalTextJustification = Alignment.Centered,
BorderStyle = LineStyle.Heavy,
X = Pos.Center (),
Y = Pos.Center (),
diff --git a/UICatalog/Scenarios/ComputedLayout.cs b/UICatalog/Scenarios/ComputedLayout.cs
index 83a679d91..ac19ff82b 100644
--- a/UICatalog/Scenarios/ComputedLayout.cs
+++ b/UICatalog/Scenarios/ComputedLayout.cs
@@ -91,7 +91,7 @@ public class ComputedLayout : Scenario
labelList.Add (
new Label
{
- Justification = Justification.Left,
+ TextJustification = Alignment.Left,
Width = Dim.Fill (),
X = 0,
Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -103,7 +103,7 @@ public class ComputedLayout : Scenario
labelList.Add (
new Label
{
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Width = Dim.Fill (),
X = 0,
Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -115,7 +115,7 @@ public class ComputedLayout : Scenario
labelList.Add (
new Label
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = Dim.Fill (),
X = 0,
Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -127,7 +127,7 @@ public class ComputedLayout : Scenario
labelList.Add (
new Label
{
- Justification = Justification.Justified,
+ TextJustification = Alignment.Justified,
Width = Dim.Fill (),
X = 0,
Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -153,7 +153,7 @@ public class ComputedLayout : Scenario
labelList.Add (
new Label
{
- Justification = Justification.Left,
+ TextJustification = Alignment.Left,
Width = Dim.Fill (),
X = 0,
Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -165,7 +165,7 @@ public class ComputedLayout : Scenario
labelList.Add (
new Label
{
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Width = Dim.Fill (),
X = 0,
Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -177,7 +177,7 @@ public class ComputedLayout : Scenario
labelList.Add (
new Label
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = Dim.Fill (),
X = 0,
Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -189,7 +189,7 @@ public class ComputedLayout : Scenario
labelList.Add (
new Label
{
- Justification = Justification.Justified,
+ TextJustification = Alignment.Justified,
Width = Dim.Fill (),
X = 0,
Y = Pos.Bottom (labelList.LastOrDefault ()),
@@ -324,7 +324,7 @@ public class ComputedLayout : Scenario
var anchorEndLabel1 = new Label
{
Text = "This Label should be the 3rd to last line (AnchorEnd (3)).",
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
ColorScheme = Colors.ColorSchemes ["Menu"],
Width = Dim.Fill (5),
X = 5,
@@ -338,7 +338,7 @@ public class ComputedLayout : Scenario
{
Text =
"This TextField should be the 4th to last line (AnchorEnd (3) - 1).",
- Justification = Justification.Left,
+ TextJustification = Alignment.Left,
ColorScheme = Colors.ColorSchemes ["Menu"],
Width = Dim.Fill (5),
X = 5,
@@ -397,9 +397,9 @@ public class ComputedLayout : Scenario
// Center three buttons with
- leftButton.X = Pos.Justify (Justification.Centered);
- centerButton.X = Pos.Justify (Justification.Centered);
- rightButton.X = Pos.Justify (Justification.Centered);
+ leftButton.X = Pos.Justify (Alignment.Centered);
+ centerButton.X = Pos.Justify (Alignment.Centered);
+ rightButton.X = Pos.Justify (Alignment.Centered);
Application.Run (app);
app.Dispose ();
diff --git a/UICatalog/Scenarios/CsvEditor.cs b/UICatalog/Scenarios/CsvEditor.cs
index 73fbd747e..1d5762fff 100644
--- a/UICatalog/Scenarios/CsvEditor.cs
+++ b/UICatalog/Scenarios/CsvEditor.cs
@@ -78,17 +78,17 @@ public class CsvEditor : Scenario
_miLeft = new MenuItem (
"_Justify Left",
"",
- () => Justify (Justification.Left)
+ () => Justify (Alignment.Left)
),
_miRight = new MenuItem (
"_Justify Right",
"",
- () => Justify (Justification.Right)
+ () => Justify (Alignment.Right)
),
_miCentered = new MenuItem (
"_Justify Centered",
"",
- () => Justify (Justification.Centered)
+ () => Justify (Alignment.Centered)
),
// Format requires hard typed data table, when we read a CSV everything is untyped (string) so this only works for new columns in this demo
@@ -133,7 +133,7 @@ public class CsvEditor : Scenario
Y = Pos.Bottom (_tableView),
Text = "0,0",
Width = Dim.Fill (),
- Justification = Justification.Right
+ TextJustification = Alignment.Right
};
_selectedCellLabel.TextChanged += SelectedCellLabel_TextChanged;
@@ -218,7 +218,7 @@ public class CsvEditor : Scenario
_tableView.Update ();
}
- private void Justify (Justification newJustification)
+ private void Justify (Alignment newJustification)
{
if (NoTableLoaded ())
{
@@ -228,9 +228,9 @@ public class CsvEditor : Scenario
ColumnStyle style = _tableView.Style.GetOrCreateColumnStyle (_tableView.SelectedColumn);
style.Justification = newJustification;
- _miLeft.Checked = style.Justification == Justification.Left;
- _miRight.Checked = style.Justification == Justification.Right;
- _miCentered.Checked = style.Justification == Justification.Centered;
+ _miLeft.Checked = style.Justification == Alignment.Left;
+ _miRight.Checked = style.Justification == Alignment.Right;
+ _miCentered.Checked = style.Justification == Alignment.Centered;
_tableView.Update ();
}
@@ -437,9 +437,9 @@ public class CsvEditor : Scenario
ColumnStyle style = _tableView.Style.GetColumnStyleIfAny (_tableView.SelectedColumn);
- _miLeft.Checked = style?.Justification == Justification.Left;
- _miRight.Checked = style?.Justification == Justification.Right;
- _miCentered.Checked = style?.Justification == Justification.Centered;
+ _miLeft.Checked = style?.Justification == Alignment.Left;
+ _miRight.Checked = style?.Justification == Alignment.Right;
+ _miCentered.Checked = style?.Justification == Alignment.Centered;
}
private void Open ()
diff --git a/UICatalog/Scenarios/Dialogs.cs b/UICatalog/Scenarios/Dialogs.cs
index c206f05c2..e4ac61b2a 100644
--- a/UICatalog/Scenarios/Dialogs.cs
+++ b/UICatalog/Scenarios/Dialogs.cs
@@ -18,7 +18,7 @@ public class Dialogs : Scenario
var numButtonsLabel = new Label
{
X = 0,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "_Number of Buttons:"
};
@@ -28,7 +28,7 @@ public class Dialogs : Scenario
Y = 0,
Width = Dim.Width (numButtonsLabel),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "_Width:"
};
frame.Add (label);
@@ -49,7 +49,7 @@ public class Dialogs : Scenario
Y = Pos.Bottom (label),
Width = Dim.Width (numButtonsLabel),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "_Height:"
};
frame.Add (label);
@@ -83,7 +83,7 @@ public class Dialogs : Scenario
Y = Pos.Bottom (label),
Width = Dim.Width (numButtonsLabel),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "_Title:"
};
frame.Add (label);
@@ -115,7 +115,7 @@ public class Dialogs : Scenario
{
X = Pos.Right (numButtonsLabel) + 1,
Y = Pos.Bottom (numButtonsLabel),
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = $"_Add {char.ConvertFromUtf32 (CODE_POINT)} to button text to stress wide char support",
Checked = false
};
@@ -127,7 +127,7 @@ public class Dialogs : Scenario
Y = Pos.Bottom (glyphsNotWords),
Width = Dim.Width (numButtonsLabel),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Button St_yle:"
};
frame.Add (label);
@@ -145,7 +145,7 @@ public class Dialogs : Scenario
}
}
- var labels = GetUniqueEnumNames ();
+ var labels = GetUniqueEnumNames ();
var styleRadioGroup = new RadioGroup
{
X = Pos.Right (label) + 1,
@@ -175,7 +175,7 @@ public class Dialogs : Scenario
label = new()
{
- X = Pos.Center (), Y = Pos.Bottom (frame) + 4, Justification = Justification.Right, Text = "Button Pressed:"
+ X = Pos.Center (), Y = Pos.Bottom (frame) + 4, TextJustification = Alignment.Right, Text = "Button Pressed:"
};
Win.Add (label);
@@ -282,7 +282,7 @@ public class Dialogs : Scenario
dialog = new()
{
Title = titleEdit.Text,
- ButtonJustification = (Justification)styleRadioGroup.SelectedItem,
+ ButtonJustification = (Alignment)styleRadioGroup.SelectedItem,
Buttons = buttons.ToArray ()
};
diff --git a/UICatalog/Scenarios/DynamicMenuBar.cs b/UICatalog/Scenarios/DynamicMenuBar.cs
index 38445a1aa..dd0b0d879 100644
--- a/UICatalog/Scenarios/DynamicMenuBar.cs
+++ b/UICatalog/Scenarios/DynamicMenuBar.cs
@@ -623,7 +623,7 @@ public class DynamicMenuBar : Scenario
var _lblMenuBar = new Label
{
ColorScheme = Colors.ColorSchemes ["Dialog"],
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
X = Pos.Right (_btnPrevious) + 1,
Y = Pos.Top (_btnPrevious),
@@ -636,7 +636,7 @@ public class DynamicMenuBar : Scenario
var _lblParent = new Label
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
X = Pos.Right (_btnPrevious) + 1,
Y = Pos.Top (_btnPrevious) + 1,
diff --git a/UICatalog/Scenarios/Editor.cs b/UICatalog/Scenarios/Editor.cs
index 18bcf11bb..c4588b913 100644
--- a/UICatalog/Scenarios/Editor.cs
+++ b/UICatalog/Scenarios/Editor.cs
@@ -882,7 +882,7 @@ public class Editor : Scenario
{
Y = 1,
Width = lblWidth,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Find:"
};
@@ -903,7 +903,7 @@ public class Editor : Scenario
Y = Pos.Top (label),
Width = 20,
Enabled = !string.IsNullOrEmpty (txtToFind.Text),
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
IsDefault = true,
Text = "Find _Next"
@@ -917,7 +917,7 @@ public class Editor : Scenario
Y = Pos.Top (btnFindNext) + 1,
Width = 20,
Enabled = !string.IsNullOrEmpty (txtToFind.Text),
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Text = "Find _Previous"
};
@@ -937,7 +937,7 @@ public class Editor : Scenario
X = Pos.Right (txtToFind) + 1,
Y = Pos.Top (btnFindPrevious) + 2,
Width = 20,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Text = "Cancel"
};
@@ -1134,7 +1134,7 @@ public class Editor : Scenario
{
Y = 1,
Width = lblWidth,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Find:"
};
@@ -1155,7 +1155,7 @@ public class Editor : Scenario
Y = Pos.Top (label),
Width = 20,
Enabled = !string.IsNullOrEmpty (txtToFind.Text),
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
IsDefault = true,
Text = "Replace _Next"
@@ -1181,7 +1181,7 @@ public class Editor : Scenario
Y = Pos.Top (btnFindNext) + 1,
Width = 20,
Enabled = !string.IsNullOrEmpty (txtToFind.Text),
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Text = "Replace _Previous"
};
@@ -1194,7 +1194,7 @@ public class Editor : Scenario
Y = Pos.Top (btnFindPrevious) + 1,
Width = 20,
Enabled = !string.IsNullOrEmpty (txtToFind.Text),
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Text = "Replace _All"
};
@@ -1215,7 +1215,7 @@ public class Editor : Scenario
X = Pos.Right (txtToFind) + 1,
Y = Pos.Top (btnReplaceAll) + 1,
Width = 20,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Text = "Cancel"
};
diff --git a/UICatalog/Scenarios/ListColumns.cs b/UICatalog/Scenarios/ListColumns.cs
index bbbabb0a2..09bc2149f 100644
--- a/UICatalog/Scenarios/ListColumns.cs
+++ b/UICatalog/Scenarios/ListColumns.cs
@@ -247,7 +247,7 @@ public class ListColumns : Scenario
Text = "0,0",
Width = Dim.Fill (),
- Justification = Justification.Right
+ TextJustification = Alignment.Right
};
Win.Add (selectedCellLabel);
diff --git a/UICatalog/Scenarios/MessageBoxes.cs b/UICatalog/Scenarios/MessageBoxes.cs
index 33bf34610..9ecba02bb 100644
--- a/UICatalog/Scenarios/MessageBoxes.cs
+++ b/UICatalog/Scenarios/MessageBoxes.cs
@@ -14,7 +14,7 @@ public class MessageBoxes : Scenario
var frame = new FrameView { X = Pos.Center (), Y = 1, Width = Dim.Percent (75), Title = "MessageBox Options" };
Win.Add (frame);
- var label = new Label { X = 0, Y = 0, Justification = Justification.Right, Text = "Width:" };
+ var label = new Label { X = 0, Y = 0, TextJustification = Alignment.Right, Text = "Width:" };
frame.Add (label);
var widthEdit = new TextField
@@ -34,7 +34,7 @@ public class MessageBoxes : Scenario
Width = Dim.Width (label),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Height:"
};
frame.Add (label);
@@ -69,7 +69,7 @@ public class MessageBoxes : Scenario
Width = Dim.Width (label),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Title:"
};
frame.Add (label);
@@ -91,7 +91,7 @@ public class MessageBoxes : Scenario
Width = Dim.Width (label),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Message:"
};
frame.Add (label);
@@ -113,7 +113,7 @@ public class MessageBoxes : Scenario
Width = Dim.Width (label),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Num Buttons:"
};
frame.Add (label);
@@ -135,7 +135,7 @@ public class MessageBoxes : Scenario
Width = Dim.Width (label),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Default Button:"
};
frame.Add (label);
@@ -157,7 +157,7 @@ public class MessageBoxes : Scenario
Width = Dim.Width (label),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Style:"
};
frame.Add (label);
@@ -195,7 +195,7 @@ public class MessageBoxes : Scenario
label = new()
{
- X = Pos.Center (), Y = Pos.Bottom (frame) + 2, Justification = Justification.Right, Text = "Button Pressed:"
+ X = Pos.Center (), Y = Pos.Bottom (frame) + 2, TextJustification = Alignment.Right, Text = "Button Pressed:"
};
Win.Add (label);
@@ -204,7 +204,7 @@ public class MessageBoxes : Scenario
X = Pos.Center (),
Y = Pos.Bottom (label) + 1,
ColorScheme = Colors.ColorSchemes ["Error"],
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Text = " "
};
diff --git a/UICatalog/Scenarios/Mouse.cs b/UICatalog/Scenarios/Mouse.cs
index 005bbb360..2fd5bd209 100644
--- a/UICatalog/Scenarios/Mouse.cs
+++ b/UICatalog/Scenarios/Mouse.cs
@@ -98,8 +98,8 @@ public class Mouse : Scenario
Width = 20,
Height = 3,
Text = "Enter/Leave Demo",
- Justification = Justification.Centered,
- VerticalJustification = Justification.Centered,
+ TextJustification = Alignment.Centered,
+ VerticalTextJustification = Alignment.Centered,
ColorScheme = Colors.ColorSchemes ["Dialog"]
};
win.Add (demo);
diff --git a/UICatalog/Scenarios/PosJustification.cs b/UICatalog/Scenarios/PosJustification.cs
index 14a687100..a564b6cfe 100644
--- a/UICatalog/Scenarios/PosJustification.cs
+++ b/UICatalog/Scenarios/PosJustification.cs
@@ -9,9 +9,9 @@ namespace UICatalog.Scenarios;
[ScenarioCategory ("Layout")]
public sealed class PosJustification : Scenario
{
- private readonly Justifier _horizJustifier = new ();
+ private readonly Aligner _horizJustifier = new ();
private int _leftMargin;
- private readonly Justifier _vertJustifier = new ();
+ private readonly Aligner _vertJustifier = new ();
private int _topMargin;
public override void Main ()
@@ -45,22 +45,22 @@ public sealed class PosJustification : Scenario
RadioGroup justification = new ()
{
- X = Pos.Justify (_horizJustifier.Justification),
+ X = Pos.Justify (_horizJustifier.Alignment),
Y = Pos.Center (),
- RadioLabels = GetUniqueEnumNames (false).ToArray (),
+ RadioLabels = GetUniqueEnumNames (false).ToArray (),
ColorScheme = colorScheme
};
justification.SelectedItemChanged += (s, e) =>
{
- _horizJustifier.Justification =
- (Justification)Enum.Parse (typeof (Justification), justification.SelectedItem.ToString ());
+ _horizJustifier.Alignment =
+ (Alignment)Enum.Parse (typeof (Alignment), justification.SelectedItem.ToString ());
foreach (View view in appWindow.Subviews.Where (v => v.X is Pos.PosJustify))
{
if (view.X is Pos.PosJustify j)
{
- var newJust = new Pos.PosJustify (_horizJustifier.Justification)
+ var newJust = new Pos.PosJustify (_horizJustifier.Alignment)
{
Justifier =
{
@@ -75,7 +75,7 @@ public sealed class PosJustification : Scenario
CheckBox putSpaces = new ()
{
- X = Pos.Justify (_horizJustifier.Justification),
+ X = Pos.Justify (_horizJustifier.Alignment),
Y = Pos.Top (justification),
ColorScheme = colorScheme,
Text = "Spaces"
@@ -125,14 +125,14 @@ public sealed class PosJustification : Scenario
addedViews.Add (
new()
{
- X = Pos.Justify (_horizJustifier.Justification),
+ X = Pos.Justify (_horizJustifier.Alignment),
Y = Pos.Center (),
Text = NumberToWords.Convert (0)
});
Buttons.NumericUpDown addedViewsUpDown = new Buttons.NumericUpDown
{
- X = Pos.Justify (_horizJustifier.Justification),
+ X = Pos.Justify (_horizJustifier.Alignment),
Y = Pos.Top (justification),
Width = 9,
Title = "Added",
@@ -171,7 +171,7 @@ public sealed class PosJustification : Scenario
{
var button = new Button
{
- X = Pos.Justify (_horizJustifier.Justification),
+ X = Pos.Justify (_horizJustifier.Alignment),
Y = Pos.Center (),
Text = NumberToWords.Convert (i + 1)
};
@@ -192,21 +192,21 @@ public sealed class PosJustification : Scenario
RadioGroup justification = new ()
{
X = 0,
- Y = Pos.Justify (_vertJustifier.Justification),
- RadioLabels = GetUniqueEnumNames (true).Reverse ().ToArray (),
+ Y = Pos.Justify (_vertJustifier.Alignment),
+ RadioLabels = GetUniqueEnumNames (true).Reverse ().ToArray (),
ColorScheme = colorScheme
};
justification.SelectedItemChanged += (s, e) =>
{
- _vertJustifier.Justification =
- (Justification)Enum.Parse (typeof (Justification), justification.SelectedItem.ToString ());
+ _vertJustifier.Alignment =
+ (Alignment)Enum.Parse (typeof (Alignment), justification.SelectedItem.ToString ());
foreach (View view in appWindow.Subviews.Where (v => v.Y is Pos.PosJustify))
{
if (view.Y is Pos.PosJustify j)
{
- var newJust = new Pos.PosJustify (_vertJustifier.Justification)
+ var newJust = new Pos.PosJustify (_vertJustifier.Alignment)
{
Justifier =
{
@@ -222,7 +222,7 @@ public sealed class PosJustification : Scenario
CheckBox putSpaces = new ()
{
X = 0,
- Y = Pos.Justify (_vertJustifier.Justification),
+ Y = Pos.Justify (_vertJustifier.Alignment),
ColorScheme = colorScheme,
Text = "Spaces"
};
@@ -272,14 +272,14 @@ public sealed class PosJustification : Scenario
new()
{
X = 0,
- Y = Pos.Justify (_vertJustifier.Justification),
+ Y = Pos.Justify (_vertJustifier.Alignment),
Text = NumberToWords.Convert (0)
});
Buttons.NumericUpDown addedViewsUpDown = new Buttons.NumericUpDown
{
X = 0,
- Y = Pos.Justify (_vertJustifier.Justification),
+ Y = Pos.Justify (_vertJustifier.Alignment),
Width = 9,
Title = "Added",
ColorScheme = colorScheme,
@@ -318,7 +318,7 @@ public sealed class PosJustification : Scenario
var button = new CheckBox
{
X = 0,
- Y = Pos.Justify (_vertJustifier.Justification),
+ Y = Pos.Justify (_vertJustifier.Alignment),
Text = NumberToWords.Convert (i + 1)
};
appWindow.Add (button);
@@ -375,8 +375,8 @@ public sealed class PosJustification : Scenario
Width = 5
};
- v.X = Pos.Justify (Justification.Right, i / 3);
- v.Y = Pos.Justify (Justification.Justified, i % 3 + 10);
+ v.X = Pos.Justify (Alignment.Right, i / 3);
+ v.Y = Pos.Justify (Alignment.Justified, i % 3 + 10);
container.Add (v);
}
diff --git a/UICatalog/Scenarios/TableEditor.cs b/UICatalog/Scenarios/TableEditor.cs
index 04c968485..0bada2611 100644
--- a/UICatalog/Scenarios/TableEditor.cs
+++ b/UICatalog/Scenarios/TableEditor.cs
@@ -707,7 +707,7 @@ public class TableEditor : Scenario
Text = "0,0",
Width = Dim.Fill (),
- Justification = Justification.Right
+ TextJustification = Alignment.Right
};
Win.Add (selectedCellLabel);
@@ -1107,12 +1107,12 @@ public class TableEditor : Scenario
{
_tableView.Style.ColumnStyles.Clear ();
- var alignMid = new ColumnStyle { Justification = Justification.Centered };
- var alignRight = new ColumnStyle { Justification = Justification.Right };
+ var alignMid = new ColumnStyle { Justification = Alignment.Centered };
+ var alignRight = new ColumnStyle { Justification = Alignment.Right };
var dateFormatStyle = new ColumnStyle
{
- Justification = Justification.Right,
+ Justification = Alignment.Right,
RepresentationGetter = v =>
v is DateTime d ? d.ToString ("yyyy-MM-dd") : v.ToString ()
};
@@ -1126,15 +1126,15 @@ public class TableEditor : Scenario
// align negative values right
d < 0
- ? Justification.Right
+ ? Alignment.Right
:
// align positive values left
- Justification.Left
+ Alignment.Left
:
// not a double
- Justification.Left,
+ Alignment.Left,
ColorGetter = a => a.CellValue is double d
?
diff --git a/UICatalog/Scenarios/Text.cs b/UICatalog/Scenarios/Text.cs
index 7b0e82910..eb48af78c 100644
--- a/UICatalog/Scenarios/Text.cs
+++ b/UICatalog/Scenarios/Text.cs
@@ -290,7 +290,7 @@ public class Text : Scenario
X = Pos.Right (regexProvider) + 1,
Y = Pos.Y (regexProvider),
Width = 30,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Provider = provider2
};
Win.Add (regexProviderField);
diff --git a/UICatalog/Scenarios/TextFormatterDemo.cs b/UICatalog/Scenarios/TextFormatterDemo.cs
index 340385b90..672315755 100644
--- a/UICatalog/Scenarios/TextFormatterDemo.cs
+++ b/UICatalog/Scenarios/TextFormatterDemo.cs
@@ -75,17 +75,17 @@ public class TextFormatterDemo : Scenario
}
}
- List justifications = GetUniqueEnumValues().ToList ();
+ List justifications = GetUniqueEnumValues().ToList ();
Label [] singleLines = new Label [justifications.Count];
Label [] multipleLines = new Label [justifications.Count];
var multiLineHeight = 5;
- foreach (Justification justification in justifications)
+ foreach (Alignment justification in justifications)
{
singleLines [(int)justification] = new()
{
- Justification = justification,
+ TextJustification = justification,
X = 0,
Width = Dim.Fill (),
@@ -96,7 +96,7 @@ public class TextFormatterDemo : Scenario
multipleLines [(int)justification] = new()
{
- Justification = justification,
+ TextJustification = justification,
X = 0,
Width = Dim.Fill (),
@@ -112,7 +112,7 @@ public class TextFormatterDemo : Scenario
};
app.Add (label);
- foreach (Justification justification in justifications)
+ foreach (Alignment justification in justifications)
{
label = new() { Y = Pos.Bottom (label), Text = $"{justification}:" };
app.Add (label);
@@ -124,7 +124,7 @@ public class TextFormatterDemo : Scenario
label = new() { Y = Pos.Bottom (label), Text = "Demonstrating multi-line and word wrap:" };
app.Add (label);
- foreach (Justification justification in justifications)
+ foreach (Alignment justification in justifications)
{
label = new() { Y = Pos.Bottom (label), Text = $"{justification}:" };
app.Add (label);
@@ -135,7 +135,7 @@ public class TextFormatterDemo : Scenario
unicodeCheckBox.Toggled += (s, e) =>
{
- foreach (Justification justification in justifications)
+ foreach (Alignment justification in justifications)
{
singleLines [(int)justification].Text = e.OldValue == true ? text : unicode;
multipleLines [(int)justification].Text = e.OldValue == true ? text : unicode;
diff --git a/UICatalog/Scenarios/TextJustificationAndDirection.cs b/UICatalog/Scenarios/TextJustificationAndDirection.cs
index bafdbfce2..7aa1d1333 100644
--- a/UICatalog/Scenarios/TextJustificationAndDirection.cs
+++ b/UICatalog/Scenarios/TextJustificationAndDirection.cs
@@ -35,7 +35,7 @@ public class TextJustificationAndDirections : Scenario
Y = 1,
Width = 9,
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
ColorScheme = Colors.ColorSchemes ["Dialog"],
Text = "Left"
};
@@ -46,7 +46,7 @@ public class TextJustificationAndDirections : Scenario
Y = 2,
Width = 9,
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
ColorScheme = Colors.ColorSchemes ["Dialog"],
Text = "Centered"
};
@@ -57,7 +57,7 @@ public class TextJustificationAndDirections : Scenario
Y = 3,
Width = 9,
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
ColorScheme = Colors.ColorSchemes ["Dialog"],
Text = "Right"
};
@@ -68,7 +68,7 @@ public class TextJustificationAndDirections : Scenario
Y = 4,
Width = 9,
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
ColorScheme = Colors.ColorSchemes ["Dialog"],
Text = "Justified"
};
@@ -80,7 +80,7 @@ public class TextJustificationAndDirections : Scenario
Width = Dim.Fill (1) - 9,
Height = 1,
ColorScheme = color1,
- Justification = Justification.Left,
+ TextJustification = Alignment.Left,
Text = txt
};
@@ -91,7 +91,7 @@ public class TextJustificationAndDirections : Scenario
Width = Dim.Fill (1) - 9,
Height = 1,
ColorScheme = color2,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Text = txt
};
@@ -102,7 +102,7 @@ public class TextJustificationAndDirections : Scenario
Width = Dim.Fill (1) - 9,
Height = 1,
ColorScheme = color1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = txt
};
@@ -113,7 +113,7 @@ public class TextJustificationAndDirections : Scenario
Width = Dim.Fill (1) - 9,
Height = 1,
ColorScheme = color2,
- Justification = Justification.Justified,
+ TextJustification = Alignment.Justified,
Text = txt
};
@@ -141,7 +141,7 @@ public class TextJustificationAndDirections : Scenario
Height = 9,
ColorScheme = color1,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Bottom,
+ VerticalTextJustification = Alignment.Bottom,
Text = "Top"
};
labelVT.TextFormatter.WordWrap = false;
@@ -154,7 +154,7 @@ public class TextJustificationAndDirections : Scenario
Height = 9,
ColorScheme = color1,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Bottom,
+ VerticalTextJustification = Alignment.Bottom,
Text = "Centered"
};
labelVM.TextFormatter.WordWrap = false;
@@ -167,7 +167,7 @@ public class TextJustificationAndDirections : Scenario
Height = 9,
ColorScheme = color1,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Bottom,
+ VerticalTextJustification = Alignment.Bottom,
Text = "Bottom"
};
labelVB.TextFormatter.WordWrap = false;
@@ -180,7 +180,7 @@ public class TextJustificationAndDirections : Scenario
Height = 9,
ColorScheme = color1,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Bottom,
+ VerticalTextJustification = Alignment.Bottom,
Text = "Justified"
};
labelVJ.TextFormatter.WordWrap = false;
@@ -193,7 +193,7 @@ public class TextJustificationAndDirections : Scenario
Height = Dim.Fill (1),
ColorScheme = color1,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Top,
+ VerticalTextJustification = Alignment.Top,
Text = txt
};
txtLabelVT.TextFormatter.WordWrap = false;
@@ -206,7 +206,7 @@ public class TextJustificationAndDirections : Scenario
Height = Dim.Fill (1),
ColorScheme = color2,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Centered,
+ VerticalTextJustification = Alignment.Centered,
Text = txt
};
txtLabelVM.TextFormatter.WordWrap = false;
@@ -219,7 +219,7 @@ public class TextJustificationAndDirections : Scenario
Height = Dim.Fill (1),
ColorScheme = color1,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Bottom,
+ VerticalTextJustification = Alignment.Bottom,
Text = txt
};
txtLabelVB.TextFormatter.WordWrap = false;
@@ -232,7 +232,7 @@ public class TextJustificationAndDirections : Scenario
Height = Dim.Fill (1),
ColorScheme = color2,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Justified,
+ VerticalTextJustification = Alignment.Justified,
Text = txt
};
txtLabelVJ.TextFormatter.WordWrap = false;
@@ -268,8 +268,8 @@ public class TextJustificationAndDirections : Scenario
Y = 1,
Width = Dim.Percent (100f / 3f),
Height = Dim.Percent (100f / 3f),
- Justification = Justification.Left,
- VerticalJustification = Justification.Top,
+ TextJustification = Alignment.Left,
+ VerticalTextJustification = Alignment.Top,
ColorScheme = color1,
Text = txt
};
@@ -281,8 +281,8 @@ public class TextJustificationAndDirections : Scenario
Y = 1,
Width = Dim.Percent (100f / 3f),
Height = Dim.Percent (100f / 3f),
- Justification = Justification.Centered,
- VerticalJustification = Justification.Top,
+ TextJustification = Alignment.Centered,
+ VerticalTextJustification = Alignment.Top,
ColorScheme = color1,
Text = txt
};
@@ -294,8 +294,8 @@ public class TextJustificationAndDirections : Scenario
Y = 1,
Width = Dim.Percent (100f, true),
Height = Dim.Percent (100f / 3f),
- Justification = Justification.Right,
- VerticalJustification = Justification.Top,
+ TextJustification = Alignment.Right,
+ VerticalTextJustification = Alignment.Top,
ColorScheme = color1,
Text = txt
};
@@ -307,8 +307,8 @@ public class TextJustificationAndDirections : Scenario
Y = Pos.Bottom (txtLabelTL) + 1,
Width = Dim.Width (txtLabelTL),
Height = Dim.Percent (100f / 3f),
- Justification = Justification.Left,
- VerticalJustification = Justification.Centered,
+ TextJustification = Alignment.Left,
+ VerticalTextJustification = Alignment.Centered,
ColorScheme = color1,
Text = txt
};
@@ -320,8 +320,8 @@ public class TextJustificationAndDirections : Scenario
Y = Pos.Bottom (txtLabelTC) + 1,
Width = Dim.Width (txtLabelTC),
Height = Dim.Percent (100f / 3f),
- Justification = Justification.Centered,
- VerticalJustification = Justification.Centered,
+ TextJustification = Alignment.Centered,
+ VerticalTextJustification = Alignment.Centered,
ColorScheme = color1,
Text = txt
};
@@ -333,8 +333,8 @@ public class TextJustificationAndDirections : Scenario
Y = Pos.Bottom (txtLabelTR) + 1,
Width = Dim.Percent (100f, true),
Height = Dim.Percent (100f / 3f),
- Justification = Justification.Right,
- VerticalJustification = Justification.Centered,
+ TextJustification = Alignment.Right,
+ VerticalTextJustification = Alignment.Centered,
ColorScheme = color1,
Text = txt
};
@@ -346,8 +346,8 @@ public class TextJustificationAndDirections : Scenario
Y = Pos.Bottom (txtLabelML) + 1,
Width = Dim.Width (txtLabelML),
Height = Dim.Percent (100f, true),
- Justification = Justification.Left,
- VerticalJustification = Justification.Bottom,
+ TextJustification = Alignment.Left,
+ VerticalTextJustification = Alignment.Bottom,
ColorScheme = color1,
Text = txt
};
@@ -359,8 +359,8 @@ public class TextJustificationAndDirections : Scenario
Y = Pos.Bottom (txtLabelMC) + 1,
Width = Dim.Width (txtLabelMC),
Height = Dim.Percent (100f, true),
- Justification = Justification.Centered,
- VerticalJustification = Justification.Bottom,
+ TextJustification = Alignment.Centered,
+ VerticalTextJustification = Alignment.Bottom,
ColorScheme = color1,
Text = txt
};
@@ -372,8 +372,8 @@ public class TextJustificationAndDirections : Scenario
Y = Pos.Bottom (txtLabelMR) + 1,
Width = Dim.Percent (100f, true),
Height = Dim.Percent (100f, true),
- Justification = Justification.Right,
- VerticalJustification = Justification.Bottom,
+ TextJustification = Alignment.Right,
+ VerticalTextJustification = Alignment.Bottom,
ColorScheme = color1,
Text = txt
};
@@ -392,7 +392,7 @@ public class TextJustificationAndDirections : Scenario
// Save Justification in Data
foreach (Label t in mtxts)
{
- t.Data = new { h = t.Justification, v = t.VerticalJustification };
+ t.Data = new { h = t.TextJustification, v = t.VerticalTextJustification };
}
container.Add (txtLabelTL);
@@ -593,8 +593,8 @@ public class TextJustificationAndDirections : Scenario
foreach (Label t in mtxts)
{
- t.Justification = (Justification)((dynamic)t.Data).h;
- t.VerticalJustification = (Justification)((dynamic)t.Data).v;
+ t.TextJustification = (Alignment)((dynamic)t.Data).h;
+ t.VerticalTextJustification = (Alignment)((dynamic)t.Data).v;
}
}
else
@@ -611,16 +611,16 @@ public class TextJustificationAndDirections : Scenario
switch (justifyOptions.SelectedItem)
{
case 0:
- t.VerticalJustification = Justification.Justified;
- t.Justification = ((dynamic)t.Data).h;
+ t.VerticalTextJustification = Alignment.Justified;
+ t.TextJustification = ((dynamic)t.Data).h;
break;
case 1:
- t.VerticalJustification = (Justification)((dynamic)t.Data).v;
- t.Justification = Justification.Justified;
+ t.VerticalTextJustification = (Alignment)((dynamic)t.Data).v;
+ t.TextJustification = Alignment.Justified;
break;
case 2:
- t.VerticalJustification = Justification.Justified;
- t.Justification = Justification.Justified;
+ t.VerticalTextJustification = Alignment.Justified;
+ t.TextJustification = Alignment.Justified;
break;
}
}
@@ -629,16 +629,16 @@ public class TextJustificationAndDirections : Scenario
switch (justifyOptions.SelectedItem)
{
case 0:
- t.Justification = Justification.Justified;
- t.VerticalJustification = ((dynamic)t.Data).v;
+ t.TextJustification = Alignment.Justified;
+ t.VerticalTextJustification = ((dynamic)t.Data).v;
break;
case 1:
- t.Justification = (Justification)((dynamic)t.Data).h;
- t.VerticalJustification = Justification.Justified;
+ t.TextJustification = (Alignment)((dynamic)t.Data).h;
+ t.VerticalTextJustification = Alignment.Justified;
break;
case 2:
- t.Justification = Justification.Justified;
- t.VerticalJustification = Justification.Justified;
+ t.TextJustification = Alignment.Justified;
+ t.VerticalTextJustification = Alignment.Justified;
break;
}
}
diff --git a/UICatalog/Scenarios/TimeAndDate.cs b/UICatalog/Scenarios/TimeAndDate.cs
index e36114ee0..b61d1d50b 100644
--- a/UICatalog/Scenarios/TimeAndDate.cs
+++ b/UICatalog/Scenarios/TimeAndDate.cs
@@ -57,7 +57,7 @@ public class TimeAndDate : Scenario
{
X = Pos.Center (),
Y = Pos.Bottom (longDate) + 1,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = Dim.Fill (),
Text = "Old Time: "
@@ -68,7 +68,7 @@ public class TimeAndDate : Scenario
{
X = Pos.Center (),
Y = Pos.Bottom (_lblOldTime) + 1,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = Dim.Fill (),
Text = "New Time: "
@@ -79,7 +79,7 @@ public class TimeAndDate : Scenario
{
X = Pos.Center (),
Y = Pos.Bottom (_lblNewTime) + 1,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = Dim.Fill (),
Text = "Time Format: "
@@ -90,7 +90,7 @@ public class TimeAndDate : Scenario
{
X = Pos.Center (),
Y = Pos.Bottom (_lblTimeFmt) + 2,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = Dim.Fill (),
Text = "Old Date: "
@@ -101,7 +101,7 @@ public class TimeAndDate : Scenario
{
X = Pos.Center (),
Y = Pos.Bottom (_lblOldDate) + 1,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = Dim.Fill (),
Text = "New Date: "
@@ -112,7 +112,7 @@ public class TimeAndDate : Scenario
{
X = Pos.Center (),
Y = Pos.Bottom (_lblNewDate) + 1,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = Dim.Fill (),
Text = "Date Format: "
diff --git a/UICatalog/Scenarios/Unicode.cs b/UICatalog/Scenarios/Unicode.cs
index 214156b8d..a8f2fbe42 100644
--- a/UICatalog/Scenarios/Unicode.cs
+++ b/UICatalog/Scenarios/Unicode.cs
@@ -132,7 +132,7 @@ public class UnicodeInMenu : Scenario
Width = Dim.Percent (50),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = $"Justify Right - {gitString}"
};
Win.Add (checkBox, checkBoxRight);
diff --git a/UICatalog/Scenarios/ViewExperiments.cs b/UICatalog/Scenarios/ViewExperiments.cs
index d80a98f5d..fd908dfde 100644
--- a/UICatalog/Scenarios/ViewExperiments.cs
+++ b/UICatalog/Scenarios/ViewExperiments.cs
@@ -60,7 +60,7 @@ public class ViewExperiments : Scenario
Width = 17,
Title = "Window 1",
Text = "Window #2",
- Justification = Justification.Centered
+ TextJustification = Alignment.Centered
};
window1.Margin.Thickness = new (0);
@@ -84,7 +84,7 @@ public class ViewExperiments : Scenario
Width = 37,
Title = "Window2",
Text = "Window #2 (Right(window1)+1",
- Justification = Justification.Centered
+ TextJustification = Alignment.Centered
};
//view3.InitializeFrames ();
@@ -109,7 +109,7 @@ public class ViewExperiments : Scenario
Width = 37,
Title = "View4",
Text = "View #4 (Right(window2)+1",
- Justification = Justification.Centered
+ TextJustification = Alignment.Centered
};
//view4.InitializeFrames ();
@@ -134,7 +134,7 @@ public class ViewExperiments : Scenario
Width = Dim.Fill (),
Title = "View5",
Text = "View #5 (Right(view4)+1 Fill",
- Justification = Justification.Centered
+ TextJustification = Alignment.Centered
};
//view5.InitializeFrames ();
@@ -181,7 +181,7 @@ public class ViewExperiments : Scenario
X = Pos.Center (),
Y = Pos.Percent (50),
Width = 30,
- Justification = Justification.Centered
+ TextJustification = Alignment.Centered
};
label50.Border.Thickness = new (1, 3, 1, 1);
label50.Height = 5;
diff --git a/UICatalog/Scenarios/Wizards.cs b/UICatalog/Scenarios/Wizards.cs
index d034ffc7f..d8d99d8a8 100644
--- a/UICatalog/Scenarios/Wizards.cs
+++ b/UICatalog/Scenarios/Wizards.cs
@@ -21,7 +21,7 @@ public class Wizards : Scenario
};
Win.Add (frame);
- var label = new Label { X = 0, Y = 0, Justification = Justification.Right, Text = "Width:" };
+ var label = new Label { X = 0, Y = 0, TextJustification = Alignment.Right, Text = "Width:" };
frame.Add (label);
var widthEdit = new TextField
@@ -41,7 +41,7 @@ public class Wizards : Scenario
Width = Dim.Width (label),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Height:"
};
frame.Add (label);
@@ -63,7 +63,7 @@ public class Wizards : Scenario
Width = Dim.Width (label),
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Text = "Title:"
};
frame.Add (label);
@@ -88,7 +88,7 @@ public class Wizards : Scenario
label = new()
{
- X = Pos.Center (), Y = Pos.AnchorEnd (1), Justification = Justification.Right, Text = "Action:"
+ X = Pos.Center (), Y = Pos.AnchorEnd (1), TextJustification = Alignment.Right, Text = "Action:"
};
Win.Add (label);
diff --git a/UnitTests/Configuration/ThemeScopeTests.cs b/UnitTests/Configuration/ThemeScopeTests.cs
index 928993ede..1103d92fe 100644
--- a/UnitTests/Configuration/ThemeScopeTests.cs
+++ b/UnitTests/Configuration/ThemeScopeTests.cs
@@ -29,12 +29,12 @@ public class ThemeScopeTests
{
Reset ();
Assert.NotEmpty (Themes);
- Assert.Equal (Justification.Right, Dialog.DefaultButtonJustification);
+ Assert.Equal (Alignment.Right, Dialog.DefaultButtonJustification);
- Themes ["Default"] ["Dialog.DefaultButtonJustification"].PropertyValue = Justification.Centered;
+ Themes ["Default"] ["Dialog.DefaultButtonJustification"].PropertyValue = Alignment.Centered;
ThemeManager.Themes! [ThemeManager.SelectedTheme]!.Apply ();
- Assert.Equal (Justification.Centered, Dialog.DefaultButtonJustification);
+ Assert.Equal (Alignment.Centered, Dialog.DefaultButtonJustification);
Reset ();
}
diff --git a/UnitTests/Configuration/ThemeTests.cs b/UnitTests/Configuration/ThemeTests.cs
index 6a32293c7..e63e77515 100644
--- a/UnitTests/Configuration/ThemeTests.cs
+++ b/UnitTests/Configuration/ThemeTests.cs
@@ -77,15 +77,15 @@ public class ThemeTests
public void TestSerialize_RoundTrip ()
{
var theme = new ThemeScope ();
- theme ["Dialog.DefaultButtonJustification"].PropertyValue = Justification.Right;
+ theme ["Dialog.DefaultButtonJustification"].PropertyValue = Alignment.Right;
string json = JsonSerializer.Serialize (theme, _jsonOptions);
var deserialized = JsonSerializer.Deserialize (json, _jsonOptions);
Assert.Equal (
- Justification.Right,
- (Justification)deserialized ["Dialog.DefaultButtonJustification"].PropertyValue
+ Alignment.Right,
+ (Alignment)deserialized ["Dialog.DefaultButtonJustification"].PropertyValue
);
Reset ();
}
diff --git a/UnitTests/Dialogs/DialogTests.cs b/UnitTests/Dialogs/DialogTests.cs
index 2c9e6df04..6595b8753 100644
--- a/UnitTests/Dialogs/DialogTests.cs
+++ b/UnitTests/Dialogs/DialogTests.cs
@@ -32,7 +32,7 @@ public class DialogTests
Title = title,
Width = width,
Height = 1,
- ButtonJustification = Justification.Centered,
+ ButtonJustification = Alignment.Centered,
Buttons = [new Button { Text = btn1Text }]
};
@@ -57,7 +57,7 @@ public class DialogTests
Title = title,
Width = width,
Height = 1,
- ButtonJustification = Justification.Justified,
+ ButtonJustification = Alignment.Justified,
Buttons = [new Button { Text = btn1Text }]
};
@@ -82,7 +82,7 @@ public class DialogTests
Title = title,
Width = width,
Height = 1,
- ButtonJustification = Justification.Right,
+ ButtonJustification = Alignment.Right,
Buttons = [new Button { Text = btn1Text }]
};
@@ -107,7 +107,7 @@ public class DialogTests
Title = title,
Width = width,
Height = 1,
- ButtonJustification = Justification.Left,
+ ButtonJustification = Alignment.Left,
Buttons = [new Button { Text = btn1Text }]
};
@@ -155,7 +155,7 @@ public class DialogTests
(runstate, Dialog dlg) = RunButtonTestDialog (
title,
width,
- Justification.Centered,
+ Alignment.Centered,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -172,7 +172,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Justified,
+ Alignment.Justified,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -189,7 +189,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Right,
+ Alignment.Right,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -206,7 +206,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Left,
+ Alignment.Left,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -248,7 +248,7 @@ public class DialogTests
(runstate, Dialog dlg) = RunButtonTestDialog (
title,
width,
- Justification.Centered,
+ Alignment.Centered,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -266,7 +266,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Justified,
+ Alignment.Justified,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -283,7 +283,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Right,
+ Alignment.Right,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -299,7 +299,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Left,
+ Alignment.Left,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -340,7 +340,7 @@ public class DialogTests
(runstate, Dialog dlg) = RunButtonTestDialog (
title,
width,
- Justification.Centered,
+ Alignment.Centered,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -357,7 +357,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Justified,
+ Alignment.Justified,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -374,7 +374,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Right,
+ Alignment.Right,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -391,7 +391,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Left,
+ Alignment.Left,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -434,7 +434,7 @@ public class DialogTests
(runstate, Dialog dlg) = RunButtonTestDialog (
title,
width,
- Justification.Centered,
+ Alignment.Centered,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -451,7 +451,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Justified,
+ Alignment.Justified,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -468,7 +468,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Right,
+ Alignment.Right,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -485,7 +485,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Left,
+ Alignment.Left,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text },
@@ -517,7 +517,7 @@ public class DialogTests
(runstate, Dialog dlg) = RunButtonTestDialog (
title,
width,
- Justification.Centered,
+ Alignment.Centered,
new Button { Text = btnText }
);
@@ -534,7 +534,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Justified,
+ Alignment.Justified,
new Button { Text = btnText }
);
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
@@ -549,7 +549,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Right,
+ Alignment.Right,
new Button { Text = btnText }
);
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
@@ -564,7 +564,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Left,
+ Alignment.Left,
new Button { Text = btnText }
);
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
@@ -581,7 +581,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Centered,
+ Alignment.Centered,
new Button { Text = btnText }
);
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
@@ -596,7 +596,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Justified,
+ Alignment.Justified,
new Button { Text = btnText }
);
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
@@ -611,7 +611,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Right,
+ Alignment.Right,
new Button { Text = btnText }
);
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
@@ -626,7 +626,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Left,
+ Alignment.Left,
new Button { Text = btnText }
);
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
@@ -660,7 +660,7 @@ public class DialogTests
(runstate, Dialog dlg) = RunButtonTestDialog (
title,
width,
- Justification.Centered,
+ Alignment.Centered,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text }
@@ -676,7 +676,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Justified,
+ Alignment.Justified,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text }
@@ -692,7 +692,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Right,
+ Alignment.Right,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text }
@@ -708,7 +708,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Left,
+ Alignment.Left,
new Button { Text = btn1Text },
new Button { Text = btn2Text },
new Button { Text = btn3Text }
@@ -742,7 +742,7 @@ public class DialogTests
(runstate, Dialog dlg) = RunButtonTestDialog (
title,
width,
- Justification.Centered,
+ Alignment.Centered,
new Button { Text = btn1Text },
new Button { Text = btn2Text }
);
@@ -757,7 +757,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Justified,
+ Alignment.Justified,
new Button { Text = btn1Text },
new Button { Text = btn2Text }
);
@@ -772,7 +772,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Right,
+ Alignment.Right,
new Button { Text = btn1Text },
new Button { Text = btn2Text }
);
@@ -787,7 +787,7 @@ public class DialogTests
(runstate, dlg) = RunButtonTestDialog (
title,
width,
- Justification.Left,
+ Alignment.Left,
new Button { Text = btn1Text },
new Button { Text = btn2Text }
);
@@ -824,7 +824,7 @@ public class DialogTests
// Default (Center)
button1 = new Button { Text = btn1Text };
button2 = new Button { Text = btn2Text };
- (runstate, dlg) = RunButtonTestDialog (title, width, Justification.Centered, button1, button2);
+ (runstate, dlg) = RunButtonTestDialog (title, width, Alignment.Centered, button1, button2);
button1.Visible = false;
RunIteration (ref runstate, ref firstIteration);
buttonRow = $@"{CM.Glyphs.VLine} {btn2} {CM.Glyphs.VLine}";
@@ -836,7 +836,7 @@ public class DialogTests
Assert.Equal (width, buttonRow.Length);
button1 = new Button { Text = btn1Text };
button2 = new Button { Text = btn2Text };
- (runstate, dlg) = RunButtonTestDialog (title, width, Justification.Justified, button1, button2);
+ (runstate, dlg) = RunButtonTestDialog (title, width, Alignment.Justified, button1, button2);
button1.Visible = false;
RunIteration (ref runstate, ref firstIteration);
buttonRow = $@"{CM.Glyphs.VLine} {btn2}{CM.Glyphs.VLine}";
@@ -848,7 +848,7 @@ public class DialogTests
Assert.Equal (width, buttonRow.Length);
button1 = new Button { Text = btn1Text };
button2 = new Button { Text = btn2Text };
- (runstate, dlg) = RunButtonTestDialog (title, width, Justification.Right, button1, button2);
+ (runstate, dlg) = RunButtonTestDialog (title, width, Alignment.Right, button1, button2);
button1.Visible = false;
RunIteration (ref runstate, ref firstIteration);
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
@@ -859,7 +859,7 @@ public class DialogTests
Assert.Equal (width, buttonRow.Length);
button1 = new Button { Text = btn1Text };
button2 = new Button { Text = btn2Text };
- (runstate, dlg) = RunButtonTestDialog (title, width, Justification.Left, button1, button2);
+ (runstate, dlg) = RunButtonTestDialog (title, width, Alignment.Left, button1, button2);
button1.Visible = false;
RunIteration (ref runstate, ref firstIteration);
buttonRow = $@"{CM.Glyphs.VLine} {btn2} {CM.Glyphs.VLine}";
@@ -889,7 +889,7 @@ public class DialogTests
win.Loaded += (s, a) =>
{
- Dialog.DefaultButtonJustification = Justification.Centered;
+ Dialog.DefaultButtonJustification = Alignment.Centered;
var dlg = new Dialog { Width = 18, Height = 3, Buttons = [new () { Text = "Ok" }] };
dlg.Loaded += (s, a) =>
@@ -973,7 +973,7 @@ public class DialogTests
var win = new Window ();
int iterations = -1;
- Dialog.DefaultButtonJustification = Justification.Centered;
+ Dialog.DefaultButtonJustification = Alignment.Centered;
Iteration += (s, a) =>
{
@@ -1008,7 +1008,7 @@ public class DialogTests
public void Dialog_Opened_From_Another_Dialog ()
{
((FakeDriver)Driver).SetBufferSize (30, 10);
- Dialog.DefaultButtonJustification = Justification.Centered;
+ Dialog.DefaultButtonJustification = Alignment.Centered;
var btn1 = new Button { Text = "press me 1" };
Button btn2 = null;
@@ -1285,7 +1285,7 @@ public class DialogTests
(runstate, Dialog _) = RunButtonTestDialog (
title,
width,
- Justification.Centered,
+ Alignment.Centered,
new Button { Text = btnText }
);
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
@@ -1338,7 +1338,7 @@ public class DialogTests
int width = buttonRow.Length;
d.SetBufferSize (buttonRow.Length, 3);
- (runstate, Dialog dlg) = RunButtonTestDialog (title, width, Justification.Centered, null);
+ (runstate, Dialog dlg) = RunButtonTestDialog (title, width, Alignment.Centered, null);
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
End (runstate);
@@ -1348,7 +1348,7 @@ public class DialogTests
private (RunState, Dialog) RunButtonTestDialog (
string title,
int width,
- Justification align,
+ Alignment align,
params Button [] btns
)
{
diff --git a/UnitTests/Drawing/AlignerTests.cs b/UnitTests/Drawing/AlignerTests.cs
new file mode 100644
index 000000000..0b1f661ca
--- /dev/null
+++ b/UnitTests/Drawing/AlignerTests.cs
@@ -0,0 +1,452 @@
+using System.Text;
+using Xunit.Abstractions;
+
+namespace Terminal.Gui.DrawingTests;
+
+public class AlignerTests (ITestOutputHelper output)
+{
+ private readonly ITestOutputHelper _output = output;
+
+ public static IEnumerable AlignmentEnumValues ()
+ {
+ foreach (object number in Enum.GetValues (typeof (Alignment)))
+ {
+ yield return new [] { number };
+ }
+ }
+
+ [Theory]
+ [MemberData (nameof (AlignmentEnumValues))]
+ public void NoItems_Works (Alignment alignment)
+ {
+ int [] sizes = [];
+ int [] positions = Aligner.Align (alignment, false, 100, sizes);
+ Assert.Equal (new int [] { }, positions);
+ }
+
+ [Theory]
+ [MemberData (nameof (AlignmentEnumValues))]
+ public void Negative_Widths_Not_Allowed (Alignment alignment)
+ {
+ Assert.Throws (
+ () => new Aligner
+ {
+ Alignment = alignment,
+ ContainerSize = 100
+ }.Align (new [] { -10, 20, 30 }));
+
+ Assert.Throws (
+ () => new Aligner
+ {
+ Alignment = alignment,
+ ContainerSize = 100
+ }.Align (new [] { 10, -20, 30 }));
+
+ Assert.Throws (
+ () => new Aligner
+ {
+ Alignment = alignment,
+ ContainerSize = 100
+ }.Align (new [] { 10, 20, -30 }));
+ }
+
+ [Theory]
+ [InlineData (Alignment.Left, new [] { 0 }, 1, new [] { 0 })]
+ [InlineData (Alignment.Left, new [] { 0, 0 }, 1, new [] { 0, 1 })]
+ [InlineData (Alignment.Left, new [] { 0, 0, 0 }, 1, new [] { 0, 1, 1 })]
+ [InlineData (Alignment.Left, new [] { 1 }, 1, new [] { 0 })]
+ [InlineData (Alignment.Left, new [] { 1 }, 2, new [] { 0 })]
+ [InlineData (Alignment.Left, new [] { 1 }, 3, new [] { 0 })]
+ [InlineData (Alignment.Left, new [] { 1, 1 }, 2, new [] { 0, 1 })]
+ [InlineData (Alignment.Left, new [] { 1, 1 }, 3, new [] { 0, 2 })]
+ [InlineData (Alignment.Left, new [] { 1, 1 }, 4, new [] { 0, 2 })]
+ [InlineData (Alignment.Left, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 7, new [] { 0, 2, 4 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 10, new [] { 0, 2, 5 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 11, new [] { 0, 2, 5 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 12, new [] { 0, 2, 5 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 13, new [] { 0, 2, 5 })]
+ [InlineData (
+ Alignment.Left,
+ new [] { 1, 2, 3 },
+ 5,
+ new [] { 0, 1, 3 })] // 5 is too small to fit the items. The first item is at 0, the items to the right are clipped.
+ [InlineData (Alignment.Left, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
+ [InlineData (Alignment.Left, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
+ [InlineData (Alignment.Left, new [] { 10 }, 101, new [] { 0 })]
+ [InlineData (Alignment.Left, new [] { 10, 20 }, 101, new [] { 0, 11 })]
+ [InlineData (Alignment.Left, new [] { 10, 20, 30 }, 100, new [] { 0, 11, 32 })]
+ [InlineData (Alignment.Left, new [] { 10, 20, 30 }, 101, new [] { 0, 11, 32 })]
+ [InlineData (Alignment.Left, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
+ [InlineData (Alignment.Left, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
+ [InlineData (Alignment.Right, new [] { 0 }, 1, new [] { 1 })]
+ [InlineData (Alignment.Right, new [] { 0, 0 }, 1, new [] { 0, 1 })]
+ [InlineData (Alignment.Right, new [] { 0, 0, 0 }, 1, new [] { 0, 1, 1 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 7, new [] { 0, 2, 4 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 10, new [] { 2, 4, 7 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 11, new [] { 3, 5, 8 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 12, new [] { 4, 6, 9 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 13, new [] { 5, 7, 10 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 5, new [] { -1, 0, 2 })] // 5 is too small to fit the items. The first item is at -1.
+ [InlineData (Alignment.Right, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
+ [InlineData (Alignment.Right, new [] { 10, 20, 30 }, 100, new [] { 38, 49, 70 })]
+ [InlineData (Alignment.Right, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
+ [InlineData (Alignment.Right, new [] { 10 }, 101, new [] { 91 })]
+ [InlineData (Alignment.Right, new [] { 10, 20 }, 101, new [] { 70, 81 })]
+ [InlineData (Alignment.Right, new [] { 10, 20, 30 }, 101, new [] { 39, 50, 71 })]
+ [InlineData (Alignment.Right, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
+ [InlineData (Alignment.Right, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
+ [InlineData (Alignment.Centered, new [] { 0 }, 1, new [] { 0 })]
+ [InlineData (Alignment.Centered, new [] { 0, 0 }, 1, new [] { 0, 1 })]
+ [InlineData (Alignment.Centered, new [] { 0, 0, 0 }, 1, new [] { 0, 1, 1 })]
+ [InlineData (Alignment.Centered, new [] { 1 }, 1, new [] { 0 })]
+ [InlineData (Alignment.Centered, new [] { 1 }, 2, new [] { 0 })]
+ [InlineData (Alignment.Centered, new [] { 1 }, 3, new [] { 1 })]
+ [InlineData (Alignment.Centered, new [] { 1, 1 }, 2, new [] { 0, 1 })]
+ [InlineData (Alignment.Centered, new [] { 1, 1 }, 3, new [] { 0, 2 })]
+ [InlineData (Alignment.Centered, new [] { 1, 1 }, 4, new [] { 0, 2 })]
+ [InlineData (Alignment.Centered, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3 }, 7, new [] { 0, 2, 4 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3 }, 10, new [] { 1, 3, 6 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3 }, 11, new [] { 1, 3, 6 })]
+ [InlineData (
+ Alignment.Centered,
+ new [] { 1, 2, 3 },
+ 5,
+ new [] { 0, 1, 3 })] // 5 is too small to fit the items. The first item is at 0, the items to the right are clipped.
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
+ [InlineData (Alignment.Centered, new [] { 3, 3, 3 }, 9, new [] { 0, 3, 6 })]
+ [InlineData (Alignment.Centered, new [] { 3, 3, 3 }, 10, new [] { 0, 4, 7 })]
+ [InlineData (Alignment.Centered, new [] { 3, 3, 3 }, 11, new [] { 0, 4, 8 })]
+ [InlineData (Alignment.Centered, new [] { 3, 3, 3 }, 12, new [] { 0, 4, 8 })]
+ [InlineData (Alignment.Centered, new [] { 3, 3, 3 }, 13, new [] { 1, 5, 9 })]
+ [InlineData (Alignment.Centered, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
+ [InlineData (Alignment.Centered, new [] { 33, 33, 33 }, 101, new [] { 0, 34, 68 })]
+ [InlineData (Alignment.Centered, new [] { 33, 33, 33 }, 102, new [] { 0, 34, 68 })]
+ [InlineData (Alignment.Centered, new [] { 33, 33, 33 }, 103, new [] { 1, 35, 69 })]
+ [InlineData (Alignment.Centered, new [] { 33, 33, 33 }, 104, new [] { 1, 35, 69 })]
+ [InlineData (Alignment.Centered, new [] { 10 }, 101, new [] { 45 })]
+ [InlineData (Alignment.Centered, new [] { 10, 20 }, 101, new [] { 35, 46 })]
+ [InlineData (Alignment.Centered, new [] { 10, 20, 30 }, 100, new [] { 19, 30, 51 })]
+ [InlineData (Alignment.Centered, new [] { 10, 20, 30 }, 101, new [] { 19, 30, 51 })]
+ [InlineData (Alignment.Centered, new [] { 10, 20, 30, 40 }, 100, new [] { 0, 10, 30, 60 })]
+ [InlineData (Alignment.Centered, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
+ [InlineData (Alignment.Centered, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
+ [InlineData (Alignment.Centered, new [] { 3, 4, 5, 6 }, 25, new [] { 2, 6, 11, 17 })]
+ [InlineData (Alignment.Justified, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
+ [InlineData (Alignment.Justified, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
+ [InlineData (Alignment.Justified, new [] { 10, 20, 30 }, 100, new [] { 0, 30, 70 })]
+ [InlineData (Alignment.Justified, new [] { 10, 20, 30 }, 101, new [] { 0, 31, 71 })]
+ [InlineData (Alignment.Justified, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
+ [InlineData (Alignment.Justified, new [] { 11, 17, 23 }, 100, new [] { 0, 36, 77 })]
+ [InlineData (Alignment.Justified, new [] { 1, 2, 3 }, 11, new [] { 0, 4, 8 })]
+ [InlineData (Alignment.Justified, new [] { 10, 20 }, 101, new [] { 0, 81 })]
+ [InlineData (Alignment.Justified, new [] { 10 }, 101, new [] { 0 })]
+ [InlineData (Alignment.Justified, new [] { 3, 3, 3 }, 21, new [] { 0, 9, 18 })]
+ [InlineData (Alignment.Justified, new [] { 3, 4, 5 }, 21, new [] { 0, 8, 16 })]
+ [InlineData (Alignment.Justified, new [] { 3, 4, 5, 6 }, 18, new [] { 0, 3, 7, 12 })]
+ [InlineData (Alignment.Justified, new [] { 3, 4, 5, 6 }, 19, new [] { 0, 4, 8, 13 })]
+ [InlineData (Alignment.Justified, new [] { 3, 4, 5, 6 }, 20, new [] { 0, 4, 9, 14 })]
+ [InlineData (Alignment.Justified, new [] { 3, 4, 5, 6 }, 21, new [] { 0, 4, 9, 15 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 22, new [] { 0, 8, 14, 19 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 23, new [] { 0, 8, 15, 20 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 24, new [] { 0, 8, 15, 21 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 25, new [] { 0, 9, 16, 22 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 26, new [] { 0, 9, 17, 23 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 31, new [] { 0, 11, 20, 28 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 0 }, 1, new [] { 1 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 0, 0 }, 1, new [] { 0, 1 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 0, 0, 0 }, 1, new [] { 0, 1, 1 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1 }, 1, new [] { 0 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1 }, 2, new [] { 1 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1 }, 3, new [] { 2 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 1 }, 2, new [] { 0, 1 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 1 }, 3, new [] { 0, 2 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 1 }, 4, new [] { 0, 3 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 7, new [] { 0, 2, 4 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 8, new [] { 0, 2, 5 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 9, new [] { 0, 2, 6 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 10, new [] { 0, 2, 7 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 11, new [] { 0, 2, 8 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 5, new [] { -1, 0, 2 })] // 5 is too small to fit the items. The first item is at -1.})]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 3, 3, 3 }, 21, new [] { 0, 4, 18 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 3, 4, 5 }, 21, new [] { 0, 4, 16 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10 }, 101, new [] { 91 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10, 20 }, 101, new [] { 0, 81 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10, 20, 30 }, 100, new [] { 0, 11, 70 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10, 20, 30 }, 101, new [] { 0, 11, 71 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 0 }, 1, new [] { 0 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 0, 0 }, 1, new [] { 0, 1 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 0, 0, 0 }, 1, new [] { 0, 0, 1 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1 }, 1, new [] { 0 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1 }, 2, new [] { 0 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1 }, 3, new [] { 0 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 1 }, 2, new [] { 0, 1 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 1 }, 3, new [] { 0, 2 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 1 }, 4, new [] { 0, 3 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 7, new [] { 0, 1, 4 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 8, new [] { 0, 2, 5 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 9, new [] { 0, 3, 6 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 10, new [] { 0, 4, 7 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 11, new [] { 0, 5, 8 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 5, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 1, 3, 7 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 12, new [] { 0, 1, 4, 8 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 3, 3, 3 }, 21, new [] { 0, 14, 18 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 3, 4, 5 }, 21, new [] { 0, 11, 16 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 33, 33, 33 }, 100, new [] { 0, 33, 67 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10 }, 101, new [] { 0 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10, 20 }, 101, new [] { 0, 81 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10, 20, 30 }, 100, new [] { 0, 49, 70 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10, 20, 30 }, 101, new [] { 0, 50, 71 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 10, 30, 61 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 10, 30, 60, 101 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 3, 3, 3 }, 21, new [] { 0, 14, 18 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 3, 4, 5 }, 21, new [] { 0, 11, 16 })]
+ public void Alignment_PutSpaceBetweenItems (Alignment alignment, int [] sizes, int containerSize, int [] expected)
+ {
+ int [] positions = new Aligner
+ {
+ PutSpaceBetweenItems = true,
+ Alignment = alignment,
+ ContainerSize = containerSize
+ }.Align (sizes);
+ AssertAlignment (alignment, sizes, containerSize, positions, expected);
+ }
+
+ [Theory]
+ [InlineData (Alignment.Left, new [] { 0 }, 1, new [] { 0 })]
+ [InlineData (Alignment.Left, new [] { 0, 0 }, 1, new [] { 0, 0 })]
+ [InlineData (Alignment.Left, new [] { 0, 0, 0 }, 1, new [] { 0, 0, 0 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 7, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 10, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 11, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 12, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3 }, 13, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.Left, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 1, 3, 6 })]
+ [InlineData (
+ Alignment.Left,
+ new [] { 1, 2, 3 },
+ 5,
+ new [] { 0, 1, 3 })] // 5 is too small to fit the items. The first item is at 0, the items to the right are clipped.
+ [InlineData (Alignment.Left, new [] { 10, 20, 30 }, 100, new [] { 0, 10, 30 })]
+ [InlineData (Alignment.Left, new [] { 33, 33, 33 }, 100, new [] { 0, 33, 66 })]
+ [InlineData (Alignment.Left, new [] { 10 }, 101, new [] { 0 })]
+ [InlineData (Alignment.Left, new [] { 10, 20 }, 101, new [] { 0, 10 })]
+ [InlineData (Alignment.Left, new [] { 10, 20, 30 }, 101, new [] { 0, 10, 30 })]
+ [InlineData (Alignment.Left, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 10, 30, 60 })]
+ [InlineData (Alignment.Left, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 10, 30, 60, 100 })]
+ [InlineData (Alignment.Right, new [] { 0 }, 1, new [] { 1 })]
+ [InlineData (Alignment.Right, new [] { 0, 0 }, 1, new [] { 1, 1 })]
+ [InlineData (Alignment.Right, new [] { 0, 0, 0 }, 1, new [] { 1, 1, 1 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 7, new [] { 1, 2, 4 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 10, new [] { 4, 5, 7 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 11, new [] { 5, 6, 8 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 12, new [] { 6, 7, 9 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 13, new [] { 7, 8, 10 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3 }, 5, new [] { -1, 0, 2 })] // 5 is too small to fit the items. The first item is at -1.
+ [InlineData (Alignment.Right, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.Right, new [] { 1, 2, 3, 4 }, 11, new [] { 1, 2, 4, 7 })]
+ [InlineData (Alignment.Right, new [] { 10, 20, 30 }, 100, new [] { 40, 50, 70 })]
+ [InlineData (Alignment.Right, new [] { 33, 33, 33 }, 100, new [] { 1, 34, 67 })]
+ [InlineData (Alignment.Right, new [] { 10 }, 101, new [] { 91 })]
+ [InlineData (Alignment.Right, new [] { 10, 20 }, 101, new [] { 71, 81 })]
+ [InlineData (Alignment.Right, new [] { 10, 20, 30 }, 101, new [] { 41, 51, 71 })]
+ [InlineData (Alignment.Right, new [] { 10, 20, 30, 40 }, 101, new [] { 1, 11, 31, 61 })]
+ [InlineData (Alignment.Right, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 1, 11, 31, 61, 101 })]
+ [InlineData (Alignment.Centered, new [] { 1 }, 1, new [] { 0 })]
+ [InlineData (Alignment.Centered, new [] { 1 }, 2, new [] { 0 })]
+ [InlineData (Alignment.Centered, new [] { 1 }, 3, new [] { 1 })]
+ [InlineData (Alignment.Centered, new [] { 1, 1 }, 2, new [] { 0, 1 })]
+ [InlineData (Alignment.Centered, new [] { 1, 1 }, 3, new [] { 0, 1 })]
+ [InlineData (Alignment.Centered, new [] { 1, 1 }, 4, new [] { 1, 2 })]
+ [InlineData (Alignment.Centered, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3 }, 7, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3 }, 10, new [] { 2, 3, 5 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3 }, 11, new [] { 2, 3, 5 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.Centered, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.Centered, new [] { 3, 3, 3 }, 9, new [] { 0, 3, 6 })]
+ [InlineData (Alignment.Centered, new [] { 3, 3, 3 }, 10, new [] { 0, 3, 6 })]
+ [InlineData (Alignment.Centered, new [] { 3, 3, 3 }, 11, new [] { 1, 4, 7 })]
+ [InlineData (Alignment.Centered, new [] { 3, 3, 3 }, 12, new [] { 1, 4, 7 })]
+ [InlineData (Alignment.Centered, new [] { 3, 3, 3 }, 13, new [] { 2, 5, 8 })]
+ [InlineData (
+ Alignment.Centered,
+ new [] { 1, 2, 3 },
+ 5,
+ new [] { 0, 1, 3 })] // 5 is too small to fit the items. The first item is at 0, the items to the right are clipped.
+ [InlineData (Alignment.Centered, new [] { 33, 33, 33 }, 100, new [] { 0, 33, 66 })]
+ [InlineData (Alignment.Centered, new [] { 33, 33, 33 }, 101, new [] { 1, 34, 67 })]
+ [InlineData (Alignment.Centered, new [] { 33, 33, 33 }, 102, new [] { 1, 34, 67 })]
+ [InlineData (Alignment.Centered, new [] { 33, 33, 33 }, 103, new [] { 2, 35, 68 })]
+ [InlineData (Alignment.Centered, new [] { 33, 33, 33 }, 104, new [] { 2, 35, 68 })]
+ [InlineData (Alignment.Centered, new [] { 3, 4, 5, 6 }, 25, new [] { 3, 6, 10, 15 })]
+ [InlineData (Alignment.Justified, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
+ [InlineData (Alignment.Justified, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
+ [InlineData (Alignment.Justified, new [] { 10, 20, 30 }, 100, new [] { 0, 30, 70 })]
+ [InlineData (Alignment.Justified, new [] { 10, 20, 30 }, 101, new [] { 0, 31, 71 })]
+ [InlineData (Alignment.Justified, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
+ [InlineData (Alignment.Justified, new [] { 11, 17, 23 }, 100, new [] { 0, 36, 77 })]
+ [InlineData (Alignment.Justified, new [] { 1, 2, 3 }, 11, new [] { 0, 4, 8 })]
+ [InlineData (Alignment.Justified, new [] { 10, 20 }, 101, new [] { 0, 81 })]
+ [InlineData (Alignment.Justified, new [] { 10 }, 101, new [] { 0 })]
+ [InlineData (Alignment.Justified, new [] { 3, 3, 3 }, 21, new [] { 0, 9, 18 })]
+ [InlineData (Alignment.Justified, new [] { 3, 4, 5 }, 21, new [] { 0, 8, 16 })]
+ [InlineData (Alignment.Justified, new [] { 3, 4, 5, 6 }, 18, new [] { 0, 3, 7, 12 })]
+ [InlineData (Alignment.Justified, new [] { 3, 4, 5, 6 }, 19, new [] { 0, 4, 8, 13 })]
+ [InlineData (Alignment.Justified, new [] { 3, 4, 5, 6 }, 20, new [] { 0, 4, 9, 14 })]
+ [InlineData (Alignment.Justified, new [] { 3, 4, 5, 6 }, 21, new [] { 0, 4, 9, 15 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 22, new [] { 0, 8, 14, 19 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 23, new [] { 0, 8, 15, 20 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 24, new [] { 0, 8, 15, 21 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 25, new [] { 0, 9, 16, 22 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 26, new [] { 0, 9, 17, 23 })]
+ [InlineData (Alignment.Justified, new [] { 6, 5, 4, 3 }, 31, new [] { 0, 11, 20, 28 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 0 }, 1, new [] { 1 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 0, 0 }, 1, new [] { 0, 1 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 0, 0, 0 }, 1, new [] { 0, 0, 1 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1 }, 1, new [] { 0 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1 }, 2, new [] { 1 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1 }, 3, new [] { 2 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 1 }, 2, new [] { 0, 1 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 1 }, 3, new [] { 0, 2 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 1 }, 4, new [] { 0, 3 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 7, new [] { 0, 1, 4 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 8, new [] { 0, 1, 5 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 9, new [] { 0, 1, 6 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 10, new [] { 0, 1, 7 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3 }, 11, new [] { 0, 1, 8 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 1, 3, 7 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 1, 2, 3, 4 }, 12, new [] { 0, 1, 3, 8 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 3, 3, 3 }, 21, new [] { 0, 3, 18 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 3, 4, 5 }, 21, new [] { 0, 3, 16 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 33, 33, 33 }, 100, new [] { 0, 33, 67 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10 }, 101, new [] { 91 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10, 20 }, 101, new [] { 0, 81 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10, 20, 30 }, 100, new [] { 0, 10, 70 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10, 20, 30 }, 101, new [] { 0, 10, 71 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 10, 30, 61 })]
+ [InlineData (Alignment.LastRightRestLeft, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 10, 30, 60, 101 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 0 }, 1, new [] { 0 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 0, 0 }, 1, new [] { 0, 1 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 0, 0, 0 }, 1, new [] { 0, 1, 1 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1 }, 1, new [] { 0 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1 }, 2, new [] { 0 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1 }, 3, new [] { 0 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 1 }, 2, new [] { 0, 1 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 1 }, 3, new [] { 0, 2 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 1 }, 4, new [] { 0, 3 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 7, new [] { 0, 2, 4 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 8, new [] { 0, 3, 5 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 9, new [] { 0, 4, 6 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 10, new [] { 0, 5, 7 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3 }, 11, new [] { 0, 6, 8 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 12, new [] { 0, 3, 5, 8 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 3, 3, 3 }, 21, new [] { 0, 15, 18 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 3, 4, 5 }, 21, new [] { 0, 12, 16 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10 }, 101, new [] { 0 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10, 20 }, 101, new [] { 0, 81 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10, 20, 30 }, 100, new [] { 0, 50, 70 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10, 20, 30 }, 101, new [] { 0, 51, 71 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
+ [InlineData (Alignment.FirstLeftRestRight, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
+ public void Alignment_NoSpaceBetweenItems (Alignment alignment, int [] sizes, int containerSize, int [] expected)
+ {
+ int [] positions = new Aligner
+ {
+ PutSpaceBetweenItems = false,
+ Alignment = alignment,
+ ContainerSize = containerSize
+ }.Align (sizes);
+ AssertAlignment (alignment, sizes, containerSize, positions, expected);
+ }
+
+ private void AssertAlignment (Alignment alignment, int [] sizes, int totalSize, int [] positions, int [] expected)
+ {
+ try
+ {
+ _output.WriteLine ($"Testing: {RenderAlignment (alignment, sizes, totalSize, expected)}");
+ }
+ catch (Exception e)
+ {
+ _output.WriteLine ($"Exception rendering expected: {e.Message}");
+ _output.WriteLine ($"Actual: {RenderAlignment (alignment, sizes, totalSize, positions)}");
+ }
+
+ if (!expected.SequenceEqual (positions))
+ {
+ _output.WriteLine ($"Expected: {RenderAlignment (alignment, sizes, totalSize, expected)}");
+ _output.WriteLine ($"Actual: {RenderAlignment (alignment, sizes, totalSize, positions)}");
+ Assert.Fail (" Expected and actual do not match");
+ }
+ }
+
+ private string RenderAlignment (Alignment alignment, int [] sizes, int totalSize, int [] positions)
+ {
+ var output = new StringBuilder ();
+ output.AppendLine ($"Alignment: {alignment}, Positions: {string.Join (", ", positions)}, TotalSize: {totalSize}");
+
+ for (var i = 0; i <= totalSize / 10; i++)
+ {
+ output.Append (i.ToString ().PadRight (9) + " ");
+ }
+
+ output.AppendLine ();
+
+ for (var i = 0; i < totalSize; i++)
+ {
+ output.Append (i % 10);
+ }
+
+ output.AppendLine ();
+
+ var items = new char [totalSize];
+
+ for (var position = 0; position < positions.Length; position++)
+ {
+ // try
+ {
+ for (var j = 0; j < sizes [position] && positions [position] + j < totalSize; j++)
+ {
+ if (positions [position] + j >= 0)
+ {
+ items [positions [position] + j] = (position + 1).ToString () [0];
+ }
+ }
+ }
+ }
+
+ output.Append (new string (items).Replace ('\0', ' '));
+
+ return output.ToString ();
+ }
+}
diff --git a/UnitTests/Drawing/JustifierTests.cs b/UnitTests/Drawing/JustifierTests.cs
deleted file mode 100644
index 434a04009..000000000
--- a/UnitTests/Drawing/JustifierTests.cs
+++ /dev/null
@@ -1,445 +0,0 @@
-using System.Text;
-using Xunit.Abstractions;
-
-namespace Terminal.Gui.DrawingTests;
-
-public class JustifierTests (ITestOutputHelper output)
-{
- private readonly ITestOutputHelper _output = output;
-
- public static IEnumerable JustificationEnumValues ()
- {
- foreach (object number in Enum.GetValues (typeof (Justification)))
- {
- yield return new [] { number };
- }
- }
-
- [Theory]
- [MemberData (nameof (JustificationEnumValues))]
- public void NoItems_Works (Justification justification)
- {
- int [] sizes = [];
- int [] positions = Justifier.Justify (justification, false, 100, sizes);
- Assert.Equal (new int [] { }, positions);
- }
-
- [Theory]
- [MemberData (nameof (JustificationEnumValues))]
- public void Negative_Widths_Not_Allowed (Justification justification)
- {
- Assert.Throws (() => new Justifier ()
- {
- Justification = justification,
- ContainerSize = 100
- }.Justify (new [] { -10, 20, 30 }));
- Assert.Throws (() => new Justifier ()
- {
- Justification = justification,
- ContainerSize = 100
- }.Justify (new [] { 10, -20, 30 }));
- Assert.Throws (() => new Justifier ()
- {
- Justification = justification,
- ContainerSize = 100
- }.Justify (new [] { 10, 20, -30 }));
- }
-
- [Theory]
- [InlineData (Justification.Left, new [] { 0 }, 1, new [] { 0 })]
- [InlineData (Justification.Left, new [] { 0, 0 }, 1, new [] { 0, 1 })]
- [InlineData (Justification.Left, new [] { 0, 0, 0 }, 1, new [] { 0, 1, 1 })]
- [InlineData (Justification.Left, new [] { 1 }, 1, new [] { 0 })]
- [InlineData (Justification.Left, new [] { 1 }, 2, new [] { 0 })]
- [InlineData (Justification.Left, new [] { 1 }, 3, new [] { 0 })]
- [InlineData (Justification.Left, new [] { 1, 1 }, 2, new [] { 0, 1 })]
- [InlineData (Justification.Left, new [] { 1, 1 }, 3, new [] { 0, 2 })]
- [InlineData (Justification.Left, new [] { 1, 1 }, 4, new [] { 0, 2 })]
- [InlineData (Justification.Left, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 7, new [] { 0, 2, 4 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 10, new [] { 0, 2, 5 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 11, new [] { 0, 2, 5 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 12, new [] { 0, 2, 5 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 13, new [] { 0, 2, 5 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 5, new [] { 0, 1, 3 })] // 5 is too small to fit the items. The first item is at 0, the items to the right are clipped.
- [InlineData (Justification.Left, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
- [InlineData (Justification.Left, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
- [InlineData (Justification.Left, new [] { 10 }, 101, new [] { 0 })]
- [InlineData (Justification.Left, new [] { 10, 20 }, 101, new [] { 0, 11 })]
- [InlineData (Justification.Left, new [] { 10, 20, 30 }, 100, new [] { 0, 11, 32 })]
- [InlineData (Justification.Left, new [] { 10, 20, 30 }, 101, new [] { 0, 11, 32 })]
- [InlineData (Justification.Left, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
- [InlineData (Justification.Left, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
- [InlineData (Justification.Right, new [] { 0 }, 1, new [] { 1 })]
- [InlineData (Justification.Right, new [] { 0, 0 }, 1, new [] { 0, 1 })]
- [InlineData (Justification.Right, new [] { 0, 0, 0 }, 1, new [] { 0, 1, 1 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 7, new [] { 0, 2, 4 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 10, new [] { 2, 4, 7 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 11, new [] { 3, 5, 8 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 12, new [] { 4, 6, 9 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 13, new [] { 5, 7, 10 })]
-
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 5, new [] { -1, 0, 2 })] // 5 is too small to fit the items. The first item is at -1.
-
- [InlineData (Justification.Right, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
- [InlineData (Justification.Right, new [] { 10, 20, 30 }, 100, new [] { 38, 49, 70 })]
- [InlineData (Justification.Right, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
- [InlineData (Justification.Right, new [] { 10 }, 101, new [] { 91 })]
- [InlineData (Justification.Right, new [] { 10, 20 }, 101, new [] { 70, 81 })]
- [InlineData (Justification.Right, new [] { 10, 20, 30 }, 101, new [] { 39, 50, 71 })]
- [InlineData (Justification.Right, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
- [InlineData (Justification.Right, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
- [InlineData (Justification.Centered, new [] { 0 }, 1, new [] { 0 })]
- [InlineData (Justification.Centered, new [] { 0, 0 }, 1, new [] { 0, 1 })]
- [InlineData (Justification.Centered, new [] { 0, 0, 0 }, 1, new [] { 0, 1, 1 })]
- [InlineData (Justification.Centered, new [] { 1 }, 1, new [] { 0 })]
- [InlineData (Justification.Centered, new [] { 1 }, 2, new [] { 0 })]
- [InlineData (Justification.Centered, new [] { 1 }, 3, new [] { 1 })]
- [InlineData (Justification.Centered, new [] { 1, 1 }, 2, new [] { 0, 1 })]
- [InlineData (Justification.Centered, new [] { 1, 1 }, 3, new [] { 0, 2 })]
- [InlineData (Justification.Centered, new [] { 1, 1 }, 4, new [] { 0, 2 })]
- [InlineData (Justification.Centered, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3 }, 7, new [] { 0, 2, 4 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3 }, 10, new [] { 1, 3, 6 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3 }, 11, new [] { 1, 3, 6 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3 }, 5, new [] { 0, 1, 3 })] // 5 is too small to fit the items. The first item is at 0, the items to the right are clipped.
- [InlineData (Justification.Centered, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
- [InlineData (Justification.Centered, new [] { 3, 3, 3 }, 9, new [] { 0, 3, 6 })]
- [InlineData (Justification.Centered, new [] { 3, 3, 3 }, 10, new [] { 0, 4, 7 })]
- [InlineData (Justification.Centered, new [] { 3, 3, 3 }, 11, new [] { 0, 4, 8 })]
- [InlineData (Justification.Centered, new [] { 3, 3, 3 }, 12, new [] { 0, 4, 8 })]
- [InlineData (Justification.Centered, new [] { 3, 3, 3 }, 13, new [] { 1, 5, 9 })]
- [InlineData (Justification.Centered, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
- [InlineData (Justification.Centered, new [] { 33, 33, 33 }, 101, new [] { 0, 34, 68 })]
- [InlineData (Justification.Centered, new [] { 33, 33, 33 }, 102, new [] { 0, 34, 68 })]
- [InlineData (Justification.Centered, new [] { 33, 33, 33 }, 103, new [] { 1, 35, 69 })]
- [InlineData (Justification.Centered, new [] { 33, 33, 33 }, 104, new [] { 1, 35, 69 })]
- [InlineData (Justification.Centered, new [] { 10 }, 101, new [] { 45 })]
- [InlineData (Justification.Centered, new [] { 10, 20 }, 101, new [] { 35, 46 })]
- [InlineData (Justification.Centered, new [] { 10, 20, 30 }, 100, new [] { 19, 30, 51 })]
- [InlineData (Justification.Centered, new [] { 10, 20, 30 }, 101, new [] { 19, 30, 51 })]
- [InlineData (Justification.Centered, new [] { 10, 20, 30, 40 }, 100, new [] { 0, 10, 30, 60 })]
- [InlineData (Justification.Centered, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
- [InlineData (Justification.Centered, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
- [InlineData (Justification.Centered, new [] { 3, 4, 5, 6 }, 25, new [] { 2, 6, 11, 17 })]
- [InlineData (Justification.Justified, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
- [InlineData (Justification.Justified, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
- [InlineData (Justification.Justified, new [] { 10, 20, 30 }, 100, new [] { 0, 30, 70 })]
- [InlineData (Justification.Justified, new [] { 10, 20, 30 }, 101, new [] { 0, 31, 71 })]
- [InlineData (Justification.Justified, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
- [InlineData (Justification.Justified, new [] { 11, 17, 23 }, 100, new [] { 0, 36, 77 })]
- [InlineData (Justification.Justified, new [] { 1, 2, 3 }, 11, new [] { 0, 4, 8 })]
- [InlineData (Justification.Justified, new [] { 10, 20 }, 101, new [] { 0, 81 })]
- [InlineData (Justification.Justified, new [] { 10 }, 101, new [] { 0 })]
- [InlineData (Justification.Justified, new [] { 3, 3, 3 }, 21, new [] { 0, 9, 18 })]
- [InlineData (Justification.Justified, new [] { 3, 4, 5 }, 21, new [] { 0, 8, 16 })]
- [InlineData (Justification.Justified, new [] { 3, 4, 5, 6 }, 18, new [] { 0, 3, 7, 12 })]
- [InlineData (Justification.Justified, new [] { 3, 4, 5, 6 }, 19, new [] { 0, 4, 8, 13 })]
- [InlineData (Justification.Justified, new [] { 3, 4, 5, 6 }, 20, new [] { 0, 4, 9, 14 })]
- [InlineData (Justification.Justified, new [] { 3, 4, 5, 6 }, 21, new [] { 0, 4, 9, 15 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 22, new [] { 0, 8, 14, 19 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 23, new [] { 0, 8, 15, 20 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 24, new [] { 0, 8, 15, 21 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 25, new [] { 0, 9, 16, 22 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 26, new [] { 0, 9, 17, 23 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 31, new [] { 0, 11, 20, 28 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 0 }, 1, new [] { 1 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 0, 0 }, 1, new [] { 0, 1 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 0, 0, 0 }, 1, new [] { 0, 1, 1 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1 }, 1, new [] { 0 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1 }, 2, new [] { 1 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1 }, 3, new [] { 2 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 1 }, 2, new [] { 0, 1 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 1 }, 3, new [] { 0, 2 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 1 }, 4, new [] { 0, 3 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 7, new [] { 0, 2, 4 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 8, new [] { 0, 2, 5 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 9, new [] { 0, 2, 6 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 10, new [] { 0, 2, 7 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 11, new [] { 0, 2, 8 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 5, new [] { -1, 0, 2 })] // 5 is too small to fit the items. The first item is at -1.})]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 3, 3, 3 }, 21, new [] { 0, 4, 18 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 3, 4, 5 }, 21, new [] { 0, 4, 16 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10 }, 101, new [] { 91 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10, 20 }, 101, new [] { 0, 81 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10, 20, 30 }, 100, new [] { 0, 11, 70 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10, 20, 30 }, 101, new [] { 0, 11, 71 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 0 }, 1, new [] { 0 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 0, 0 }, 1, new [] { 0, 1 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 0, 0, 0 }, 1, new [] { 0, 0, 1 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1 }, 1, new [] { 0 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1 }, 2, new [] { 0 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1 }, 3, new [] { 0 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 1 }, 2, new [] { 0, 1 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 1 }, 3, new [] { 0, 2 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 1 }, 4, new [] { 0, 3 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 7, new [] { 0, 1, 4 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 8, new [] { 0, 2, 5 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 9, new [] { 0, 3, 6 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 10, new [] { 0, 4, 7 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 11, new [] { 0, 5, 8 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 5, new [] { 0, 1, 3 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 1, 3, 7 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 12, new [] { 0, 1, 4, 8 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 3, 3, 3 }, 21, new [] { 0, 14, 18 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 3, 4, 5 }, 21, new [] { 0, 11, 16 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 33, 33, 33 }, 100, new [] { 0, 33, 67 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10 }, 101, new [] { 0 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10, 20 }, 101, new [] { 0, 81 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10, 20, 30 }, 100, new [] { 0, 49, 70 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10, 20, 30 }, 101, new [] { 0, 50, 71 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 10, 30, 61 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 10, 30, 60, 101 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 3, 3, 3 }, 21, new [] { 0, 14, 18 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 3, 4, 5 }, 21, new [] { 0, 11, 16 })]
- public void TestJustifications_PutSpaceBetweenItems (Justification justification, int [] sizes, int containerSize, int [] expected)
- {
- int [] positions = new Justifier
- {
- PutSpaceBetweenItems = true,
- Justification = justification,
- ContainerSize = containerSize
- }.Justify (sizes);
- AssertJustification (justification, sizes, containerSize, positions, expected);
- }
-
- [Theory]
- [InlineData (Justification.Left, new [] { 0 }, 1, new [] { 0 })]
- [InlineData (Justification.Left, new [] { 0, 0 }, 1, new [] { 0, 0 })]
- [InlineData (Justification.Left, new [] { 0, 0, 0 }, 1, new [] { 0, 0, 0 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 7, new [] { 0, 1, 3 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 10, new [] { 0, 1, 3 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 11, new [] { 0, 1, 3 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 12, new [] { 0, 1, 3 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 13, new [] { 0, 1, 3 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.Left, new [] { 1, 2, 3 }, 5, new [] { 0, 1, 3 })] // 5 is too small to fit the items. The first item is at 0, the items to the right are clipped.
-
- [InlineData (Justification.Left, new [] { 10, 20, 30 }, 100, new [] { 0, 10, 30 })]
- [InlineData (Justification.Left, new [] { 33, 33, 33 }, 100, new [] { 0, 33, 66 })]
- [InlineData (Justification.Left, new [] { 10 }, 101, new [] { 0 })]
- [InlineData (Justification.Left, new [] { 10, 20 }, 101, new [] { 0, 10 })]
- [InlineData (Justification.Left, new [] { 10, 20, 30 }, 101, new [] { 0, 10, 30 })]
- [InlineData (Justification.Left, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 10, 30, 60 })]
- [InlineData (Justification.Left, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 10, 30, 60, 100 })]
- [InlineData (Justification.Right, new [] { 0 }, 1, new [] { 1 })]
- [InlineData (Justification.Right, new [] { 0, 0 }, 1, new [] { 1, 1 })]
- [InlineData (Justification.Right, new [] { 0, 0, 0 }, 1, new [] { 1, 1, 1 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 7, new [] { 1, 2, 4 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 10, new [] { 4, 5, 7 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 11, new [] { 5, 6, 8 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 12, new [] { 6, 7, 9 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 13, new [] { 7, 8, 10 })]
-
- [InlineData (Justification.Right, new [] { 1, 2, 3 }, 5, new [] { -1, 0, 2 })] // 5 is too small to fit the items. The first item is at -1.
-
- [InlineData (Justification.Right, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.Right, new [] { 1, 2, 3, 4 }, 11, new [] { 1, 2, 4, 7 })]
- [InlineData (Justification.Right, new [] { 10, 20, 30 }, 100, new [] { 40, 50, 70 })]
- [InlineData (Justification.Right, new [] { 33, 33, 33 }, 100, new [] { 1, 34, 67 })]
- [InlineData (Justification.Right, new [] { 10 }, 101, new [] { 91 })]
- [InlineData (Justification.Right, new [] { 10, 20 }, 101, new [] { 71, 81 })]
- [InlineData (Justification.Right, new [] { 10, 20, 30 }, 101, new [] { 41, 51, 71 })]
- [InlineData (Justification.Right, new [] { 10, 20, 30, 40 }, 101, new [] { 1, 11, 31, 61 })]
- [InlineData (Justification.Right, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 1, 11, 31, 61, 101 })]
- [InlineData (Justification.Centered, new [] { 1 }, 1, new [] { 0 })]
- [InlineData (Justification.Centered, new [] { 1 }, 2, new [] { 0 })]
- [InlineData (Justification.Centered, new [] { 1 }, 3, new [] { 1 })]
- [InlineData (Justification.Centered, new [] { 1, 1 }, 2, new [] { 0, 1 })]
- [InlineData (Justification.Centered, new [] { 1, 1 }, 3, new [] { 0, 1 })]
- [InlineData (Justification.Centered, new [] { 1, 1 }, 4, new [] { 1, 2 })]
- [InlineData (Justification.Centered, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3 }, 7, new [] { 0, 1, 3 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3 }, 10, new [] { 2, 3, 5 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3 }, 11, new [] { 2, 3, 5 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.Centered, new [] { 3, 3, 3 }, 9, new [] { 0, 3, 6 })]
- [InlineData (Justification.Centered, new [] { 3, 3, 3 }, 10, new [] { 0, 3, 6 })]
- [InlineData (Justification.Centered, new [] { 3, 3, 3 }, 11, new [] { 1, 4, 7 })]
- [InlineData (Justification.Centered, new [] { 3, 3, 3 }, 12, new [] { 1, 4, 7 })]
- [InlineData (Justification.Centered, new [] { 3, 3, 3 }, 13, new [] { 2, 5, 8 })]
- [InlineData (Justification.Centered, new [] { 1, 2, 3 }, 5, new [] { 0, 1, 3 })] // 5 is too small to fit the items. The first item is at 0, the items to the right are clipped.
-
- [InlineData (Justification.Centered, new [] { 33, 33, 33 }, 100, new [] { 0, 33, 66 })]
- [InlineData (Justification.Centered, new [] { 33, 33, 33 }, 101, new [] { 1, 34, 67 })]
- [InlineData (Justification.Centered, new [] { 33, 33, 33 }, 102, new [] { 1, 34, 67 })]
- [InlineData (Justification.Centered, new [] { 33, 33, 33 }, 103, new [] { 2, 35, 68 })]
- [InlineData (Justification.Centered, new [] { 33, 33, 33 }, 104, new [] { 2, 35, 68 })]
- [InlineData (Justification.Centered, new [] { 3, 4, 5, 6 }, 25, new [] { 3, 6, 10, 15 })]
- [InlineData (Justification.Justified, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
- [InlineData (Justification.Justified, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
- [InlineData (Justification.Justified, new [] { 10, 20, 30 }, 100, new [] { 0, 30, 70 })]
- [InlineData (Justification.Justified, new [] { 10, 20, 30 }, 101, new [] { 0, 31, 71 })]
- [InlineData (Justification.Justified, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
- [InlineData (Justification.Justified, new [] { 11, 17, 23 }, 100, new [] { 0, 36, 77 })]
- [InlineData (Justification.Justified, new [] { 1, 2, 3 }, 11, new [] { 0, 4, 8 })]
- [InlineData (Justification.Justified, new [] { 10, 20 }, 101, new [] { 0, 81 })]
- [InlineData (Justification.Justified, new [] { 10 }, 101, new [] { 0 })]
- [InlineData (Justification.Justified, new [] { 3, 3, 3 }, 21, new [] { 0, 9, 18 })]
- [InlineData (Justification.Justified, new [] { 3, 4, 5 }, 21, new [] { 0, 8, 16 })]
- [InlineData (Justification.Justified, new [] { 3, 4, 5, 6 }, 18, new [] { 0, 3, 7, 12 })]
- [InlineData (Justification.Justified, new [] { 3, 4, 5, 6 }, 19, new [] { 0, 4, 8, 13 })]
- [InlineData (Justification.Justified, new [] { 3, 4, 5, 6 }, 20, new [] { 0, 4, 9, 14 })]
- [InlineData (Justification.Justified, new [] { 3, 4, 5, 6 }, 21, new [] { 0, 4, 9, 15 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 22, new [] { 0, 8, 14, 19 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 23, new [] { 0, 8, 15, 20 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 24, new [] { 0, 8, 15, 21 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 25, new [] { 0, 9, 16, 22 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 26, new [] { 0, 9, 17, 23 })]
- [InlineData (Justification.Justified, new [] { 6, 5, 4, 3 }, 31, new [] { 0, 11, 20, 28 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 0 }, 1, new [] { 1 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 0, 0 }, 1, new [] { 0, 1 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 0, 0, 0 }, 1, new [] { 0, 0, 1 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1 }, 1, new [] { 0 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1 }, 2, new [] { 1 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1 }, 3, new [] { 2 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 1 }, 2, new [] { 0, 1 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 1 }, 3, new [] { 0, 2 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 1 }, 4, new [] { 0, 3 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 7, new [] { 0, 1, 4 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 8, new [] { 0, 1, 5 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 9, new [] { 0, 1, 6 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 10, new [] { 0, 1, 7 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3 }, 11, new [] { 0, 1, 8 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 1, 3, 7 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 1, 2, 3, 4 }, 12, new [] { 0, 1, 3, 8 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 3, 3, 3 }, 21, new [] { 0, 3, 18 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 3, 4, 5 }, 21, new [] { 0, 3, 16 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 33, 33, 33 }, 100, new [] { 0, 33, 67 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10 }, 101, new [] { 91 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10, 20 }, 101, new [] { 0, 81 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10, 20, 30 }, 100, new [] { 0, 10, 70 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10, 20, 30 }, 101, new [] { 0, 10, 71 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 10, 30, 61 })]
- [InlineData (Justification.LastRightRestLeft, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 10, 30, 60, 101 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 0 }, 1, new [] { 0 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 0, 0 }, 1, new [] { 0, 1 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 0, 0, 0 }, 1, new [] { 0, 1, 1 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1 }, 1, new [] { 0 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1 }, 2, new [] { 0 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1 }, 3, new [] { 0 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 1 }, 2, new [] { 0, 1 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 1 }, 3, new [] { 0, 2 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 1 }, 4, new [] { 0, 3 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 1, 1 }, 3, new [] { 0, 1, 2 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 6, new [] { 0, 1, 3 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 7, new [] { 0, 2, 4 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 8, new [] { 0, 3, 5 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 9, new [] { 0, 4, 6 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 10, new [] { 0, 5, 7 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3 }, 11, new [] { 0, 6, 8 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 10, new [] { 0, 1, 3, 6 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 11, new [] { 0, 2, 4, 7 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 1, 2, 3, 4 }, 12, new [] { 0, 3, 5, 8 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 3, 3, 3 }, 21, new [] { 0, 15, 18 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 3, 4, 5 }, 21, new [] { 0, 12, 16 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 33, 33, 33 }, 100, new [] { 0, 34, 67 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10 }, 101, new [] { 0 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10, 20 }, 101, new [] { 0, 81 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10, 20, 30 }, 100, new [] { 0, 50, 70 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10, 20, 30 }, 101, new [] { 0, 51, 71 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10, 20, 30, 40 }, 101, new [] { 0, 11, 31, 61 })]
- [InlineData (Justification.FirstLeftRestRight, new [] { 10, 20, 30, 40, 50 }, 151, new [] { 0, 11, 31, 61, 101 })]
- public void TestJustifications_NoSpaceBetweenItems (Justification justification, int [] sizes, int containerSize, int [] expected)
- {
- int [] positions = new Justifier
- {
- PutSpaceBetweenItems = false,
- Justification = justification,
- ContainerSize = containerSize
- }.Justify (sizes);
- AssertJustification (justification, sizes, containerSize, positions, expected);
- }
-
- public void AssertJustification (Justification justification, int [] sizes, int totalSize, int [] positions, int [] expected)
- {
- try
- {
- _output.WriteLine ($"Testing: {RenderJustification (justification, sizes, totalSize, expected)}");
- }
- catch (Exception e)
- {
- _output.WriteLine ($"Exception rendering expected: {e.Message}");
- _output.WriteLine ($"Actual: {RenderJustification (justification, sizes, totalSize, positions)}");
- }
-
- if (!expected.SequenceEqual (positions))
- {
- _output.WriteLine ($"Expected: {RenderJustification (justification, sizes, totalSize, expected)}");
- _output.WriteLine ($"Actual: {RenderJustification (justification, sizes, totalSize, positions)}");
- Assert.Fail (" Expected and actual do not match");
- }
- }
-
- public string RenderJustification (Justification justification, int [] sizes, int totalSize, int [] positions)
- {
- var output = new StringBuilder ();
- output.AppendLine ($"Justification: {justification}, Positions: {string.Join (", ", positions)}, TotalSize: {totalSize}");
-
- for (var i = 0; i <= totalSize / 10; i++)
- {
- output.Append (i.ToString ().PadRight (9) + " ");
- }
-
- output.AppendLine ();
-
- for (var i = 0; i < totalSize; i++)
- {
- output.Append (i % 10);
- }
-
- output.AppendLine ();
-
- var items = new char [totalSize];
-
- for (var position = 0; position < positions.Length; position++)
- {
- // try
- {
- for (var j = 0; j < sizes [position] && positions [position] + j < totalSize; j++)
- {
- if (positions [position] + j >= 0)
- {
- items [positions [position] + j] = (position + 1).ToString () [0];
- }
- }
- }
-
- //catch (Exception e)
- //{
- // output.AppendLine ($"{e.Message} - position = {position}, positions[{position}]: {positions [position]}, sizes[{position}]: {sizes [position]}, totalSize: {totalSize}");
- // output.Append (new string (items).Replace ('\0', ' '));
-
- // Assert.Fail (e.Message + output.ToString ());
- //}
- }
-
- output.Append (new string (items).Replace ('\0', ' '));
-
- return output.ToString ();
- }
-}
diff --git a/UnitTests/Text/TextFormatterTests.cs b/UnitTests/Text/TextFormatterTests.cs
index de89c5394..b7ec53217 100644
--- a/UnitTests/Text/TextFormatterTests.cs
+++ b/UnitTests/Text/TextFormatterTests.cs
@@ -53,36 +53,36 @@ public class TextFormatterTests
tf.Text = testText;
Size expectedSize = new (testText.Length, 1);
Assert.Equal (testText, tf.Text);
- Assert.Equal (Justification.Left, tf.Justification);
+ Assert.Equal (Alignment.Left, tf.Justification);
Assert.Equal (expectedSize, tf.Size);
tf.Draw (testBounds, new Attribute (), new Attribute ());
Assert.Equal (expectedSize, tf.Size);
Assert.NotEmpty (tf.GetLines ());
- tf.Justification = Justification.Right;
+ tf.Justification = Alignment.Right;
expectedSize = new (testText.Length, 1);
Assert.Equal (testText, tf.Text);
- Assert.Equal (Justification.Right, tf.Justification);
+ Assert.Equal (Alignment.Right, tf.Justification);
Assert.Equal (expectedSize, tf.Size);
tf.Draw (testBounds, new Attribute (), new Attribute ());
Assert.Equal (expectedSize, tf.Size);
Assert.NotEmpty (tf.GetLines ());
- tf.Justification = Justification.Right;
+ tf.Justification = Alignment.Right;
expectedSize = new (testText.Length, 1);
tf.Size = expectedSize;
Assert.Equal (testText, tf.Text);
- Assert.Equal (Justification.Right, tf.Justification);
+ Assert.Equal (Alignment.Right, tf.Justification);
Assert.Equal (expectedSize, tf.Size);
tf.Draw (testBounds, new Attribute (), new Attribute ());
Assert.Equal (expectedSize, tf.Size);
Assert.NotEmpty (tf.GetLines ());
- tf.Justification = Justification.Centered;
+ tf.Justification = Alignment.Centered;
expectedSize = new (testText.Length, 1);
tf.Size = expectedSize;
Assert.Equal (testText, tf.Text);
- Assert.Equal (Justification.Centered, tf.Justification);
+ Assert.Equal (Alignment.Centered, tf.Justification);
Assert.Equal (expectedSize, tf.Size);
tf.Draw (testBounds, new Attribute (), new Attribute ());
Assert.Equal (expectedSize, tf.Size);
@@ -191,12 +191,12 @@ public class TextFormatterTests
public void ClipAndJustify_Invalid_Returns_Original (string text)
{
string expected = string.IsNullOrEmpty (text) ? text : "";
- Assert.Equal (expected, TextFormatter.ClipAndJustify (text, 0, Justification.Left));
- Assert.Equal (expected, TextFormatter.ClipAndJustify (text, 0, Justification.Left));
+ Assert.Equal (expected, TextFormatter.ClipAndJustify (text, 0, Alignment.Left));
+ Assert.Equal (expected, TextFormatter.ClipAndJustify (text, 0, Alignment.Left));
Assert.Throws (
() =>
- TextFormatter.ClipAndJustify (text, -1, Justification.Left)
+ TextFormatter.ClipAndJustify (text, -1, Alignment.Left)
);
}
@@ -219,7 +219,7 @@ public class TextFormatterTests
[InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
public void ClipAndJustify_Valid_Centered (string text, string justifiedText, int maxWidth)
{
- var justify = Justification.Centered;
+ var justify = Alignment.Centered;
var textDirection = TextDirection.LeftRight_TopBottom;
var tabWidth = 1;
@@ -277,7 +277,7 @@ public class TextFormatterTests
[InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
public void ClipAndJustify_Valid_Justified (string text, string justifiedText, int maxWidth)
{
- var justify = Justification.Justified;
+ var justify = Alignment.Justified;
var textDirection = TextDirection.LeftRight_TopBottom;
var tabWidth = 1;
@@ -328,7 +328,7 @@ public class TextFormatterTests
[InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
public void ClipAndJustify_Valid_Left (string text, string justifiedText, int maxWidth)
{
- var justify = Justification.Left;
+ var justify = Alignment.Left;
var textDirection = TextDirection.LeftRight_BottomTop;
var tabWidth = 1;
@@ -377,7 +377,7 @@ public class TextFormatterTests
[InlineData ("Ð ÑÐ", "Ð Ñ", 3)] // Should not fit
public void ClipAndJustify_Valid_Right (string text, string justifiedText, int maxWidth)
{
- var justify = Justification.Right;
+ var justify = Alignment.Right;
var textDirection = TextDirection.LeftRight_BottomTop;
var tabWidth = 1;
@@ -757,7 +757,7 @@ ssb
TextFormatter.Format (
"Some text",
4,
- Justification.Left,
+ Alignment.Left,
false,
true
)
@@ -785,7 +785,7 @@ ssb
for (int i = text.GetRuneCount (); i < maxWidth; i++)
{
- fmtText = TextFormatter.Format (text, i, Justification.Justified, false, true) [0];
+ fmtText = TextFormatter.Format (text, i, Alignment.Justified, false, true) [0];
Assert.Equal (i, fmtText.GetRuneCount ());
char c = fmtText [^1];
Assert.True (text.EndsWith (c));
@@ -817,7 +817,7 @@ ssb
fmtText = TextFormatter.Format (
text,
i,
- Justification.Justified,
+ Alignment.Justified,
false,
true,
0,
@@ -862,7 +862,7 @@ ssb
" A sentence has words. \n This is the second Line - 2. ",
4,
-50,
- Justification.Left,
+ Alignment.Left,
true,
false,
new [] { " A", "sent", "ence", "has", "word", "s. ", " Thi", "s is", "the", "seco", "nd", "Line", "- 2." },
@@ -872,7 +872,7 @@ ssb
" A sentence has words. \n This is the second Line - 2. ",
4,
-50,
- Justification.Left,
+ Alignment.Left,
true,
true,
new []
@@ -900,7 +900,7 @@ ssb
string text,
int maxWidth,
int widthOffset,
- Justification Justification,
+ Alignment Justification,
bool wrap,
bool preserveTrailingSpaces,
IEnumerable resultLines,
@@ -1336,19 +1336,19 @@ ssb
Assert.NotEmpty (tf.GetLines ());
Assert.False (tf.NeedsFormat); // get_Lines causes a Format
- tf.Justification = Justification.Centered;
+ tf.Justification = Alignment.Centered;
Assert.True (tf.NeedsFormat);
Assert.NotEmpty (tf.GetLines ());
Assert.False (tf.NeedsFormat); // get_Lines causes a Format
}
[Theory]
- [InlineData ("", -1, Justification.Left, false, 0)]
- [InlineData (null, 0, Justification.Left, false, 1)]
- [InlineData (null, 0, Justification.Left, true, 1)]
- [InlineData ("", 0, Justification.Left, false, 1)]
- [InlineData ("", 0, Justification.Left, true, 1)]
- public void Reformat_Invalid (string text, int maxWidth, Justification Justification, bool wrap, int linesCount)
+ [InlineData ("", -1, Alignment.Left, false, 0)]
+ [InlineData (null, 0, Alignment.Left, false, 1)]
+ [InlineData (null, 0, Alignment.Left, true, 1)]
+ [InlineData ("", 0, Alignment.Left, false, 1)]
+ [InlineData ("", 0, Alignment.Left, true, 1)]
+ public void Reformat_Invalid (string text, int maxWidth, Alignment Justification, bool wrap, int linesCount)
{
if (maxWidth < 0)
{
@@ -1367,25 +1367,25 @@ ssb
}
[Theory]
- [InlineData ("A sentence has words.\nLine 2.", 0, -29, Justification.Left, false, 1, true)]
- [InlineData ("A sentence has words.\nLine 2.", 1, -28, Justification.Left, false, 1, false)]
- [InlineData ("A sentence has words.\nLine 2.", 5, -24, Justification.Left, false, 1, false)]
- [InlineData ("A sentence has words.\nLine 2.", 28, -1, Justification.Left, false, 1, false)]
+ [InlineData ("A sentence has words.\nLine 2.", 0, -29, Alignment.Left, false, 1, true)]
+ [InlineData ("A sentence has words.\nLine 2.", 1, -28, Alignment.Left, false, 1, false)]
+ [InlineData ("A sentence has words.\nLine 2.", 5, -24, Alignment.Left, false, 1, false)]
+ [InlineData ("A sentence has words.\nLine 2.", 28, -1, Alignment.Left, false, 1, false)]
// no clip
- [InlineData ("A sentence has words.\nLine 2.", 29, 0, Justification.Left, false, 1, false)]
- [InlineData ("A sentence has words.\nLine 2.", 30, 1, Justification.Left, false, 1, false)]
- [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, Justification.Left, false, 1, true)]
- [InlineData ("A sentence has words.\r\nLine 2.", 1, -29, Justification.Left, false, 1, false)]
- [InlineData ("A sentence has words.\r\nLine 2.", 5, -25, Justification.Left, false, 1, false)]
- [InlineData ("A sentence has words.\r\nLine 2.", 29, -1, Justification.Left, false, 1, false, 1)]
- [InlineData ("A sentence has words.\r\nLine 2.", 30, 0, Justification.Left, false, 1, false)]
- [InlineData ("A sentence has words.\r\nLine 2.", 31, 1, Justification.Left, false, 1, false)]
+ [InlineData ("A sentence has words.\nLine 2.", 29, 0, Alignment.Left, false, 1, false)]
+ [InlineData ("A sentence has words.\nLine 2.", 30, 1, Alignment.Left, false, 1, false)]
+ [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, Alignment.Left, false, 1, true)]
+ [InlineData ("A sentence has words.\r\nLine 2.", 1, -29, Alignment.Left, false, 1, false)]
+ [InlineData ("A sentence has words.\r\nLine 2.", 5, -25, Alignment.Left, false, 1, false)]
+ [InlineData ("A sentence has words.\r\nLine 2.", 29, -1, Alignment.Left, false, 1, false, 1)]
+ [InlineData ("A sentence has words.\r\nLine 2.", 30, 0, Alignment.Left, false, 1, false)]
+ [InlineData ("A sentence has words.\r\nLine 2.", 31, 1, Alignment.Left, false, 1, false)]
public void Reformat_NoWordrap_NewLines_MultiLine_False (
string text,
int maxWidth,
int widthOffset,
- Justification Justification,
+ Alignment Justification,
bool wrap,
int linesCount,
bool stringEmpty,
@@ -1430,12 +1430,12 @@ ssb
}
[Theory]
- [InlineData ("A sentence has words.\nLine 2.", 0, -29, Justification.Left, false, 1, true, new [] { "" })]
+ [InlineData ("A sentence has words.\nLine 2.", 0, -29, Alignment.Left, false, 1, true, new [] { "" })]
[InlineData (
"A sentence has words.\nLine 2.",
1,
-28,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1445,7 +1445,7 @@ ssb
"A sentence has words.\nLine 2.",
5,
-24,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1455,7 +1455,7 @@ ssb
"A sentence has words.\nLine 2.",
28,
-1,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1466,7 +1466,7 @@ ssb
"A sentence has words.\nLine 2.",
29,
0,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1476,18 +1476,18 @@ ssb
"A sentence has words.\nLine 2.",
30,
1,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
new [] { "A sentence has words.", "Line 2." }
)]
- [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, Justification.Left, false, 1, true, new [] { "" })]
+ [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, Alignment.Left, false, 1, true, new [] { "" })]
[InlineData (
"A sentence has words.\r\nLine 2.",
1,
-29,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1497,7 +1497,7 @@ ssb
"A sentence has words.\r\nLine 2.",
5,
-25,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1507,7 +1507,7 @@ ssb
"A sentence has words.\r\nLine 2.",
29,
-1,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1517,7 +1517,7 @@ ssb
"A sentence has words.\r\nLine 2.",
30,
0,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1527,7 +1527,7 @@ ssb
"A sentence has words.\r\nLine 2.",
31,
1,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1537,7 +1537,7 @@ ssb
string text,
int maxWidth,
int widthOffset,
- Justification Justification,
+ Alignment Justification,
bool wrap,
int linesCount,
bool stringEmpty,
@@ -1572,12 +1572,12 @@ ssb
}
[Theory]
- [InlineData ("A sentence has words.\nLine 2.", 0, -29, Justification.Left, false, 1, true, new [] { "" })]
+ [InlineData ("A sentence has words.\nLine 2.", 0, -29, Alignment.Left, false, 1, true, new [] { "" })]
[InlineData (
"A sentence has words.\nLine 2.",
1,
-28,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1587,7 +1587,7 @@ ssb
"A sentence has words.\nLine 2.",
5,
-24,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1597,7 +1597,7 @@ ssb
"A sentence has words.\nLine 2.",
28,
-1,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1608,7 +1608,7 @@ ssb
"A sentence has words.\nLine 2.",
29,
0,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1618,18 +1618,18 @@ ssb
"A sentence has words.\nLine 2.",
30,
1,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
new [] { "A sentence has words.", "Line 2." }
)]
- [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, Justification.Left, false, 1, true, new [] { "" })]
+ [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, Alignment.Left, false, 1, true, new [] { "" })]
[InlineData (
"A sentence has words.\r\nLine 2.",
1,
-29,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1639,7 +1639,7 @@ ssb
"A sentence has words.\r\nLine 2.",
5,
-25,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1649,7 +1649,7 @@ ssb
"A sentence has words.\r\nLine 2.",
29,
-1,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1659,7 +1659,7 @@ ssb
"A sentence has words.\r\nLine 2.",
30,
0,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1669,7 +1669,7 @@ ssb
"A sentence has words.\r\nLine 2.",
31,
1,
- Justification.Left,
+ Alignment.Left,
false,
2,
false,
@@ -1679,7 +1679,7 @@ ssb
string text,
int maxWidth,
int widthOffset,
- Justification Justification,
+ Alignment Justification,
bool wrap,
int linesCount,
bool stringEmpty,
@@ -1714,21 +1714,21 @@ ssb
}
[Theory]
- [InlineData ("", 0, 0, Justification.Left, false, 1, true)]
- [InlineData ("", 1, 1, Justification.Left, false, 1, true)]
- [InlineData ("A sentence has words.", 0, -21, Justification.Left, false, 1, true)]
- [InlineData ("A sentence has words.", 1, -20, Justification.Left, false, 1, false)]
- [InlineData ("A sentence has words.", 5, -16, Justification.Left, false, 1, false)]
- [InlineData ("A sentence has words.", 20, -1, Justification.Left, false, 1, false)]
+ [InlineData ("", 0, 0, Alignment.Left, false, 1, true)]
+ [InlineData ("", 1, 1, Alignment.Left, false, 1, true)]
+ [InlineData ("A sentence has words.", 0, -21, Alignment.Left, false, 1, true)]
+ [InlineData ("A sentence has words.", 1, -20, Alignment.Left, false, 1, false)]
+ [InlineData ("A sentence has words.", 5, -16, Alignment.Left, false, 1, false)]
+ [InlineData ("A sentence has words.", 20, -1, Alignment.Left, false, 1, false)]
// no clip
- [InlineData ("A sentence has words.", 21, 0, Justification.Left, false, 1, false)]
- [InlineData ("A sentence has words.", 22, 1, Justification.Left, false, 1, false)]
+ [InlineData ("A sentence has words.", 21, 0, Alignment.Left, false, 1, false)]
+ [InlineData ("A sentence has words.", 22, 1, Alignment.Left, false, 1, false)]
public void Reformat_NoWordrap_SingleLine (
string text,
int maxWidth,
int widthOffset,
- Justification Justification,
+ Alignment Justification,
bool wrap,
int linesCount,
bool stringEmpty
@@ -1759,7 +1759,7 @@ ssb
"\u2460\u2461\u2462\n\u2460\u2461\u2462\u2463\u2464",
8,
-1,
- Justification.Left,
+ Alignment.Left,
true,
false,
new [] { "\u2460\u2461\u2462", "\u2460\u2461\u2462\u2463\u2464" }
@@ -1770,7 +1770,7 @@ ssb
"\u2460\u2461\u2462\n\u2460\u2461\u2462\u2463\u2464",
9,
0,
- Justification.Left,
+ Alignment.Left,
true,
false,
new [] { "\u2460\u2461\u2462", "\u2460\u2461\u2462\u2463\u2464" }
@@ -1779,7 +1779,7 @@ ssb
"\u2460\u2461\u2462\n\u2460\u2461\u2462\u2463\u2464",
10,
1,
- Justification.Left,
+ Alignment.Left,
true,
false,
new [] { "\u2460\u2461\u2462", "\u2460\u2461\u2462\u2463\u2464" }
@@ -1788,7 +1788,7 @@ ssb
string text,
int maxWidth,
int widthOffset,
- Justification Justification,
+ Alignment Justification,
bool wrap,
bool preserveTrailingSpaces,
IEnumerable resultLines
@@ -1805,25 +1805,25 @@ ssb
// Unicode
// Even # of chars
// 0123456789
- [InlineData ("\u2660пÑРвРÑ", 10, -1, Justification.Left, true, false, new [] { "\u2660пÑРвÐ", "Ñ" })]
+ [InlineData ("\u2660пÑРвРÑ", 10, -1, Alignment.Left, true, false, new [] { "\u2660пÑРвÐ", "Ñ" })]
// no clip
- [InlineData ("\u2660пÑРвРÑ", 11, 0, Justification.Left, true, false, new [] { "\u2660пÑРвРÑ" })]
- [InlineData ("\u2660пÑРвРÑ", 12, 1, Justification.Left, true, false, new [] { "\u2660пÑРвРÑ" })]
+ [InlineData ("\u2660пÑРвРÑ", 11, 0, Alignment.Left, true, false, new [] { "\u2660пÑРвРÑ" })]
+ [InlineData ("\u2660пÑРвРÑ", 12, 1, Alignment.Left, true, false, new [] { "\u2660пÑРвРÑ" })]
// Unicode
// Odd # of chars
// 0123456789
- [InlineData ("\u2660 ÑРвРÑ", 9, -1, Justification.Left, true, false, new [] { "\u2660 ÑРвÐ", "Ñ" })]
+ [InlineData ("\u2660 ÑРвРÑ", 9, -1, Alignment.Left, true, false, new [] { "\u2660 ÑРвÐ", "Ñ" })]
// no clip
- [InlineData ("\u2660 ÑРвРÑ", 10, 0, Justification.Left, true, false, new [] { "\u2660 ÑРвРÑ" })]
- [InlineData ("\u2660 ÑРвРÑ", 11, 1, Justification.Left, true, false, new [] { "\u2660 ÑРвРÑ" })]
+ [InlineData ("\u2660 ÑРвРÑ", 10, 0, Alignment.Left, true, false, new [] { "\u2660 ÑРвРÑ" })]
+ [InlineData ("\u2660 ÑРвРÑ", 11, 1, Alignment.Left, true, false, new [] { "\u2660 ÑРвРÑ" })]
public void Reformat_Unicode_Wrap_Spaces_No_NewLines (
string text,
int maxWidth,
int widthOffset,
- Justification Justification,
+ Alignment Justification,
bool wrap,
bool preserveTrailingSpaces,
IEnumerable resultLines
@@ -1839,37 +1839,37 @@ ssb
// Even # of spaces
// 0123456789
- [InlineData ("012 456 89", 0, -10, Justification.Left, true, true, true, new [] { "" })]
+ [InlineData ("012 456 89", 0, -10, Alignment.Left, true, true, true, new [] { "" })]
[InlineData (
"012 456 89",
1,
-9,
- Justification.Left,
+ Alignment.Left,
true,
true,
false,
new [] { "0", "1", "2", " ", "4", "5", "6", " ", "8", "9" },
"01245689"
)]
- [InlineData ("012 456 89", 5, -5, Justification.Left, true, true, false, new [] { "012 ", "456 ", "89" })]
- [InlineData ("012 456 89", 9, -1, Justification.Left, true, true, false, new [] { "012 456 ", "89" })]
+ [InlineData ("012 456 89", 5, -5, Alignment.Left, true, true, false, new [] { "012 ", "456 ", "89" })]
+ [InlineData ("012 456 89", 9, -1, Alignment.Left, true, true, false, new [] { "012 456 ", "89" })]
// no clip
- [InlineData ("012 456 89", 10, 0, Justification.Left, true, true, false, new [] { "012 456 89" })]
- [InlineData ("012 456 89", 11, 1, Justification.Left, true, true, false, new [] { "012 456 89" })]
+ [InlineData ("012 456 89", 10, 0, Alignment.Left, true, true, false, new [] { "012 456 89" })]
+ [InlineData ("012 456 89", 11, 1, Alignment.Left, true, true, false, new [] { "012 456 89" })]
// Odd # of spaces
// 01234567890123
- [InlineData ("012 456 89 end", 13, -1, Justification.Left, true, true, false, new [] { "012 456 89 ", "end" })]
+ [InlineData ("012 456 89 end", 13, -1, Alignment.Left, true, true, false, new [] { "012 456 89 ", "end" })]
// no clip
- [InlineData ("012 456 89 end", 14, 0, Justification.Left, true, true, false, new [] { "012 456 89 end" })]
- [InlineData ("012 456 89 end", 15, 1, Justification.Left, true, true, false, new [] { "012 456 89 end" })]
+ [InlineData ("012 456 89 end", 14, 0, Alignment.Left, true, true, false, new [] { "012 456 89 end" })]
+ [InlineData ("012 456 89 end", 15, 1, Alignment.Left, true, true, false, new [] { "012 456 89 end" })]
public void Reformat_Wrap_Spaces_No_NewLines (
string text,
int maxWidth,
int widthOffset,
- Justification Justification,
+ Alignment Justification,
bool wrap,
bool preserveTrailingSpaces,
bool stringEmpty,
@@ -1909,7 +1909,7 @@ ssb
);
}
- list = TextFormatter.Format (text, maxWidth, Justification.Left, wrap);
+ list = TextFormatter.Format (text, maxWidth, Alignment.Left, wrap);
if (maxWidth == 1)
{
@@ -3159,7 +3159,7 @@ ssb
TextFormatter tf = new ()
{
Text = text,
- Justification = Justification.Left,
+ Justification = Alignment.Left,
AutoSize = autoSize,
};
@@ -3196,7 +3196,7 @@ ssb
TextFormatter tf = new ()
{
Text = text,
- Justification = Justification.Right,
+ Justification = Alignment.Right,
AutoSize = autoSize,
};
@@ -3239,7 +3239,7 @@ ssb
TextFormatter tf = new ()
{
Text = text,
- Justification = Justification.Centered,
+ Justification = Alignment.Centered,
AutoSize = autoSize,
};
@@ -3284,7 +3284,7 @@ ssb
TextFormatter tf = new ()
{
Text = text,
- Justification = Justification.Justified,
+ Justification = Alignment.Justified,
AutoSize = autoSize,
};
@@ -3374,7 +3374,7 @@ Nice Work")]
TextFormatter tf = new ()
{
Text = text,
- Justification = Justification.Justified,
+ Justification = Alignment.Justified,
Size = new Size (width, height),
MultiLine = true
};
@@ -3426,7 +3426,7 @@ ek")]
{
Text = text,
Direction = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Justified,
+ VerticalJustification = Alignment.Justified,
Size = new Size (width, height),
MultiLine = true
};
@@ -3482,9 +3482,9 @@ ek")]
TextFormatter tf = new ()
{
Text = text,
- Justification = Justification.Right,
+ Justification = Alignment.Right,
Direction = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Bottom,
+ VerticalJustification = Alignment.Bottom,
AutoSize = autoSize,
};
@@ -3624,7 +3624,7 @@ B")]
{
Text = text,
Direction = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Centered,
+ VerticalJustification = Alignment.Centered,
AutoSize = autoSize,
};
@@ -3882,7 +3882,7 @@ B")]
// Horizontal with Justification.Top
// LeftRight_TopBottom
- [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Top, TextDirection.LeftRight_TopBottom, @"
0 2 4**
*******
*******
@@ -3890,7 +3890,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Top, TextDirection.LeftRight_TopBottom, @"
**0 2 4
*******
*******
@@ -3898,7 +3898,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Top, TextDirection.LeftRight_TopBottom, @"
*0 2 4*
*******
*******
@@ -3906,7 +3906,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Top, TextDirection.LeftRight_TopBottom, @"
0 2 4
*******
*******
@@ -3915,7 +3915,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Top, TextDirection.LeftRight_TopBottom, @"
0 你 4*
*******
*******
@@ -3923,7 +3923,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Top, TextDirection.LeftRight_TopBottom, @"
*0 你 4
*******
*******
@@ -3931,7 +3931,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Top, TextDirection.LeftRight_TopBottom, @"
0 你 4*
*******
*******
@@ -3939,7 +3939,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Top, TextDirection.LeftRight_TopBottom, @"
0 你 4
*******
*******
@@ -3949,7 +3949,7 @@ B")]
*******")]
// LeftRight_BottomTop
- [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Top, TextDirection.LeftRight_BottomTop, @"
0 2 4**
*******
*******
@@ -3957,7 +3957,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Top, TextDirection.LeftRight_BottomTop, @"
**0 2 4
*******
*******
@@ -3965,7 +3965,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Top, TextDirection.LeftRight_BottomTop, @"
*0 2 4*
*******
*******
@@ -3973,7 +3973,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Top, TextDirection.LeftRight_BottomTop, @"
0 2 4
*******
*******
@@ -3982,7 +3982,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Top, TextDirection.LeftRight_BottomTop, @"
0 你 4*
*******
*******
@@ -3990,7 +3990,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Top, TextDirection.LeftRight_BottomTop, @"
*0 你 4
*******
*******
@@ -3998,7 +3998,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Top, TextDirection.LeftRight_BottomTop, @"
0 你 4*
*******
*******
@@ -4006,7 +4006,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Top, TextDirection.LeftRight_BottomTop, @"
0 你 4
*******
*******
@@ -4016,7 +4016,7 @@ B")]
*******")]
// RightLeft_TopBottom
- [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Top, TextDirection.RightLeft_TopBottom, @"
4 2 0**
*******
*******
@@ -4024,7 +4024,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Top, TextDirection.RightLeft_TopBottom, @"
**4 2 0
*******
*******
@@ -4032,7 +4032,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Top, TextDirection.RightLeft_TopBottom, @"
*4 2 0*
*******
*******
@@ -4040,7 +4040,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Top, TextDirection.RightLeft_TopBottom, @"
4 2 0
*******
*******
@@ -4049,7 +4049,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Top, TextDirection.RightLeft_TopBottom, @"
4 你 0*
*******
*******
@@ -4057,7 +4057,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Top, TextDirection.RightLeft_TopBottom, @"
*4 你 0
*******
*******
@@ -4065,7 +4065,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Top, TextDirection.RightLeft_TopBottom, @"
4 你 0*
*******
*******
@@ -4073,7 +4073,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Top, TextDirection.RightLeft_TopBottom, @"
4 你 0
*******
*******
@@ -4083,7 +4083,7 @@ B")]
*******")]
// RightLeft_BottomTop
- [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Top, TextDirection.RightLeft_BottomTop, @"
4 2 0**
*******
*******
@@ -4091,7 +4091,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Top, TextDirection.RightLeft_BottomTop, @"
**4 2 0
*******
*******
@@ -4099,7 +4099,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Top, TextDirection.RightLeft_BottomTop, @"
*4 2 0*
*******
*******
@@ -4107,7 +4107,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Top, TextDirection.RightLeft_BottomTop, @"
4 2 0
*******
*******
@@ -4116,7 +4116,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Top, TextDirection.RightLeft_BottomTop, @"
4 你 0*
*******
*******
@@ -4124,7 +4124,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Top, TextDirection.RightLeft_BottomTop, @"
*4 你 0
*******
*******
@@ -4132,7 +4132,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Top, TextDirection.RightLeft_BottomTop, @"
4 你 0*
*******
*******
@@ -4140,7 +4140,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Top, TextDirection.RightLeft_BottomTop, @"
4 你 0
*******
*******
@@ -4151,7 +4151,7 @@ B")]
// Horizontal with Justification.Bottom
// LeftRight_TopBottom
- [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Bottom, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4159,7 +4159,7 @@ B")]
*******
*******
0 2 4**")]
- [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Bottom, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4167,7 +4167,7 @@ B")]
*******
*******
**0 2 4")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Bottom, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4175,7 +4175,7 @@ B")]
*******
*******
*0 2 4*")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Bottom, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4184,7 +4184,7 @@ B")]
*******
0 2 4")]
- [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Bottom, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4192,7 +4192,7 @@ B")]
*******
*******
0 你 4*")]
- [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Bottom, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4200,7 +4200,7 @@ B")]
*******
*******
*0 你 4")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Bottom, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4208,7 +4208,7 @@ B")]
*******
*******
0 你 4*")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Bottom, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4218,7 +4218,7 @@ B")]
0 你 4")]
// LeftRight_BottomTop
- [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Bottom, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4226,7 +4226,7 @@ B")]
*******
*******
0 2 4**")]
- [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Bottom, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4234,7 +4234,7 @@ B")]
*******
*******
**0 2 4")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Bottom, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4242,7 +4242,7 @@ B")]
*******
*******
*0 2 4*")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Bottom, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4251,7 +4251,7 @@ B")]
*******
0 2 4")]
- [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Bottom, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4259,7 +4259,7 @@ B")]
*******
*******
0 你 4*")]
- [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Bottom, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4267,7 +4267,7 @@ B")]
*******
*******
*0 你 4")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Bottom, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4275,7 +4275,7 @@ B")]
*******
*******
0 你 4*")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Bottom, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4285,7 +4285,7 @@ B")]
0 你 4")]
// RightLeft_TopBottom
- [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Bottom, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4293,7 +4293,7 @@ B")]
*******
*******
4 2 0**")]
- [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Bottom, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4301,7 +4301,7 @@ B")]
*******
*******
**4 2 0")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Bottom, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4309,7 +4309,7 @@ B")]
*******
*******
*4 2 0*")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Bottom, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4318,7 +4318,7 @@ B")]
*******
4 2 0")]
- [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Bottom, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4326,7 +4326,7 @@ B")]
*******
*******
4 你 0*")]
- [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Bottom, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4334,7 +4334,7 @@ B")]
*******
*******
*4 你 0")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Bottom, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4342,7 +4342,7 @@ B")]
*******
*******
4 你 0*")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Bottom, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4352,7 +4352,7 @@ B")]
4 你 0")]
// RightLeft_BottomTop
- [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Bottom, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4360,7 +4360,7 @@ B")]
*******
*******
4 2 0**")]
- [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Bottom, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4368,7 +4368,7 @@ B")]
*******
*******
**4 2 0")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Bottom, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4376,7 +4376,7 @@ B")]
*******
*******
*4 2 0*")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Bottom, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4385,7 +4385,7 @@ B")]
*******
4 2 0")]
- [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Bottom, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4393,7 +4393,7 @@ B")]
*******
*******
4 你 0*")]
- [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Bottom, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4401,7 +4401,7 @@ B")]
*******
*******
*4 你 0")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Bottom, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4409,7 +4409,7 @@ B")]
*******
*******
4 你 0*")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Bottom, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4420,7 +4420,7 @@ B")]
// Horizontal with Justification.Centered
// LeftRight_TopBottom
- [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Centered, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4428,7 +4428,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Centered, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4436,7 +4436,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Centered, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4444,7 +4444,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Centered, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4453,7 +4453,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Centered, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4461,7 +4461,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Centered, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4469,7 +4469,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Centered, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4477,7 +4477,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Centered, TextDirection.LeftRight_TopBottom, @"
*******
*******
*******
@@ -4487,7 +4487,7 @@ B")]
*******")]
// LeftRight_BottomTop
- [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Centered, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4495,7 +4495,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Centered, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4503,7 +4503,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Centered, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4511,7 +4511,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Centered, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4520,7 +4520,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Centered, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4528,7 +4528,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Centered, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4536,7 +4536,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Centered, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4544,7 +4544,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Centered, TextDirection.LeftRight_BottomTop, @"
*******
*******
*******
@@ -4554,7 +4554,7 @@ B")]
*******")]
// RightLeft_TopBottom
- [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Centered, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4562,7 +4562,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Centered, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4570,7 +4570,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Centered, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4578,7 +4578,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Centered, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4587,7 +4587,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Centered, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4595,7 +4595,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Centered, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4603,7 +4603,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Centered, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4611,7 +4611,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Centered, TextDirection.RightLeft_TopBottom, @"
*******
*******
*******
@@ -4621,7 +4621,7 @@ B")]
*******")]
// RightLeft_BottomTop
- [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Centered, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4629,7 +4629,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Centered, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4637,7 +4637,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Centered, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4645,7 +4645,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Centered, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4654,7 +4654,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Centered, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4662,7 +4662,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Centered, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4670,7 +4670,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Centered, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4678,7 +4678,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Centered, TextDirection.RightLeft_BottomTop, @"
*******
*******
*******
@@ -4689,7 +4689,7 @@ B")]
// Horizontal with Justification.Justified
// LeftRight_TopBottom
- [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Justified, TextDirection.LeftRight_TopBottom, @"
0 2 4**
*******
*******
@@ -4697,7 +4697,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Justified, TextDirection.LeftRight_TopBottom, @"
**0 2 4
*******
*******
@@ -4705,7 +4705,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Justified, TextDirection.LeftRight_TopBottom, @"
*0 2 4*
*******
*******
@@ -4713,7 +4713,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Justified, TextDirection.LeftRight_TopBottom, @"
0 2 4
*******
*******
@@ -4722,7 +4722,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Justified, TextDirection.LeftRight_TopBottom, @"
0 你 4*
*******
*******
@@ -4730,7 +4730,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Justified, TextDirection.LeftRight_TopBottom, @"
*0 你 4
*******
*******
@@ -4738,7 +4738,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Justified, TextDirection.LeftRight_TopBottom, @"
0 你 4*
*******
*******
@@ -4746,7 +4746,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.LeftRight_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Justified, TextDirection.LeftRight_TopBottom, @"
0 你 4
*******
*******
@@ -4756,7 +4756,7 @@ B")]
*******")]
// LeftRight_BottomTop
- [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Justified, TextDirection.LeftRight_BottomTop, @"
0 2 4**
*******
*******
@@ -4764,7 +4764,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Justified, TextDirection.LeftRight_BottomTop, @"
**0 2 4
*******
*******
@@ -4772,7 +4772,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Justified, TextDirection.LeftRight_BottomTop, @"
*0 2 4*
*******
*******
@@ -4780,7 +4780,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Justified, TextDirection.LeftRight_BottomTop, @"
0 2 4
*******
*******
@@ -4789,7 +4789,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Justified, TextDirection.LeftRight_BottomTop, @"
0 你 4*
*******
*******
@@ -4797,7 +4797,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Justified, TextDirection.LeftRight_BottomTop, @"
*0 你 4
*******
*******
@@ -4805,7 +4805,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Justified, TextDirection.LeftRight_BottomTop, @"
0 你 4*
*******
*******
@@ -4813,7 +4813,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.LeftRight_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Justified, TextDirection.LeftRight_BottomTop, @"
0 你 4
*******
*******
@@ -4823,7 +4823,7 @@ B")]
*******")]
// RightLeft_TopBottom
- [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Justified, TextDirection.RightLeft_TopBottom, @"
4 2 0**
*******
*******
@@ -4831,7 +4831,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Justified, TextDirection.RightLeft_TopBottom, @"
**4 2 0
*******
*******
@@ -4839,7 +4839,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Justified, TextDirection.RightLeft_TopBottom, @"
*4 2 0*
*******
*******
@@ -4847,7 +4847,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Justified, TextDirection.RightLeft_TopBottom, @"
4 2 0
*******
*******
@@ -4856,7 +4856,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Justified, TextDirection.RightLeft_TopBottom, @"
4 你 0*
*******
*******
@@ -4864,7 +4864,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Justified, TextDirection.RightLeft_TopBottom, @"
*4 你 0
*******
*******
@@ -4872,7 +4872,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Justified, TextDirection.RightLeft_TopBottom, @"
4 你 0*
*******
*******
@@ -4880,7 +4880,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.RightLeft_TopBottom, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Justified, TextDirection.RightLeft_TopBottom, @"
4 你 0
*******
*******
@@ -4890,7 +4890,7 @@ B")]
*******")]
// RightLeft_BottomTop
- [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Justified, TextDirection.RightLeft_BottomTop, @"
4 2 0**
*******
*******
@@ -4898,7 +4898,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Justified, TextDirection.RightLeft_BottomTop, @"
**4 2 0
*******
*******
@@ -4906,7 +4906,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Justified, TextDirection.RightLeft_BottomTop, @"
*4 2 0*
*******
*******
@@ -4914,7 +4914,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Justified, TextDirection.RightLeft_BottomTop, @"
4 2 0
*******
*******
@@ -4923,7 +4923,7 @@ B")]
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Justified, TextDirection.RightLeft_BottomTop, @"
4 你 0*
*******
*******
@@ -4931,7 +4931,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Justified, TextDirection.RightLeft_BottomTop, @"
*4 你 0
*******
*******
@@ -4939,7 +4939,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Justified, TextDirection.RightLeft_BottomTop, @"
4 你 0*
*******
*******
@@ -4947,7 +4947,7 @@ B")]
*******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.RightLeft_BottomTop, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Justified, TextDirection.RightLeft_BottomTop, @"
4 你 0
*******
*******
@@ -4958,7 +4958,7 @@ B")]
// Vertical with Justification.Left
// TopBottom_LeftRight
- [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
0******
******
2******
@@ -4966,7 +4966,7 @@ B")]
4******
*******
*******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Bottom, TextDirection.TopBottom_LeftRight, @"
*******
*******
0******
@@ -4974,7 +4974,7 @@ B")]
2******
******
4******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Centered, TextDirection.TopBottom_LeftRight, @"
*******
0******
******
@@ -4982,7 +4982,7 @@ B")]
******
4******
*******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Justified, TextDirection.TopBottom_LeftRight, @"
0******
******
******
@@ -4991,7 +4991,7 @@ B")]
******
4******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
0******
******
你*****
@@ -4999,7 +4999,7 @@ B")]
4******
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Bottom, TextDirection.TopBottom_LeftRight, @"
*******
*******
0******
@@ -5007,7 +5007,7 @@ B")]
你*****
******
4******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Centered, TextDirection.TopBottom_LeftRight, @"
*******
0******
******
@@ -5015,7 +5015,7 @@ B")]
******
4******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Justified, TextDirection.TopBottom_LeftRight, @"
0******
******
******
@@ -5025,7 +5025,7 @@ B")]
4******")]
// TopBottom_RightLeft
- [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Top, TextDirection.TopBottom_RightLeft, @"
0******
******
2******
@@ -5033,7 +5033,7 @@ B")]
4******
*******
*******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Bottom, TextDirection.TopBottom_RightLeft, @"
*******
*******
0******
@@ -5041,7 +5041,7 @@ B")]
2******
******
4******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Centered, TextDirection.TopBottom_RightLeft, @"
*******
0******
******
@@ -5049,7 +5049,7 @@ B")]
******
4******
*******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Justified, TextDirection.TopBottom_RightLeft, @"
0******
******
******
@@ -5058,7 +5058,7 @@ B")]
******
4******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Top, TextDirection.TopBottom_RightLeft, @"
0******
******
你*****
@@ -5066,7 +5066,7 @@ B")]
4******
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Bottom, TextDirection.TopBottom_RightLeft, @"
*******
*******
0******
@@ -5074,7 +5074,7 @@ B")]
你*****
******
4******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Centered, TextDirection.TopBottom_RightLeft, @"
*******
0******
******
@@ -5082,7 +5082,7 @@ B")]
******
4******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Justified, TextDirection.TopBottom_RightLeft, @"
0******
******
******
@@ -5092,7 +5092,7 @@ B")]
4******")]
// BottomTop_LeftRight
- [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Top, TextDirection.BottomTop_LeftRight, @"
4******
******
2******
@@ -5100,7 +5100,7 @@ B")]
0******
*******
*******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Bottom, TextDirection.BottomTop_LeftRight, @"
*******
*******
4******
@@ -5108,7 +5108,7 @@ B")]
2******
******
0******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Centered, TextDirection.BottomTop_LeftRight, @"
*******
4******
******
@@ -5116,7 +5116,7 @@ B")]
******
0******
*******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Justified, TextDirection.BottomTop_LeftRight, @"
4******
******
******
@@ -5125,7 +5125,7 @@ B")]
******
0******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Top, TextDirection.BottomTop_LeftRight, @"
4******
******
你*****
@@ -5133,7 +5133,7 @@ B")]
0******
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Bottom, TextDirection.BottomTop_LeftRight, @"
*******
*******
4******
@@ -5141,7 +5141,7 @@ B")]
你*****
******
0******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Centered, TextDirection.BottomTop_LeftRight, @"
*******
4******
******
@@ -5149,7 +5149,7 @@ B")]
******
0******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Justified, TextDirection.BottomTop_LeftRight, @"
4******
******
******
@@ -5159,7 +5159,7 @@ B")]
0******")]
// BottomTop_RightLeft
- [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Top, TextDirection.BottomTop_RightLeft, @"
4******
******
2******
@@ -5167,7 +5167,7 @@ B")]
0******
*******
*******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Bottom, TextDirection.BottomTop_RightLeft, @"
*******
*******
4******
@@ -5175,7 +5175,7 @@ B")]
2******
******
0******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Centered, TextDirection.BottomTop_RightLeft, @"
*******
4******
******
@@ -5183,7 +5183,7 @@ B")]
******
0******
*******")]
- [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Left, Alignment.Justified, TextDirection.BottomTop_RightLeft, @"
4******
******
******
@@ -5192,7 +5192,7 @@ B")]
******
0******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Top, TextDirection.BottomTop_RightLeft, @"
4******
******
你*****
@@ -5200,7 +5200,7 @@ B")]
0******
*******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Bottom, TextDirection.BottomTop_RightLeft, @"
*******
*******
4******
@@ -5208,7 +5208,7 @@ B")]
你*****
******
0******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Centered, TextDirection.BottomTop_RightLeft, @"
*******
4******
******
@@ -5216,7 +5216,7 @@ B")]
******
0******
*******")]
- [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Left, Alignment.Justified, TextDirection.BottomTop_RightLeft, @"
4******
******
******
@@ -5227,7 +5227,7 @@ B")]
// Vertical with Justification.Right
// TopBottom_LeftRight
- [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
******0
******
******2
@@ -5235,7 +5235,7 @@ B")]
******4
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Bottom, TextDirection.TopBottom_LeftRight, @"
*******
*******
******0
@@ -5243,7 +5243,7 @@ B")]
******2
******
******4")]
- [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Centered, TextDirection.TopBottom_LeftRight, @"
*******
******0
******
@@ -5251,7 +5251,7 @@ B")]
******
******4
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Justified, TextDirection.TopBottom_LeftRight, @"
******0
******
******
@@ -5260,7 +5260,7 @@ B")]
******
******4")]
- [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
*****0*
***** *
*****你
@@ -5268,7 +5268,7 @@ B")]
*****4*
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Bottom, TextDirection.TopBottom_LeftRight, @"
*******
*******
*****0*
@@ -5276,7 +5276,7 @@ B")]
*****你
***** *
*****4*")]
- [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Centered, TextDirection.TopBottom_LeftRight, @"
*******
*****0*
***** *
@@ -5284,7 +5284,7 @@ B")]
***** *
*****4*
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Justified, TextDirection.TopBottom_LeftRight, @"
*****0*
***** *
***** *
@@ -5294,7 +5294,7 @@ B")]
*****4*")]
// TopBottom_RightLeft
- [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Top, TextDirection.TopBottom_RightLeft, @"
******0
******
******2
@@ -5302,7 +5302,7 @@ B")]
******4
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Bottom, TextDirection.TopBottom_RightLeft, @"
*******
*******
******0
@@ -5310,7 +5310,7 @@ B")]
******2
******
******4")]
- [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Centered, TextDirection.TopBottom_RightLeft, @"
*******
******0
******
@@ -5318,7 +5318,7 @@ B")]
******
******4
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Justified, TextDirection.TopBottom_RightLeft, @"
******0
******
******
@@ -5327,7 +5327,7 @@ B")]
******
******4")]
- [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Top, TextDirection.TopBottom_RightLeft, @"
*****0*
***** *
*****你
@@ -5335,7 +5335,7 @@ B")]
*****4*
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Bottom, TextDirection.TopBottom_RightLeft, @"
*******
*******
*****0*
@@ -5343,7 +5343,7 @@ B")]
*****你
***** *
*****4*")]
- [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Centered, TextDirection.TopBottom_RightLeft, @"
*******
*****0*
***** *
@@ -5351,7 +5351,7 @@ B")]
***** *
*****4*
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Justified, TextDirection.TopBottom_RightLeft, @"
*****0*
***** *
***** *
@@ -5361,7 +5361,7 @@ B")]
*****4*")]
// BottomTop_LeftRight
- [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Top, TextDirection.BottomTop_LeftRight, @"
******4
******
******2
@@ -5369,7 +5369,7 @@ B")]
******0
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Bottom, TextDirection.BottomTop_LeftRight, @"
*******
*******
******4
@@ -5377,7 +5377,7 @@ B")]
******2
******
******0")]
- [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Centered, TextDirection.BottomTop_LeftRight, @"
*******
******4
******
@@ -5385,7 +5385,7 @@ B")]
******
******0
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Justified, TextDirection.BottomTop_LeftRight, @"
******4
******
******
@@ -5394,7 +5394,7 @@ B")]
******
******0")]
- [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Top, TextDirection.BottomTop_LeftRight, @"
*****4*
***** *
*****你
@@ -5402,7 +5402,7 @@ B")]
*****0*
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Bottom, TextDirection.BottomTop_LeftRight, @"
*******
*******
*****4*
@@ -5410,7 +5410,7 @@ B")]
*****你
***** *
*****0*")]
- [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Centered, TextDirection.BottomTop_LeftRight, @"
*******
*****4*
***** *
@@ -5418,7 +5418,7 @@ B")]
***** *
*****0*
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Justified, TextDirection.BottomTop_LeftRight, @"
*****4*
***** *
***** *
@@ -5428,7 +5428,7 @@ B")]
*****0*")]
// BottomTop_RightLeft
- [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Top, TextDirection.BottomTop_RightLeft, @"
******4
******
******2
@@ -5436,7 +5436,7 @@ B")]
******0
*******
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Bottom, TextDirection.BottomTop_RightLeft, @"
*******
*******
******4
@@ -5444,7 +5444,7 @@ B")]
******2
******
******0")]
- [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Centered, TextDirection.BottomTop_RightLeft, @"
*******
******4
******
@@ -5452,7 +5452,7 @@ B")]
******
******0
*******")]
- [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Right, Alignment.Justified, TextDirection.BottomTop_RightLeft, @"
******4
******
******
@@ -5461,7 +5461,7 @@ B")]
******
******0")]
- [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Top, TextDirection.BottomTop_RightLeft, @"
*****4*
***** *
*****你
@@ -5469,7 +5469,7 @@ B")]
*****0*
*******
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Bottom, TextDirection.BottomTop_RightLeft, @"
*******
*******
*****4*
@@ -5477,7 +5477,7 @@ B")]
*****你
***** *
*****0*")]
- [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Centered, TextDirection.BottomTop_RightLeft, @"
*******
*****4*
***** *
@@ -5485,7 +5485,7 @@ B")]
***** *
*****0*
*******")]
- [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Right, Alignment.Justified, TextDirection.BottomTop_RightLeft, @"
*****4*
***** *
***** *
@@ -5496,7 +5496,7 @@ B")]
// Vertical with Justification.Centered
// TopBottom_LeftRight
- [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
***0***
*** ***
***2***
@@ -5504,7 +5504,7 @@ B")]
***4***
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Bottom, TextDirection.TopBottom_LeftRight, @"
*******
*******
***0***
@@ -5512,7 +5512,7 @@ B")]
***2***
*** ***
***4***")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Centered, TextDirection.TopBottom_LeftRight, @"
*******
***0***
*** ***
@@ -5520,7 +5520,7 @@ B")]
*** ***
***4***
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Justified, TextDirection.TopBottom_LeftRight, @"
***0***
*** ***
*** ***
@@ -5529,7 +5529,7 @@ B")]
*** ***
***4***")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
**0****
** ****
**你***
@@ -5537,7 +5537,7 @@ B")]
**4****
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Bottom, TextDirection.TopBottom_LeftRight, @"
*******
*******
**0****
@@ -5545,7 +5545,7 @@ B")]
**你***
** ****
**4****")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Centered, TextDirection.TopBottom_LeftRight, @"
*******
**0****
** ****
@@ -5553,7 +5553,7 @@ B")]
** ****
**4****
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Justified, TextDirection.TopBottom_LeftRight, @"
**0****
** ****
** ****
@@ -5563,7 +5563,7 @@ B")]
**4****")]
// TopBottom_RightLeft
- [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Top, TextDirection.TopBottom_RightLeft, @"
***0***
*** ***
***2***
@@ -5571,7 +5571,7 @@ B")]
***4***
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Bottom, TextDirection.TopBottom_RightLeft, @"
*******
*******
***0***
@@ -5579,7 +5579,7 @@ B")]
***2***
*** ***
***4***")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Centered, TextDirection.TopBottom_RightLeft, @"
*******
***0***
*** ***
@@ -5587,7 +5587,7 @@ B")]
*** ***
***4***
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Justified, TextDirection.TopBottom_RightLeft, @"
***0***
*** ***
*** ***
@@ -5596,7 +5596,7 @@ B")]
*** ***
***4***")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Top, TextDirection.TopBottom_RightLeft, @"
**0****
** ****
**你***
@@ -5604,7 +5604,7 @@ B")]
**4****
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Bottom, TextDirection.TopBottom_RightLeft, @"
*******
*******
**0****
@@ -5612,7 +5612,7 @@ B")]
**你***
** ****
**4****")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Centered, TextDirection.TopBottom_RightLeft, @"
*******
**0****
** ****
@@ -5620,7 +5620,7 @@ B")]
** ****
**4****
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Justified, TextDirection.TopBottom_RightLeft, @"
**0****
** ****
** ****
@@ -5630,7 +5630,7 @@ B")]
**4****")]
// BottomTop_LeftRight
- [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Top, TextDirection.BottomTop_LeftRight, @"
***4***
*** ***
***2***
@@ -5638,7 +5638,7 @@ B")]
***0***
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Bottom, TextDirection.BottomTop_LeftRight, @"
*******
*******
***4***
@@ -5646,7 +5646,7 @@ B")]
***2***
*** ***
***0***")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Centered, TextDirection.BottomTop_LeftRight, @"
*******
***4***
*** ***
@@ -5654,7 +5654,7 @@ B")]
*** ***
***0***
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Justified, TextDirection.BottomTop_LeftRight, @"
***4***
*** ***
*** ***
@@ -5663,7 +5663,7 @@ B")]
*** ***
***0***")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Top, TextDirection.BottomTop_LeftRight, @"
**4****
** ****
**你***
@@ -5671,7 +5671,7 @@ B")]
**0****
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Bottom, TextDirection.BottomTop_LeftRight, @"
*******
*******
**4****
@@ -5679,7 +5679,7 @@ B")]
**你***
** ****
**0****")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Centered, TextDirection.BottomTop_LeftRight, @"
*******
**4****
** ****
@@ -5687,7 +5687,7 @@ B")]
** ****
**0****
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Justified, TextDirection.BottomTop_LeftRight, @"
**4****
** ****
** ****
@@ -5697,7 +5697,7 @@ B")]
**0****")]
// BottomTop_RightLeft
- [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Top, TextDirection.BottomTop_RightLeft, @"
***4***
*** ***
***2***
@@ -5705,7 +5705,7 @@ B")]
***0***
*******
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Bottom, TextDirection.BottomTop_RightLeft, @"
*******
*******
***4***
@@ -5713,7 +5713,7 @@ B")]
***2***
*** ***
***0***")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Centered, TextDirection.BottomTop_RightLeft, @"
*******
***4***
*** ***
@@ -5721,7 +5721,7 @@ B")]
*** ***
***0***
*******")]
- [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Centered, Alignment.Justified, TextDirection.BottomTop_RightLeft, @"
***4***
*** ***
*** ***
@@ -5730,7 +5730,7 @@ B")]
*** ***
***0***")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Top, TextDirection.BottomTop_RightLeft, @"
**4****
** ****
**你***
@@ -5738,7 +5738,7 @@ B")]
**0****
*******
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Bottom, TextDirection.BottomTop_RightLeft, @"
*******
*******
**4****
@@ -5746,7 +5746,7 @@ B")]
**你***
** ****
**0****")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Centered, TextDirection.BottomTop_RightLeft, @"
*******
**4****
** ****
@@ -5754,7 +5754,7 @@ B")]
** ****
**0****
*******")]
- [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Centered, Alignment.Justified, TextDirection.BottomTop_RightLeft, @"
**4****
** ****
** ****
@@ -5765,7 +5765,7 @@ B")]
// Vertical with Justification.Justified
// TopBottom_LeftRight
- [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
0******
******
2******
@@ -5773,7 +5773,7 @@ B")]
4******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Bottom, TextDirection.TopBottom_LeftRight, @"
*******
*******
0******
@@ -5781,7 +5781,7 @@ B")]
2******
******
4******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Centered, TextDirection.TopBottom_LeftRight, @"
*******
0******
******
@@ -5789,7 +5789,7 @@ B")]
******
4******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Justified, TextDirection.TopBottom_LeftRight, @"
0******
******
******
@@ -5798,7 +5798,7 @@ B")]
******
4******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Top, TextDirection.TopBottom_LeftRight, @"
0******
******
你*****
@@ -5806,7 +5806,7 @@ B")]
4******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Bottom, TextDirection.TopBottom_LeftRight, @"
*******
*******
0******
@@ -5814,7 +5814,7 @@ B")]
你*****
******
4******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Centered, TextDirection.TopBottom_LeftRight, @"
*******
0******
******
@@ -5822,7 +5822,7 @@ B")]
******
4******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.TopBottom_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Justified, TextDirection.TopBottom_LeftRight, @"
0******
******
******
@@ -5832,7 +5832,7 @@ B")]
4******")]
// TopBottom_RightLeft
- [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Top, TextDirection.TopBottom_RightLeft, @"
0******
******
2******
@@ -5840,7 +5840,7 @@ B")]
4******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Bottom, TextDirection.TopBottom_RightLeft, @"
*******
*******
0******
@@ -5848,7 +5848,7 @@ B")]
2******
******
4******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Centered, TextDirection.TopBottom_RightLeft, @"
*******
0******
******
@@ -5856,7 +5856,7 @@ B")]
******
4******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Justified, TextDirection.TopBottom_RightLeft, @"
0******
******
******
@@ -5865,7 +5865,7 @@ B")]
******
4******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Top, TextDirection.TopBottom_RightLeft, @"
0******
******
你*****
@@ -5873,7 +5873,7 @@ B")]
4******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Bottom, TextDirection.TopBottom_RightLeft, @"
*******
*******
0******
@@ -5881,7 +5881,7 @@ B")]
你*****
******
4******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Centered, TextDirection.TopBottom_RightLeft, @"
*******
0******
******
@@ -5889,7 +5889,7 @@ B")]
******
4******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.TopBottom_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Justified, TextDirection.TopBottom_RightLeft, @"
0******
******
******
@@ -5899,7 +5899,7 @@ B")]
4******")]
// BottomTop_LeftRight
- [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Top, TextDirection.BottomTop_LeftRight, @"
4******
******
2******
@@ -5907,7 +5907,7 @@ B")]
0******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Bottom, TextDirection.BottomTop_LeftRight, @"
*******
*******
4******
@@ -5915,7 +5915,7 @@ B")]
2******
******
0******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Centered, TextDirection.BottomTop_LeftRight, @"
*******
4******
******
@@ -5923,7 +5923,7 @@ B")]
******
0******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Justified, TextDirection.BottomTop_LeftRight, @"
4******
******
******
@@ -5932,7 +5932,7 @@ B")]
******
0******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Top, TextDirection.BottomTop_LeftRight, @"
4******
******
你*****
@@ -5940,7 +5940,7 @@ B")]
0******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Bottom, TextDirection.BottomTop_LeftRight, @"
*******
*******
4******
@@ -5948,7 +5948,7 @@ B")]
你*****
******
0******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Centered, TextDirection.BottomTop_LeftRight, @"
*******
4******
******
@@ -5956,7 +5956,7 @@ B")]
******
0******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.BottomTop_LeftRight, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Justified, TextDirection.BottomTop_LeftRight, @"
4******
******
******
@@ -5966,7 +5966,7 @@ B")]
0******")]
// BottomTop_RightLeft
- [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Top, TextDirection.BottomTop_RightLeft, @"
4******
******
2******
@@ -5974,7 +5974,7 @@ B")]
0******
*******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Bottom, TextDirection.BottomTop_RightLeft, @"
*******
*******
4******
@@ -5982,7 +5982,7 @@ B")]
2******
******
0******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Centered, TextDirection.BottomTop_RightLeft, @"
*******
4******
******
@@ -5990,7 +5990,7 @@ B")]
******
0******
*******")]
- [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 2 4", Alignment.Justified, Alignment.Justified, TextDirection.BottomTop_RightLeft, @"
4******
******
******
@@ -5999,7 +5999,7 @@ B")]
******
0******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Top, TextDirection.BottomTop_RightLeft, @"
4******
******
你*****
@@ -6007,7 +6007,7 @@ B")]
0******
*******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Bottom, TextDirection.BottomTop_RightLeft, @"
*******
*******
4******
@@ -6015,7 +6015,7 @@ B")]
你*****
******
0******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Centered, TextDirection.BottomTop_RightLeft, @"
*******
4******
******
@@ -6023,7 +6023,7 @@ B")]
******
0******
*******")]
- [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.BottomTop_RightLeft, @"
+ [InlineData ("0 你 4", Alignment.Justified, Alignment.Justified, TextDirection.BottomTop_RightLeft, @"
4******
******
******
@@ -6032,7 +6032,7 @@ B")]
******
0******")]
- public void Draw_Text_Justification (string text, Justification horizontalTextJustification, Justification justification, TextDirection textDirection, string expectedText)
+ public void Draw_Text_Justification (string text, Alignment horizontalTextJustification, Alignment justification, TextDirection textDirection, string expectedText)
{
TextFormatter tf = new ()
{
diff --git a/UnitTests/View/DrawTests.cs b/UnitTests/View/DrawTests.cs
index b28e74c98..7326616fc 100644
--- a/UnitTests/View/DrawTests.cs
+++ b/UnitTests/View/DrawTests.cs
@@ -339,7 +339,7 @@ public class DrawTests (ITestOutputHelper _output)
Text = "Test",
Width = 6,
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
ColorScheme = Colors.ColorSchemes ["Base"]
};
@@ -350,7 +350,7 @@ public class DrawTests (ITestOutputHelper _output)
Y = 1,
Width = 1,
Height = 6,
- VerticalJustification = Justification.Bottom,
+ VerticalTextJustification = Alignment.Bottom,
ColorScheme = Colors.ColorSchemes ["Base"]
};
Toplevel top = new ();
diff --git a/UnitTests/View/Layout/Dim.AutoTests.cs b/UnitTests/View/Layout/Dim.AutoTests.cs
index 7bb58c799..fe189e4e4 100644
--- a/UnitTests/View/Layout/Dim.AutoTests.cs
+++ b/UnitTests/View/Layout/Dim.AutoTests.cs
@@ -681,11 +681,11 @@ public class DimAutoTests (ITestOutputHelper output)
Assert.False (view.TextFormatter.AutoSize);
Assert.Equal (Size.Empty, view.Frame.Size);
- view.TextFormatter.Justification = Justification.Justified;
+ view.TextFormatter.Justification = Alignment.Justified;
Assert.False (view.TextFormatter.AutoSize);
Assert.Equal (Size.Empty, view.Frame.Size);
- view.TextFormatter.VerticalJustification = Justification.Centered;
+ view.TextFormatter.VerticalJustification = Alignment.Centered;
Assert.False (view.TextFormatter.AutoSize);
Assert.Equal (Size.Empty, view.Frame.Size);
@@ -709,11 +709,11 @@ public class DimAutoTests (ITestOutputHelper output)
Assert.False (view.TextFormatter.AutoSize);
Assert.Equal (Size.Empty, view.Frame.Size);
- view.Justification = Justification.Justified;
+ view.TextJustification = Alignment.Justified;
Assert.False (view.TextFormatter.AutoSize);
Assert.Equal (Size.Empty, view.Frame.Size);
- view.VerticalJustification = Justification.Centered;
+ view.VerticalTextJustification = Alignment.Centered;
Assert.False (view.TextFormatter.AutoSize);
Assert.Equal (Size.Empty, view.Frame.Size);
@@ -738,7 +738,7 @@ public class DimAutoTests (ITestOutputHelper output)
Assert.True (view.TextFormatter.AutoSize);
Assert.NotEqual (Size.Empty, view.Frame.Size);
- view.Justification = Justification.Justified;
+ view.TextJustification = Alignment.Justified;
Assert.True (view.TextFormatter.AutoSize);
Assert.NotEqual (Size.Empty, view.Frame.Size);
@@ -747,7 +747,7 @@ public class DimAutoTests (ITestOutputHelper output)
Text = "_1234",
Width = Dim.Auto ()
};
- view.VerticalJustification = Justification.Centered;
+ view.VerticalTextJustification = Alignment.Centered;
Assert.True (view.TextFormatter.AutoSize);
Assert.NotEqual (Size.Empty, view.Frame.Size);
diff --git a/UnitTests/View/Text/AutoSizeTrueTests.cs b/UnitTests/View/Text/AutoSizeTrueTests.cs
index e89b791c2..5fafff7a6 100644
--- a/UnitTests/View/Text/AutoSizeTrueTests.cs
+++ b/UnitTests/View/Text/AutoSizeTrueTests.cs
@@ -1811,7 +1811,7 @@ Y
Y = 1,
Width = width,
Height = 1,
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
};
if (autoSize)
@@ -1826,7 +1826,7 @@ Y
Y = 2,
Width = width,
Height = 1,
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
};
if (autoSize)
{
@@ -1840,7 +1840,7 @@ Y
Y = 3,
Width = width,
Height = 1,
- Justification = Justification.Justified,
+ TextJustification = Alignment.Justified,
};
if (autoSize)
{
@@ -1937,7 +1937,7 @@ Y
Width = 1,
Height = height,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Centered
+ VerticalTextJustification = Alignment.Centered
};
if (autoSize)
{
@@ -1952,7 +1952,7 @@ Y
Width = 1,
Height = height,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Bottom
+ VerticalTextJustification = Alignment.Bottom
};
if (autoSize)
{
@@ -1967,7 +1967,7 @@ Y
Width = 1,
Height = height,
TextDirection = TextDirection.TopBottom_LeftRight,
- VerticalJustification = Justification.Justified
+ VerticalTextJustification = Alignment.Justified
};
if (autoSize)
{
diff --git a/UnitTests/Views/ButtonTests.cs b/UnitTests/Views/ButtonTests.cs
index 0aa841c44..aa32b62ef 100644
--- a/UnitTests/Views/ButtonTests.cs
+++ b/UnitTests/Views/ButtonTests.cs
@@ -155,14 +155,14 @@ public class ButtonTests (ITestOutputHelper output)
Assert.Equal ($"{CM.Glyphs.LeftBracket} {CM.Glyphs.RightBracket}", btn.TextFormatter.Text);
Assert.False (btn.IsDefault);
- Assert.Equal (Justification.Centered, btn.Justification);
+ Assert.Equal (Alignment.Centered, btn.TextJustification);
Assert.Equal ('_', btn.HotKeySpecifier.Value);
Assert.True (btn.CanFocus);
Assert.Equal (new (0, 0, 4, 1), btn.Viewport);
Assert.Equal (new (0, 0, 4, 1), btn.Frame);
Assert.Equal ($"{CM.Glyphs.LeftBracket} {CM.Glyphs.RightBracket}", btn.TextFormatter.Text);
Assert.False (btn.IsDefault);
- Assert.Equal (Justification.Centered, btn.Justification);
+ Assert.Equal (Alignment.Centered, btn.TextJustification);
Assert.Equal ('_', btn.HotKeySpecifier.Value);
Assert.True (btn.CanFocus);
Assert.Equal (new (0, 0, 4, 1), btn.Viewport);
@@ -195,7 +195,7 @@ public class ButtonTests (ITestOutputHelper output)
btn.TextFormatter.Format ()
);
Assert.True (btn.IsDefault);
- Assert.Equal (Justification.Centered, btn.Justification);
+ Assert.Equal (Alignment.Centered, btn.TextJustification);
Assert.True (btn.CanFocus);
btn.SetRelativeLayout (new (100, 100));
@@ -222,7 +222,7 @@ public class ButtonTests (ITestOutputHelper output)
btn.TextFormatter.Format ()
);
Assert.True (btn.IsDefault);
- Assert.Equal (Justification.Centered, btn.Justification);
+ Assert.Equal (Alignment.Centered, btn.TextJustification);
Assert.Equal ('_', btn.HotKeySpecifier.Value);
Assert.True (btn.CanFocus);
diff --git a/UnitTests/Views/CheckBoxTests.cs b/UnitTests/Views/CheckBoxTests.cs
index 53335ffce..465d55a1e 100644
--- a/UnitTests/Views/CheckBoxTests.cs
+++ b/UnitTests/Views/CheckBoxTests.cs
@@ -251,7 +251,7 @@ public class CheckBoxTests
X = 1,
Y = Pos.Center (),
Text = "Check this out 你",
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 25
};
var win = new Window { Width = Dim.Fill (), Height = Dim.Fill (), Title = "Test Demo 你" };
@@ -262,7 +262,7 @@ public class CheckBoxTests
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (30, 5);
- Assert.Equal (Justification.Centered, checkBox.Justification);
+ Assert.Equal (Alignment.Centered, checkBox.TextJustification);
Assert.Equal (new (1, 1, 25, 1), checkBox.Frame);
Assert.Equal (_size25x1, checkBox.TextFormatter.Size);
@@ -301,7 +301,7 @@ public class CheckBoxTests
X = 1,
Y = Pos.Center (),
Text = "Check first out 你",
- Justification = Justification.Justified,
+ TextJustification = Alignment.Justified,
Width = 25
};
@@ -310,7 +310,7 @@ public class CheckBoxTests
X = 1,
Y = Pos.Bottom (checkBox1),
Text = "Check second out 你",
- Justification = Justification.Justified,
+ TextJustification = Alignment.Justified,
Width = 25
};
var win = new Window { Width = Dim.Fill (), Height = Dim.Fill (), Title = "Test Demo 你" };
@@ -321,9 +321,9 @@ public class CheckBoxTests
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (30, 6);
- Assert.Equal (Justification.Justified, checkBox1.Justification);
+ Assert.Equal (Alignment.Justified, checkBox1.TextJustification);
Assert.Equal (new (1, 1, 25, 1), checkBox1.Frame);
- Assert.Equal (Justification.Justified, checkBox2.Justification);
+ Assert.Equal (Alignment.Justified, checkBox2.TextJustification);
Assert.Equal (new (1, 2, 25, 1), checkBox2.Frame);
var expected = @$"
@@ -378,7 +378,7 @@ public class CheckBoxTests
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (30, 5);
- Assert.Equal (Justification.Left, checkBox.Justification);
+ Assert.Equal (Alignment.Left, checkBox.TextJustification);
Assert.Equal (new (1, 1, 25, 1), checkBox.Frame);
Assert.Equal (_size25x1, checkBox.TextFormatter.Size);
@@ -417,7 +417,7 @@ public class CheckBoxTests
X = 1,
Y = Pos.Center (),
Text = "Check this out 你",
- Justification = Justification.Right,
+ TextJustification = Alignment.Right,
Width = 25
};
var win = new Window { Width = Dim.Fill (), Height = Dim.Fill (), Title = "Test Demo 你" };
@@ -428,7 +428,7 @@ public class CheckBoxTests
Application.Begin (top);
((FakeDriver)Application.Driver).SetBufferSize (30, 5);
- Assert.Equal (Justification.Right, checkBox.Justification);
+ Assert.Equal (Alignment.Right, checkBox.TextJustification);
Assert.Equal (new (1, 1, 25, 1), checkBox.Frame);
Assert.Equal (_size25x1, checkBox.TextFormatter.Size);
diff --git a/UnitTests/Views/LabelTests.cs b/UnitTests/Views/LabelTests.cs
index 3989ff9ba..85166f7e6 100644
--- a/UnitTests/Views/LabelTests.cs
+++ b/UnitTests/Views/LabelTests.cs
@@ -206,7 +206,7 @@ public class LabelTests
{
var label = new Label ();
Assert.Equal (string.Empty, label.Text);
- Assert.Equal (Justification.Left, label.Justification);
+ Assert.Equal (Alignment.Left, label.TextJustification);
Assert.False (label.CanFocus);
Assert.Equal (new Rectangle (0, 0, 0, 0), label.Frame);
Assert.Equal (KeyCode.Null, label.HotKey);
diff --git a/UnitTests/Views/TextValidateFieldTests.cs b/UnitTests/Views/TextValidateFieldTests.cs
index 62686f59f..a826380ed 100644
--- a/UnitTests/Views/TextValidateFieldTests.cs
+++ b/UnitTests/Views/TextValidateFieldTests.cs
@@ -10,7 +10,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// ****
@@ -44,7 +44,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Left,
+ TextJustification = Alignment.Left,
Width = 30,
// ****
@@ -81,7 +81,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// ****
@@ -115,7 +115,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// *
@@ -137,7 +137,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// *
@@ -161,7 +161,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// ****
@@ -179,7 +179,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// ****
@@ -196,7 +196,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// ****
@@ -214,7 +214,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// *
@@ -233,7 +233,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// *
@@ -253,7 +253,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// ** **
@@ -283,7 +283,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// *
@@ -308,7 +308,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Left,
+ TextJustification = Alignment.Left,
Width = 30,
// ****
@@ -338,7 +338,7 @@ public class TextValidateField_NET_Provider_Tests
var field = new TextValidateField
{
- Justification = Justification.Left, Width = 30, Provider = new NetMaskedTextProvider ("--(0000)--")
+ TextJustification = Alignment.Left, Width = 30, Provider = new NetMaskedTextProvider ("--(0000)--")
};
field.Provider.TextChanged += (sender, e) => wasTextChanged = true;
@@ -356,7 +356,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// *
@@ -381,7 +381,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Left,
+ TextJustification = Alignment.Left,
Width = 30,
// ****
@@ -400,7 +400,7 @@ public class TextValidateField_NET_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
// ****
@@ -540,7 +540,7 @@ public class TextValidateField_Regex_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
Provider = new TextRegexProvider ("^[0-9][0-9][0-9]$") { ValidateOnInput = false }
};
@@ -596,7 +596,7 @@ public class TextValidateField_Regex_Provider_Tests
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
Provider = new TextRegexProvider ("^[0-9][0-9][0-9]$") { ValidateOnInput = false }
};
@@ -616,7 +616,7 @@ public class TextValidateField_Regex_Provider_Tests
{
var field = new TextValidateField
{
- Justification = Justification.Centered,
+ TextJustification = Alignment.Centered,
Width = 20,
Provider = new TextRegexProvider ("^[0-9][0-9][0-9]$") { ValidateOnInput = false }
};
diff --git a/UnitTests/Views/ToplevelTests.cs b/UnitTests/Views/ToplevelTests.cs
index eebd7aef7..2e418d576 100644
--- a/UnitTests/Views/ToplevelTests.cs
+++ b/UnitTests/Views/ToplevelTests.cs
@@ -1482,8 +1482,8 @@ public class ToplevelTests
Y = Pos.Center (),
Width = Dim.Fill (),
Height = Dim.Fill (),
- Justification = Justification.Centered,
- VerticalJustification = Justification.Centered,
+ TextJustification = Alignment.Centered,
+ VerticalTextJustification = Alignment.Centered,
Text = "Test"
}
);