diff --git a/Terminal.Gui/Drawing/Thickness.cs b/Terminal.Gui/Drawing/Thickness.cs index 40a30d590..74458d221 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}", - Alignment = TextAlignment.Centered, - VerticalAlignment = VerticalTextAlignment.Bottom, + Alignment = Justification.Centered, + VerticalAlignment = Justification.Bottom, AutoSize = true }; tf.Draw (rect, Application.Driver.CurrentAttribute, Application.Driver.CurrentAttribute, rect); diff --git a/Terminal.Gui/Text/TextAlignment.cs b/Terminal.Gui/Text/TextAlignment.cs deleted file mode 100644 index 44950cfd5..000000000 --- a/Terminal.Gui/Text/TextAlignment.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Terminal.Gui; - -/// Text alignment enumeration, controls how text is displayed. -public enum TextAlignment -{ - /// The text will be left-aligned. - Left, - - /// The text will be right-aligned. - Right, - - /// The text will be centered horizontally. - Centered, - - /// - /// The text will be justified (spaces will be added to existing spaces such that the text fills the container - /// horizontally). - /// - Justified -} \ No newline at end of file diff --git a/Terminal.Gui/Text/TextFormatter.cs b/Terminal.Gui/Text/TextFormatter.cs index 925f89a38..5bdca378d 100644 --- a/Terminal.Gui/Text/TextFormatter.cs +++ b/Terminal.Gui/Text/TextFormatter.cs @@ -15,14 +15,14 @@ public class TextFormatter private Size _size; private int _tabWidth = 4; private string _text; - private TextAlignment _textAlignment; + private Justification _textAlignment; private TextDirection _textDirection; - private VerticalTextAlignment _textVerticalAlignment; + private Justification _textVerticalAlignment; private bool _wordWrap = true; /// Controls the horizontal text-alignment property. /// The text alignment. - public TextAlignment Alignment + public Justification Alignment { get => _textAlignment; set => _textAlignment = EnableNeedsFormat (value); @@ -32,8 +32,8 @@ public class TextFormatter /// /// Used when is using to resize the view's to fit . /// - /// AutoSize is ignored if and - /// are used. + /// AutoSize is ignored if and + /// are used. /// /// public bool AutoSize @@ -225,7 +225,7 @@ public class TextFormatter /// Controls the vertical text-alignment property. /// The text vertical alignment. - public VerticalTextAlignment VerticalAlignment + public Justification VerticalAlignment { get => _textVerticalAlignment; set => _textVerticalAlignment = EnableNeedsFormat (value); @@ -321,7 +321,7 @@ public class TextFormatter int x, y; // Horizontal Alignment - if (Alignment is TextAlignment.Right) + if (Alignment is Justification.Right) { if (isVertical) { @@ -336,7 +336,7 @@ public class TextFormatter CursorPosition = screen.Width - runesWidth + (_hotKeyPos > -1 ? _hotKeyPos : 0); } } - else if (Alignment is TextAlignment.Left) + else if (Alignment is Justification.Left) { if (isVertical) { @@ -352,7 +352,7 @@ public class TextFormatter CursorPosition = _hotKeyPos > -1 ? _hotKeyPos : 0; } - else if (Alignment is TextAlignment.Justified) + else if (Alignment is Justification.Justified) { if (isVertical) { @@ -375,7 +375,7 @@ public class TextFormatter CursorPosition = _hotKeyPos > -1 ? _hotKeyPos : 0; } - else if (Alignment is TextAlignment.Centered) + else if (Alignment is Justification.Centered) { if (isVertical) { @@ -399,7 +399,7 @@ public class TextFormatter } // Vertical Alignment - if (VerticalAlignment is VerticalTextAlignment.Bottom) + if (VerticalAlignment is Justification.Bottom) { if (isVertical) { @@ -410,7 +410,7 @@ public class TextFormatter y = screen.Bottom - linesFormatted.Count + line; } } - else if (VerticalAlignment is VerticalTextAlignment.Top) + else if (VerticalAlignment is Justification.Top) { if (isVertical) { @@ -421,7 +421,7 @@ public class TextFormatter y = screen.Top + line; } } - else if (VerticalAlignment is VerticalTextAlignment.Justified) + else if (VerticalAlignment is Justification.Justified) { if (isVertical) { @@ -435,7 +435,7 @@ public class TextFormatter line < linesFormatted.Count - 1 ? screen.Height - interval <= 1 ? screen.Top + 1 : screen.Top + line * interval : screen.Bottom - 1; } } - else if (VerticalAlignment is VerticalTextAlignment.Middle) + else if (VerticalAlignment is Justification.Centered) { if (isVertical) { @@ -471,8 +471,8 @@ public class TextFormatter { if (idx < 0 || (isVertical - ? VerticalAlignment != VerticalTextAlignment.Bottom && current < 0 - : Alignment != TextAlignment.Right && x + current + colOffset < 0)) + ? VerticalAlignment != Justification.Bottom && current < 0 + : Alignment != Justification.Right && x + current + colOffset < 0)) { current++; @@ -561,7 +561,7 @@ public class TextFormatter if (HotKeyPos > -1 && idx == HotKeyPos) { - if ((isVertical && VerticalAlignment == VerticalTextAlignment.Justified) || (!isVertical && Alignment == TextAlignment.Justified)) + if ((isVertical && VerticalAlignment == Justification.Justified) || (!isVertical && Alignment == Justification.Justified)) { CursorPosition = idx - start; } @@ -699,7 +699,7 @@ public class TextFormatter _lines = Format ( text, Size.Height, - VerticalAlignment == VerticalTextAlignment.Justified, + VerticalAlignment == Justification.Justified, Size.Width > colsWidth && WordWrap, PreserveTrailingSpaces, TabWidth, @@ -723,7 +723,7 @@ public class TextFormatter _lines = Format ( text, Size.Width, - Alignment == TextAlignment.Justified, + Alignment == Justification.Justified, Size.Height > 1 && WordWrap, PreserveTrailingSpaces, TabWidth, @@ -1031,7 +1031,7 @@ public class TextFormatter List runes = StripCRLF (text).ToRuneList (); int start = Math.Max ( - !runes.Contains ((Rune)' ') && textFormatter is { VerticalAlignment: VerticalTextAlignment.Bottom } && IsVerticalDirection (textDirection) + !runes.Contains ((Rune)' ') && textFormatter is { VerticalAlignment: Justification.Bottom } && IsVerticalDirection (textDirection) ? runes.Count - width : 0, 0); @@ -1257,13 +1257,13 @@ public class TextFormatter public static string ClipAndJustify ( string text, int width, - TextAlignment talign, + Justification talign, TextDirection textDirection = TextDirection.LeftRight_TopBottom, int tabWidth = 0, TextFormatter textFormatter = null ) { - return ClipAndJustify (text, width, talign == TextAlignment.Justified, textDirection, tabWidth, textFormatter); + return ClipAndJustify (text, width, talign == Justification.Justified, textDirection, tabWidth, textFormatter); } /// Justifies text within a specified width. @@ -1304,12 +1304,12 @@ public class TextFormatter { if (IsHorizontalDirection (textDirection)) { - if (textFormatter is { Alignment: TextAlignment.Right }) + if (textFormatter is { Alignment: Justification.Right }) { return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection); } - if (textFormatter is { Alignment: TextAlignment.Centered }) + if (textFormatter is { Alignment: Justification.Centered }) { return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection); } @@ -1319,12 +1319,12 @@ public class TextFormatter if (IsVerticalDirection (textDirection)) { - if (textFormatter is { VerticalAlignment: VerticalTextAlignment.Bottom }) + if (textFormatter is { VerticalAlignment: Justification.Bottom }) { return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection); } - if (textFormatter is { VerticalAlignment: VerticalTextAlignment.Middle }) + if (textFormatter is { VerticalAlignment: Justification.Centered }) { return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection); } @@ -1342,14 +1342,14 @@ public class TextFormatter if (IsHorizontalDirection (textDirection)) { - if (textFormatter is { Alignment: TextAlignment.Right }) + if (textFormatter is { Alignment: Justification.Right }) { if (GetRuneWidth (text, tabWidth, textDirection) > width) { return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection); } } - else if (textFormatter is { Alignment: TextAlignment.Centered }) + else if (textFormatter is { Alignment: Justification.Centered }) { return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection); } @@ -1361,14 +1361,14 @@ public class TextFormatter if (IsVerticalDirection (textDirection)) { - if (textFormatter is { VerticalAlignment: VerticalTextAlignment.Bottom }) + if (textFormatter is { VerticalAlignment: Justification.Bottom }) { if (runes.Count - zeroLength > width) { return GetRangeThatFits (runes, runes.Count - width, text, width, tabWidth, textDirection); } } - else if (textFormatter is { VerticalAlignment: VerticalTextAlignment.Middle }) + else if (textFormatter is { VerticalAlignment: Justification.Centered }) { return GetRangeThatFits (runes, Math.Max ((runes.Count - width) / 2, 0), text, width, tabWidth, textDirection); } @@ -1498,7 +1498,7 @@ public class TextFormatter public static List Format ( string text, int width, - TextAlignment talign, + Justification talign, bool wordWrap, bool preserveTrailingSpaces = false, int tabWidth = 0, @@ -1510,7 +1510,7 @@ public class TextFormatter return Format ( text, width, - talign == TextAlignment.Justified, + talign == Justification.Justified, wordWrap, preserveTrailingSpaces, tabWidth, diff --git a/Terminal.Gui/Text/VerticalTextAlignment.cs b/Terminal.Gui/Text/VerticalTextAlignment.cs deleted file mode 100644 index ef7788577..000000000 --- a/Terminal.Gui/Text/VerticalTextAlignment.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace Terminal.Gui; - -/// Vertical text alignment enumeration, controls how text is displayed. -public enum VerticalTextAlignment -{ - /// The text will be top-aligned. - Top, - - /// The text will be bottom-aligned. - Bottom, - - /// The text will centered vertically. - Middle, - - /// - /// The text will be justified (spaces will be added to existing spaces such that the text fills the container - /// vertically). - /// - Justified -} \ No newline at end of file diff --git a/Terminal.Gui/View/ViewText.cs b/Terminal.Gui/View/ViewText.cs index 63ad748c7..19f534ad5 100644 --- a/Terminal.Gui/View/ViewText.cs +++ b/Terminal.Gui/View/ViewText.cs @@ -34,7 +34,7 @@ public partial class View /// /// /// The text will be drawn starting at the view origin (0, 0) and will be formatted according - /// to and . + /// to and . /// /// /// The text will word-wrap to additional lines if it does not fit horizontally. If 's height @@ -87,7 +87,7 @@ public partial class View /// or are using , the will be adjusted to fit the text. /// /// The text alignment. - public virtual TextAlignment TextAlignment + public virtual Justification Justification { get => TextFormatter.Alignment; set @@ -130,7 +130,7 @@ public partial class View /// or are using , the will be adjusted to fit the text. /// /// The text alignment. - public virtual VerticalTextAlignment VerticalTextAlignment + public virtual Justification VerticalJustification { get => TextFormatter.VerticalAlignment; set diff --git a/Terminal.Gui/Views/Button.cs b/Terminal.Gui/Views/Button.cs index 8f0fb55c1..3530b42f6 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 () { - TextAlignment = TextAlignment.Centered; - VerticalTextAlignment = VerticalTextAlignment.Middle; + Justification = Justification.Centered; + VerticalJustification = Justification.Centered; _leftBracket = Glyphs.LeftBracket; _rightBracket = Glyphs.RightBracket; diff --git a/Terminal.Gui/Views/CheckBox.cs b/Terminal.Gui/Views/CheckBox.cs index 0535f5f43..e97e3ca10 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 (TextAlignment) + switch (Justification) { - case TextAlignment.Left: - case TextAlignment.Centered: - case TextAlignment.Justified: + case Justification.Left: + case Justification.Centered: + case Justification.Justified: TextFormatter.Text = $"{GetCheckedState ()} {GetFormatterText ()}"; break; - case TextAlignment.Right: + case Justification.Right: TextFormatter.Text = $"{GetFormatterText ()} {GetCheckedState ()}"; break; diff --git a/Terminal.Gui/Views/ListView.cs b/Terminal.Gui/Views/ListView.cs index b91ede6cb..77439ee8e 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, TextAlignment.Left); + string u = TextFormatter.ClipAndJustify (str, width, Justification.Left); driver.AddStr (u); width -= u.GetColumns (); diff --git a/Terminal.Gui/Views/Menu/Menu.cs b/Terminal.Gui/Views/Menu/Menu.cs index 6d0353f9b..1d6a92de6 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, - Alignment = TextAlignment.Centered, HotKeySpecifier = MenuBar.HotKeySpecifier, Text = textToDraw + Alignment = Justification.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 03942953e..da7342794 100644 --- a/Terminal.Gui/Views/MessageBox.cs +++ b/Terminal.Gui/Views/MessageBox.cs @@ -374,7 +374,7 @@ public static class MessageBox var messageLabel = new Label { Text = message, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, X = Pos.Center (), Y = 0 }; diff --git a/Terminal.Gui/Views/ProgressBar.cs b/Terminal.Gui/Views/ProgressBar.cs index fed490d69..47c520db9 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 { Alignment = TextAlignment.Centered, Text = Text }; + var tf = new TextFormatter { Alignment = Justification.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 4a1c0ac57..4a904419f 100644 --- a/Terminal.Gui/Views/Slider.cs +++ b/Terminal.Gui/Views/Slider.cs @@ -930,7 +930,7 @@ public class Slider : View } } - private string AlignText (string text, int width, TextAlignment textAlignment) + private string AlignText (string text, int width, Justification Justification) { if (text is null) { @@ -947,20 +947,20 @@ public class Slider : View string s2 = new (' ', w % 2); // Note: The formatter doesn't handle all of this ??? - switch (textAlignment) + switch (Justification) { - case TextAlignment.Justified: + case Justification.Justified: return TextFormatter.Justify (text, width); - case TextAlignment.Left: + case Justification.Left: return text + s1 + s1 + s2; - case TextAlignment.Centered: + case Justification.Centered: if (text.Length % 2 != 0) { return s1 + text + s1 + s2; } return s1 + s2 + text + s1; - case TextAlignment.Right: + case Justification.Right: return s1 + s1 + s2 + text; default: return text; @@ -1293,7 +1293,7 @@ public class Slider : View switch (_config._legendsOrientation) { case Orientation.Horizontal: - text = AlignText (text, _config._innerSpacing + 1, TextAlignment.Centered); + text = AlignText (text, _config._innerSpacing + 1, Justification.Centered); break; case Orientation.Vertical: @@ -1311,7 +1311,7 @@ public class Slider : View break; case Orientation.Vertical: - text = AlignText (text, _config._innerSpacing + 1, TextAlignment.Centered); + text = AlignText (text, _config._innerSpacing + 1, Justification.Centered); break; } diff --git a/Terminal.Gui/Views/TableView/ColumnStyle.cs b/Terminal.Gui/Views/TableView/ColumnStyle.cs index cbbc2a3ac..2490d66f6 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 alignment per cell based on cell values. When specified this will /// override /// - public Func AlignmentGetter; + public Func AlignmentGetter; /// /// 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 alignment for all values rendered in this column. For custom alignment based on cell /// contents use . /// - public TextAlignment Alignment { get; set; } + public Justification Alignment { 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 TextAlignment GetAlignment (object cellValue) + public Justification GetAlignment (object cellValue) { if (AlignmentGetter is { }) { diff --git a/Terminal.Gui/Views/TableView/TableView.cs b/Terminal.Gui/Views/TableView/TableView.cs index 2ae46c7fd..190fef041 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?.GetAlignment (originalCellValue) ?? TextAlignment.Left) + switch (colStyle?.GetAlignment (originalCellValue) ?? Justification.Left) { - case TextAlignment.Left: + case Justification.Left: return representation + new string (' ', toPad); - case TextAlignment.Right: + case Justification.Right: return new string (' ', toPad) + representation; // TODO: With single line cells, centered and justified are the same right? - case TextAlignment.Centered: - case TextAlignment.Justified: + case Justification.Centered: + case Justification.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 a51e55e54..f2d4cc1bf 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 && TextAlignment == TextAlignment.Right && Text.Length > 0) + if (_provider.Fixed == false && Justification == Justification.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 && TextAlignment == TextAlignment.Right) + if (_provider?.Fixed == false && Justification == Justification.Right) { curPos = _cursorPosition + left - 1; } @@ -650,7 +650,7 @@ namespace Terminal.Gui /// private bool BackspaceKeyHandler () { - if (_provider.Fixed == false && TextAlignment == TextAlignment.Right && _cursorPosition <= 1) + if (_provider.Fixed == false && Justification == Justification.Right && _cursorPosition <= 1) { return false; } @@ -688,7 +688,7 @@ namespace Terminal.Gui /// private bool DeleteKeyHandler () { - if (_provider.Fixed == false && TextAlignment == TextAlignment.Right) + if (_provider.Fixed == false && Justification == Justification.Right) { _cursorPosition = _provider.CursorLeft (_cursorPosition); } @@ -717,13 +717,13 @@ namespace Terminal.Gui int count = Text.Length; int total = width - count; - switch (TextAlignment) + switch (Justification) { - case TextAlignment.Left: + case Justification.Left: return (0, total); - case TextAlignment.Centered: + case Justification.Centered: return (total / 2, total / 2 + total % 2); - case TextAlignment.Right: + case Justification.Right: return (total, 0); default: return (0, total); diff --git a/Terminal.Gui/Views/TextView.cs b/Terminal.Gui/Views/TextView.cs index f7a095dd7..47ecca855 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, - TextAlignment.Left, + Justification.Left, true, preserveTrailingSpaces, tabWidth diff --git a/UICatalog/Scenarios/BasicColors.cs b/UICatalog/Scenarios/BasicColors.cs index 1780d7cbb..08a3c642d 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, - VerticalTextAlignment = VerticalTextAlignment.Bottom, + VerticalJustification = Justification.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, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, ColorScheme = new ColorScheme { Normal = attr }, Text = bg.ToString () }; diff --git a/UICatalog/Scenarios/Buttons.cs b/UICatalog/Scenarios/Buttons.cs index 9b4ed97fc..57d7ba179 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.TextAlignment = TextAlignment.Left; - sizeBtn.TextAlignment = TextAlignment.Left; - moveBtnA.TextAlignment = TextAlignment.Left; - sizeBtnA.TextAlignment = TextAlignment.Left; - moveHotKeyBtn.TextAlignment = TextAlignment.Left; - moveUnicodeHotKeyBtn.TextAlignment = TextAlignment.Left; + moveBtn.Justification = Justification.Left; + sizeBtn.Justification = Justification.Left; + moveBtnA.Justification = Justification.Left; + sizeBtnA.Justification = Justification.Left; + moveHotKeyBtn.Justification = Justification.Left; + moveUnicodeHotKeyBtn.Justification = Justification.Left; break; case 1: - moveBtn.TextAlignment = TextAlignment.Right; - sizeBtn.TextAlignment = TextAlignment.Right; - moveBtnA.TextAlignment = TextAlignment.Right; - sizeBtnA.TextAlignment = TextAlignment.Right; - moveHotKeyBtn.TextAlignment = TextAlignment.Right; - moveUnicodeHotKeyBtn.TextAlignment = TextAlignment.Right; + moveBtn.Justification = Justification.Right; + sizeBtn.Justification = Justification.Right; + moveBtnA.Justification = Justification.Right; + sizeBtnA.Justification = Justification.Right; + moveHotKeyBtn.Justification = Justification.Right; + moveUnicodeHotKeyBtn.Justification = Justification.Right; break; case 2: - moveBtn.TextAlignment = TextAlignment.Centered; - sizeBtn.TextAlignment = TextAlignment.Centered; - moveBtnA.TextAlignment = TextAlignment.Centered; - sizeBtnA.TextAlignment = TextAlignment.Centered; - moveHotKeyBtn.TextAlignment = TextAlignment.Centered; - moveUnicodeHotKeyBtn.TextAlignment = TextAlignment.Centered; + moveBtn.Justification = Justification.Centered; + sizeBtn.Justification = Justification.Centered; + moveBtnA.Justification = Justification.Centered; + sizeBtnA.Justification = Justification.Centered; + moveHotKeyBtn.Justification = Justification.Centered; + moveUnicodeHotKeyBtn.Justification = Justification.Centered; break; case 3: - moveBtn.TextAlignment = TextAlignment.Justified; - sizeBtn.TextAlignment = TextAlignment.Justified; - moveBtnA.TextAlignment = TextAlignment.Justified; - sizeBtnA.TextAlignment = TextAlignment.Justified; - moveHotKeyBtn.TextAlignment = TextAlignment.Justified; - moveUnicodeHotKeyBtn.TextAlignment = TextAlignment.Justified; + moveBtn.Justification = Justification.Justified; + sizeBtn.Justification = Justification.Justified; + moveBtnA.Justification = Justification.Justified; + sizeBtnA.Justification = Justification.Justified; + moveHotKeyBtn.Justification = Justification.Justified; + moveUnicodeHotKeyBtn.Justification = Justification.Justified; break; } @@ -439,7 +439,7 @@ public class Buttons : Scenario Y = Pos.Top (_down), Width = Dim.Function (() => Digits), Height = 1, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, CanFocus = true }; diff --git a/UICatalog/Scenarios/CharacterMap.cs b/UICatalog/Scenarios/CharacterMap.cs index a3aa100a8..c8d62b716 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), - TextAlignment = TextAlignment.Centered + Justification = Justification.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 ef31ac6a7..480e5f65f 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", - TextAlignment = TextAlignment.Centered, + Justification = Justification.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", - TextAlignment = TextAlignment.Centered, + Justification = Justification.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 fe2b08fad..cf2b7512e 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", - TextAlignment = TextAlignment.Centered, - VerticalTextAlignment = VerticalTextAlignment.Middle, + Justification = Justification.Centered, + VerticalJustification = Justification.Centered, BorderStyle = LineStyle.Heavy, X = Pos.Center (), Y = Pos.Center (), diff --git a/UICatalog/Scenarios/ComputedLayout.cs b/UICatalog/Scenarios/ComputedLayout.cs index a65050f52..f88056843 100644 --- a/UICatalog/Scenarios/ComputedLayout.cs +++ b/UICatalog/Scenarios/ComputedLayout.cs @@ -91,7 +91,7 @@ public class ComputedLayout : Scenario labelList.Add ( new Label { - TextAlignment = TextAlignment.Left, + Justification = Justification.Left, Width = Dim.Fill (), X = 0, Y = Pos.Bottom (labelList.LastOrDefault ()), @@ -103,7 +103,7 @@ public class ComputedLayout : Scenario labelList.Add ( new Label { - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Width = Dim.Fill (), X = 0, Y = Pos.Bottom (labelList.LastOrDefault ()), @@ -115,7 +115,7 @@ public class ComputedLayout : Scenario labelList.Add ( new Label { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = Dim.Fill (), X = 0, Y = Pos.Bottom (labelList.LastOrDefault ()), @@ -127,7 +127,7 @@ public class ComputedLayout : Scenario labelList.Add ( new Label { - TextAlignment = TextAlignment.Justified, + Justification = Justification.Justified, Width = Dim.Fill (), X = 0, Y = Pos.Bottom (labelList.LastOrDefault ()), @@ -153,7 +153,7 @@ public class ComputedLayout : Scenario labelList.Add ( new Label { - TextAlignment = TextAlignment.Left, + Justification = Justification.Left, Width = Dim.Fill (), X = 0, Y = Pos.Bottom (labelList.LastOrDefault ()), @@ -165,7 +165,7 @@ public class ComputedLayout : Scenario labelList.Add ( new Label { - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Width = Dim.Fill (), X = 0, Y = Pos.Bottom (labelList.LastOrDefault ()), @@ -177,7 +177,7 @@ public class ComputedLayout : Scenario labelList.Add ( new Label { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = Dim.Fill (), X = 0, Y = Pos.Bottom (labelList.LastOrDefault ()), @@ -189,7 +189,7 @@ public class ComputedLayout : Scenario labelList.Add ( new Label { - TextAlignment = TextAlignment.Justified, + Justification = Justification.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)).", - TextAlignment = TextAlignment.Centered, + Justification = Justification.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).", - TextAlignment = TextAlignment.Left, + Justification = Justification.Left, ColorScheme = Colors.ColorSchemes ["Menu"], Width = Dim.Fill (5), X = 5, diff --git a/UICatalog/Scenarios/CsvEditor.cs b/UICatalog/Scenarios/CsvEditor.cs index 4279594ab..e7b48e464 100644 --- a/UICatalog/Scenarios/CsvEditor.cs +++ b/UICatalog/Scenarios/CsvEditor.cs @@ -78,17 +78,17 @@ public class CsvEditor : Scenario _miLeft = new MenuItem ( "_Align Left", "", - () => Align (TextAlignment.Left) + () => Align (Justification.Left) ), _miRight = new MenuItem ( "_Align Right", "", - () => Align (TextAlignment.Right) + () => Align (Justification.Right) ), _miCentered = new MenuItem ( "_Align Centered", "", - () => Align (TextAlignment.Centered) + () => Align (Justification.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 (), - TextAlignment = TextAlignment.Right + Justification = Justification.Right }; _selectedCellLabel.TextChanged += SelectedCellLabel_TextChanged; @@ -218,7 +218,7 @@ public class CsvEditor : Scenario _tableView.Update (); } - private void Align (TextAlignment newAlignment) + private void Align (Justification newAlignment) { if (NoTableLoaded ()) { @@ -228,9 +228,9 @@ public class CsvEditor : Scenario ColumnStyle style = _tableView.Style.GetOrCreateColumnStyle (_tableView.SelectedColumn); style.Alignment = newAlignment; - _miLeft.Checked = style.Alignment == TextAlignment.Left; - _miRight.Checked = style.Alignment == TextAlignment.Right; - _miCentered.Checked = style.Alignment == TextAlignment.Centered; + _miLeft.Checked = style.Alignment == Justification.Left; + _miRight.Checked = style.Alignment == Justification.Right; + _miCentered.Checked = style.Alignment == Justification.Centered; _tableView.Update (); } @@ -437,9 +437,9 @@ public class CsvEditor : Scenario ColumnStyle style = _tableView.Style.GetColumnStyleIfAny (_tableView.SelectedColumn); - _miLeft.Checked = style?.Alignment == TextAlignment.Left; - _miRight.Checked = style?.Alignment == TextAlignment.Right; - _miCentered.Checked = style?.Alignment == TextAlignment.Centered; + _miLeft.Checked = style?.Alignment == Justification.Left; + _miRight.Checked = style?.Alignment == Justification.Right; + _miCentered.Checked = style?.Alignment == Justification.Centered; } private void Open () diff --git a/UICatalog/Scenarios/Dialogs.cs b/UICatalog/Scenarios/Dialogs.cs index 6a16ef5aa..8b21b066d 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, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "_Number of Buttons:" }; @@ -28,7 +28,7 @@ public class Dialogs : Scenario Y = 0, Width = Dim.Width (numButtonsLabel), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "_Width:" }; frame.Add (label); @@ -49,7 +49,7 @@ public class Dialogs : Scenario Y = Pos.Bottom (label), Width = Dim.Width (numButtonsLabel), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "_Height:" }; frame.Add (label); @@ -83,7 +83,7 @@ public class Dialogs : Scenario Y = Pos.Bottom (label), Width = Dim.Width (numButtonsLabel), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "_Title:" }; frame.Add (label); @@ -115,7 +115,7 @@ public class Dialogs : Scenario { X = Pos.Right (numButtonsLabel) + 1, Y = Pos.Bottom (numButtonsLabel), - TextAlignment = TextAlignment.Right, + Justification = Justification.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, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Button St_yle:" }; frame.Add (label); @@ -175,7 +175,7 @@ public class Dialogs : Scenario label = new() { - X = Pos.Center (), Y = Pos.Bottom (frame) + 4, TextAlignment = TextAlignment.Right, Text = "Button Pressed:" + X = Pos.Center (), Y = Pos.Bottom (frame) + 4, Justification = Justification.Right, Text = "Button Pressed:" }; Win.Add (label); diff --git a/UICatalog/Scenarios/DynamicMenuBar.cs b/UICatalog/Scenarios/DynamicMenuBar.cs index da0768f4f..38445a1aa 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"], - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, X = Pos.Right (_btnPrevious) + 1, Y = Pos.Top (_btnPrevious), @@ -636,7 +636,7 @@ public class DynamicMenuBar : Scenario var _lblParent = new Label { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, X = Pos.Right (_btnPrevious) + 1, Y = Pos.Top (_btnPrevious) + 1, diff --git a/UICatalog/Scenarios/Editor.cs b/UICatalog/Scenarios/Editor.cs index 301b1b168..18bcf11bb 100644 --- a/UICatalog/Scenarios/Editor.cs +++ b/UICatalog/Scenarios/Editor.cs @@ -882,7 +882,7 @@ public class Editor : Scenario { Y = 1, Width = lblWidth, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Find:" }; @@ -903,7 +903,7 @@ public class Editor : Scenario Y = Pos.Top (label), Width = 20, Enabled = !string.IsNullOrEmpty (txtToFind.Text), - TextAlignment = TextAlignment.Centered, + Justification = Justification.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), - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Text = "Find _Previous" }; @@ -937,7 +937,7 @@ public class Editor : Scenario X = Pos.Right (txtToFind) + 1, Y = Pos.Top (btnFindPrevious) + 2, Width = 20, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Text = "Cancel" }; @@ -1134,7 +1134,7 @@ public class Editor : Scenario { Y = 1, Width = lblWidth, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Find:" }; @@ -1155,7 +1155,7 @@ public class Editor : Scenario Y = Pos.Top (label), Width = 20, Enabled = !string.IsNullOrEmpty (txtToFind.Text), - TextAlignment = TextAlignment.Centered, + Justification = Justification.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), - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Text = "Replace _Previous" }; @@ -1194,7 +1194,7 @@ public class Editor : Scenario Y = Pos.Top (btnFindPrevious) + 1, Width = 20, Enabled = !string.IsNullOrEmpty (txtToFind.Text), - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Text = "Replace _All" }; @@ -1215,7 +1215,7 @@ public class Editor : Scenario X = Pos.Right (txtToFind) + 1, Y = Pos.Top (btnReplaceAll) + 1, Width = 20, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Text = "Cancel" }; diff --git a/UICatalog/Scenarios/ListColumns.cs b/UICatalog/Scenarios/ListColumns.cs index ea093b769..bbbabb0a2 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 (), - TextAlignment = TextAlignment.Right + Justification = Justification.Right }; Win.Add (selectedCellLabel); diff --git a/UICatalog/Scenarios/MessageBoxes.cs b/UICatalog/Scenarios/MessageBoxes.cs index df5a54050..33bf34610 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, TextAlignment = TextAlignment.Right, Text = "Width:" }; + var label = new Label { X = 0, Y = 0, Justification = Justification.Right, Text = "Width:" }; frame.Add (label); var widthEdit = new TextField @@ -34,7 +34,7 @@ public class MessageBoxes : Scenario Width = Dim.Width (label), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Height:" }; frame.Add (label); @@ -69,7 +69,7 @@ public class MessageBoxes : Scenario Width = Dim.Width (label), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Title:" }; frame.Add (label); @@ -91,7 +91,7 @@ public class MessageBoxes : Scenario Width = Dim.Width (label), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Message:" }; frame.Add (label); @@ -113,7 +113,7 @@ public class MessageBoxes : Scenario Width = Dim.Width (label), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Num Buttons:" }; frame.Add (label); @@ -135,7 +135,7 @@ public class MessageBoxes : Scenario Width = Dim.Width (label), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Default Button:" }; frame.Add (label); @@ -157,7 +157,7 @@ public class MessageBoxes : Scenario Width = Dim.Width (label), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Style:" }; frame.Add (label); @@ -195,7 +195,7 @@ public class MessageBoxes : Scenario label = new() { - X = Pos.Center (), Y = Pos.Bottom (frame) + 2, TextAlignment = TextAlignment.Right, Text = "Button Pressed:" + X = Pos.Center (), Y = Pos.Bottom (frame) + 2, Justification = Justification.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"], - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Text = " " }; diff --git a/UICatalog/Scenarios/Mouse.cs b/UICatalog/Scenarios/Mouse.cs index 0e55dbd8f..005bbb360 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", - TextAlignment = TextAlignment.Centered, - VerticalTextAlignment = VerticalTextAlignment.Middle, + Justification = Justification.Centered, + VerticalJustification = Justification.Centered, ColorScheme = Colors.ColorSchemes ["Dialog"] }; win.Add (demo); diff --git a/UICatalog/Scenarios/TableEditor.cs b/UICatalog/Scenarios/TableEditor.cs index b73fa19d2..3c5f8e38d 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 (), - TextAlignment = TextAlignment.Right + Justification = Justification.Right }; Win.Add (selectedCellLabel); @@ -1107,12 +1107,12 @@ public class TableEditor : Scenario { _tableView.Style.ColumnStyles.Clear (); - var alignMid = new ColumnStyle { Alignment = TextAlignment.Centered }; - var alignRight = new ColumnStyle { Alignment = TextAlignment.Right }; + var alignMid = new ColumnStyle { Alignment = Justification.Centered }; + var alignRight = new ColumnStyle { Alignment = Justification.Right }; var dateFormatStyle = new ColumnStyle { - Alignment = TextAlignment.Right, + Alignment = Justification.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 - ? TextAlignment.Right + ? Justification.Right : // align positive values left - TextAlignment.Left + Justification.Left : // not a double - TextAlignment.Left, + Justification.Left, ColorGetter = a => a.CellValue is double d ? diff --git a/UICatalog/Scenarios/Text.cs b/UICatalog/Scenarios/Text.cs index 19dddd847..7b0e82910 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, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Provider = provider2 }; Win.Add (regexProviderField); diff --git a/UICatalog/Scenarios/TextAlignments.cs b/UICatalog/Scenarios/TextAlignments.cs index 92ee344e1..9897d7dcc 100644 --- a/UICatalog/Scenarios/TextAlignments.cs +++ b/UICatalog/Scenarios/TextAlignments.cs @@ -18,17 +18,17 @@ public class TextAlignments : Scenario var txt = "Hello world, how are you today? Pretty neat!"; var unicodeSampleText = "A Unicode sentence (пÑРвеÑ) has words."; - List alignments = Enum.GetValues (typeof (TextAlignment)).Cast ().ToList (); + List alignments = Enum.GetValues (typeof (Justification)).Cast ().ToList (); Label [] singleLines = new Label [alignments.Count]; Label [] multipleLines = new Label [alignments.Count]; var multiLineHeight = 5; - foreach (TextAlignment alignment in alignments) + foreach (Justification alignment in alignments) { singleLines [(int)alignment] = new() { - TextAlignment = alignment, + Justification = alignment, X = 1, Width = Dim.Fill (1), @@ -39,7 +39,7 @@ public class TextAlignments : Scenario multipleLines [(int)alignment] = new() { - TextAlignment = alignment, + Justification = alignment, X = 1, Width = Dim.Fill (1), @@ -65,7 +65,7 @@ public class TextAlignments : Scenario edit.TextChanged += (s, e) => { - foreach (TextAlignment alignment in alignments) + foreach (Justification alignment in alignments) { singleLines [(int)alignment].Text = edit.Text; multipleLines [(int)alignment].Text = edit.Text; @@ -81,7 +81,7 @@ public class TextAlignments : Scenario update.Accept += (s, e) => { - foreach (TextAlignment alignment in alignments) + foreach (Justification alignment in alignments) { singleLines [(int)alignment].Text = edit.Text; multipleLines [(int)alignment].Text = edit.Text; @@ -102,7 +102,7 @@ public class TextAlignments : Scenario }; Win.Add (label); - foreach (TextAlignment alignment in alignments) + foreach (Justification alignment in alignments) { label = new() { Y = Pos.Bottom (label), Text = $"{alignment}:" }; Win.Add (label); @@ -115,7 +115,7 @@ public class TextAlignments : Scenario label = new() { Y = Pos.Bottom (label), Text = "Demonstrating multi-line and word wrap:" }; Win.Add (label); - foreach (TextAlignment alignment in alignments) + foreach (Justification alignment in alignments) { label = new() { Y = Pos.Bottom (label), Text = $"{alignment}:" }; Win.Add (label); @@ -126,7 +126,7 @@ public class TextAlignments : Scenario enableHotKeyCheckBox.Toggled += (s, e) => { - foreach (TextAlignment alignment in alignments) + foreach (Justification alignment in alignments) { singleLines [(int)alignment].HotKeySpecifier = e.OldValue == true ? (Rune)0xffff : (Rune)'_'; diff --git a/UICatalog/Scenarios/TextAlignmentsAndDirection.cs b/UICatalog/Scenarios/TextAlignmentsAndDirection.cs index 1f70f7d7a..f55bec96a 100644 --- a/UICatalog/Scenarios/TextAlignmentsAndDirection.cs +++ b/UICatalog/Scenarios/TextAlignmentsAndDirection.cs @@ -35,7 +35,7 @@ public class TextAlignmentsAndDirections : Scenario Y = 1, Width = 9, Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, ColorScheme = Colors.ColorSchemes ["Dialog"], Text = "Left" }; @@ -46,7 +46,7 @@ public class TextAlignmentsAndDirections : Scenario Y = 2, Width = 9, Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, ColorScheme = Colors.ColorSchemes ["Dialog"], Text = "Centered" }; @@ -57,7 +57,7 @@ public class TextAlignmentsAndDirections : Scenario Y = 3, Width = 9, Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, ColorScheme = Colors.ColorSchemes ["Dialog"], Text = "Right" }; @@ -68,7 +68,7 @@ public class TextAlignmentsAndDirections : Scenario Y = 4, Width = 9, Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, ColorScheme = Colors.ColorSchemes ["Dialog"], Text = "Justified" }; @@ -80,7 +80,7 @@ public class TextAlignmentsAndDirections : Scenario Width = Dim.Fill (1) - 9, Height = 1, ColorScheme = color1, - TextAlignment = TextAlignment.Left, + Justification = Justification.Left, Text = txt }; @@ -91,7 +91,7 @@ public class TextAlignmentsAndDirections : Scenario Width = Dim.Fill (1) - 9, Height = 1, ColorScheme = color2, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Text = txt }; @@ -102,7 +102,7 @@ public class TextAlignmentsAndDirections : Scenario Width = Dim.Fill (1) - 9, Height = 1, ColorScheme = color1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = txt }; @@ -113,7 +113,7 @@ public class TextAlignmentsAndDirections : Scenario Width = Dim.Fill (1) - 9, Height = 1, ColorScheme = color2, - TextAlignment = TextAlignment.Justified, + Justification = Justification.Justified, Text = txt }; @@ -141,7 +141,7 @@ public class TextAlignmentsAndDirections : Scenario Height = 9, ColorScheme = color1, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Bottom, + VerticalJustification = Justification.Bottom, Text = "Top" }; labelVT.TextFormatter.WordWrap = false; @@ -154,8 +154,8 @@ public class TextAlignmentsAndDirections : Scenario Height = 9, ColorScheme = color1, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Bottom, - Text = "Middle" + VerticalJustification = Justification.Bottom, + Text = "Centered" }; labelVM.TextFormatter.WordWrap = false; @@ -167,7 +167,7 @@ public class TextAlignmentsAndDirections : Scenario Height = 9, ColorScheme = color1, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Bottom, + VerticalJustification = Justification.Bottom, Text = "Bottom" }; labelVB.TextFormatter.WordWrap = false; @@ -180,7 +180,7 @@ public class TextAlignmentsAndDirections : Scenario Height = 9, ColorScheme = color1, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Bottom, + VerticalJustification = Justification.Bottom, Text = "Justified" }; labelVJ.TextFormatter.WordWrap = false; @@ -193,7 +193,7 @@ public class TextAlignmentsAndDirections : Scenario Height = Dim.Fill (1), ColorScheme = color1, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Top, + VerticalJustification = Justification.Top, Text = txt }; txtLabelVT.TextFormatter.WordWrap = false; @@ -206,7 +206,7 @@ public class TextAlignmentsAndDirections : Scenario Height = Dim.Fill (1), ColorScheme = color2, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Middle, + VerticalJustification = Justification.Centered, Text = txt }; txtLabelVM.TextFormatter.WordWrap = false; @@ -219,7 +219,7 @@ public class TextAlignmentsAndDirections : Scenario Height = Dim.Fill (1), ColorScheme = color1, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Bottom, + VerticalJustification = Justification.Bottom, Text = txt }; txtLabelVB.TextFormatter.WordWrap = false; @@ -232,7 +232,7 @@ public class TextAlignmentsAndDirections : Scenario Height = Dim.Fill (1), ColorScheme = color2, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Justified, + VerticalJustification = Justification.Justified, Text = txt }; txtLabelVJ.TextFormatter.WordWrap = false; @@ -268,8 +268,8 @@ public class TextAlignmentsAndDirections : Scenario Y = 1, Width = Dim.Percent (100f / 3f), Height = Dim.Percent (100f / 3f), - TextAlignment = TextAlignment.Left, - VerticalTextAlignment = VerticalTextAlignment.Top, + Justification = Justification.Left, + VerticalJustification = Justification.Top, ColorScheme = color1, Text = txt }; @@ -281,8 +281,8 @@ public class TextAlignmentsAndDirections : Scenario Y = 1, Width = Dim.Percent (100f / 3f), Height = Dim.Percent (100f / 3f), - TextAlignment = TextAlignment.Centered, - VerticalTextAlignment = VerticalTextAlignment.Top, + Justification = Justification.Centered, + VerticalJustification = Justification.Top, ColorScheme = color1, Text = txt }; @@ -294,8 +294,8 @@ public class TextAlignmentsAndDirections : Scenario Y = 1, Width = Dim.Percent (100f, true), Height = Dim.Percent (100f / 3f), - TextAlignment = TextAlignment.Right, - VerticalTextAlignment = VerticalTextAlignment.Top, + Justification = Justification.Right, + VerticalJustification = Justification.Top, ColorScheme = color1, Text = txt }; @@ -307,8 +307,8 @@ public class TextAlignmentsAndDirections : Scenario Y = Pos.Bottom (txtLabelTL) + 1, Width = Dim.Width (txtLabelTL), Height = Dim.Percent (100f / 3f), - TextAlignment = TextAlignment.Left, - VerticalTextAlignment = VerticalTextAlignment.Middle, + Justification = Justification.Left, + VerticalJustification = Justification.Centered, ColorScheme = color1, Text = txt }; @@ -320,8 +320,8 @@ public class TextAlignmentsAndDirections : Scenario Y = Pos.Bottom (txtLabelTC) + 1, Width = Dim.Width (txtLabelTC), Height = Dim.Percent (100f / 3f), - TextAlignment = TextAlignment.Centered, - VerticalTextAlignment = VerticalTextAlignment.Middle, + Justification = Justification.Centered, + VerticalJustification = Justification.Centered, ColorScheme = color1, Text = txt }; @@ -333,8 +333,8 @@ public class TextAlignmentsAndDirections : Scenario Y = Pos.Bottom (txtLabelTR) + 1, Width = Dim.Percent (100f, true), Height = Dim.Percent (100f / 3f), - TextAlignment = TextAlignment.Right, - VerticalTextAlignment = VerticalTextAlignment.Middle, + Justification = Justification.Right, + VerticalJustification = Justification.Centered, ColorScheme = color1, Text = txt }; @@ -346,8 +346,8 @@ public class TextAlignmentsAndDirections : Scenario Y = Pos.Bottom (txtLabelML) + 1, Width = Dim.Width (txtLabelML), Height = Dim.Percent (100f, true), - TextAlignment = TextAlignment.Left, - VerticalTextAlignment = VerticalTextAlignment.Bottom, + Justification = Justification.Left, + VerticalJustification = Justification.Bottom, ColorScheme = color1, Text = txt }; @@ -359,8 +359,8 @@ public class TextAlignmentsAndDirections : Scenario Y = Pos.Bottom (txtLabelMC) + 1, Width = Dim.Width (txtLabelMC), Height = Dim.Percent (100f, true), - TextAlignment = TextAlignment.Centered, - VerticalTextAlignment = VerticalTextAlignment.Bottom, + Justification = Justification.Centered, + VerticalJustification = Justification.Bottom, ColorScheme = color1, Text = txt }; @@ -372,8 +372,8 @@ public class TextAlignmentsAndDirections : Scenario Y = Pos.Bottom (txtLabelMR) + 1, Width = Dim.Percent (100f, true), Height = Dim.Percent (100f, true), - TextAlignment = TextAlignment.Right, - VerticalTextAlignment = VerticalTextAlignment.Bottom, + Justification = Justification.Right, + VerticalJustification = Justification.Bottom, ColorScheme = color1, Text = txt }; @@ -392,7 +392,7 @@ public class TextAlignmentsAndDirections : Scenario // Save Alignments in Data foreach (Label t in mtxts) { - t.Data = new { h = t.TextAlignment, v = t.VerticalTextAlignment }; + t.Data = new { h = t.Justification, v = t.VerticalJustification }; } container.Add (txtLabelTL); @@ -593,8 +593,8 @@ public class TextAlignmentsAndDirections : Scenario foreach (Label t in mtxts) { - t.TextAlignment = (TextAlignment)((dynamic)t.Data).h; - t.VerticalTextAlignment = (VerticalTextAlignment)((dynamic)t.Data).v; + t.Justification = (Justification)((dynamic)t.Data).h; + t.VerticalJustification = (Justification)((dynamic)t.Data).v; } } else @@ -611,16 +611,16 @@ public class TextAlignmentsAndDirections : Scenario switch (justifyOptions.SelectedItem) { case 0: - t.VerticalTextAlignment = VerticalTextAlignment.Justified; - t.TextAlignment = ((dynamic)t.Data).h; + t.VerticalJustification = Justification.Justified; + t.Justification = ((dynamic)t.Data).h; break; case 1: - t.VerticalTextAlignment = (VerticalTextAlignment)((dynamic)t.Data).v; - t.TextAlignment = TextAlignment.Justified; + t.VerticalJustification = (Justification)((dynamic)t.Data).v; + t.Justification = Justification.Justified; break; case 2: - t.VerticalTextAlignment = VerticalTextAlignment.Justified; - t.TextAlignment = TextAlignment.Justified; + t.VerticalJustification = Justification.Justified; + t.Justification = Justification.Justified; break; } } @@ -629,16 +629,16 @@ public class TextAlignmentsAndDirections : Scenario switch (justifyOptions.SelectedItem) { case 0: - t.TextAlignment = TextAlignment.Justified; - t.VerticalTextAlignment = ((dynamic)t.Data).v; + t.Justification = Justification.Justified; + t.VerticalJustification = ((dynamic)t.Data).v; break; case 1: - t.TextAlignment = (TextAlignment)((dynamic)t.Data).h; - t.VerticalTextAlignment = VerticalTextAlignment.Justified; + t.Justification = (Justification)((dynamic)t.Data).h; + t.VerticalJustification = Justification.Justified; break; case 2: - t.TextAlignment = TextAlignment.Justified; - t.VerticalTextAlignment = VerticalTextAlignment.Justified; + t.Justification = Justification.Justified; + t.VerticalJustification = Justification.Justified; break; } } diff --git a/UICatalog/Scenarios/TextFormatterDemo.cs b/UICatalog/Scenarios/TextFormatterDemo.cs index 00029c033..e44b91d4c 100644 --- a/UICatalog/Scenarios/TextFormatterDemo.cs +++ b/UICatalog/Scenarios/TextFormatterDemo.cs @@ -63,17 +63,17 @@ public class TextFormatterDemo : Scenario app.Add (unicodeCheckBox); - List alignments = Enum.GetValues (typeof (TextAlignment)).Cast ().ToList (); + List alignments = Enum.GetValues (typeof (Justification)).Cast ().ToList (); Label [] singleLines = new Label [alignments.Count]; Label [] multipleLines = new Label [alignments.Count]; var multiLineHeight = 5; - foreach (TextAlignment alignment in alignments) + foreach (Justification alignment in alignments) { singleLines [(int)alignment] = new() { - TextAlignment = alignment, + Justification = alignment, X = 0, Width = Dim.Fill (), @@ -84,7 +84,7 @@ public class TextFormatterDemo : Scenario multipleLines [(int)alignment] = new() { - TextAlignment = alignment, + Justification = alignment, X = 0, Width = Dim.Fill (), @@ -100,7 +100,7 @@ public class TextFormatterDemo : Scenario }; app.Add (label); - foreach (TextAlignment alignment in alignments) + foreach (Justification alignment in alignments) { label = new() { Y = Pos.Bottom (label), Text = $"{alignment}:" }; app.Add (label); @@ -112,7 +112,7 @@ public class TextFormatterDemo : Scenario label = new() { Y = Pos.Bottom (label), Text = "Demonstrating multi-line and word wrap:" }; app.Add (label); - foreach (TextAlignment alignment in alignments) + foreach (Justification alignment in alignments) { label = new() { Y = Pos.Bottom (label), Text = $"{alignment}:" }; app.Add (label); @@ -123,7 +123,7 @@ public class TextFormatterDemo : Scenario unicodeCheckBox.Toggled += (s, e) => { - foreach (TextAlignment alignment in alignments) + foreach (Justification alignment in alignments) { singleLines [(int)alignment].Text = e.OldValue == true ? text : unicode; multipleLines [(int)alignment].Text = e.OldValue == true ? text : unicode; diff --git a/UICatalog/Scenarios/TimeAndDate.cs b/UICatalog/Scenarios/TimeAndDate.cs index ddfc8fc7d..e36114ee0 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, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = Dim.Fill (), Text = "Old Time: " @@ -68,7 +68,7 @@ public class TimeAndDate : Scenario { X = Pos.Center (), Y = Pos.Bottom (_lblOldTime) + 1, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = Dim.Fill (), Text = "New Time: " @@ -79,7 +79,7 @@ public class TimeAndDate : Scenario { X = Pos.Center (), Y = Pos.Bottom (_lblNewTime) + 1, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = Dim.Fill (), Text = "Time Format: " @@ -90,7 +90,7 @@ public class TimeAndDate : Scenario { X = Pos.Center (), Y = Pos.Bottom (_lblTimeFmt) + 2, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = Dim.Fill (), Text = "Old Date: " @@ -101,7 +101,7 @@ public class TimeAndDate : Scenario { X = Pos.Center (), Y = Pos.Bottom (_lblOldDate) + 1, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = Dim.Fill (), Text = "New Date: " @@ -112,7 +112,7 @@ public class TimeAndDate : Scenario { X = Pos.Center (), Y = Pos.Bottom (_lblNewDate) + 1, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = Dim.Fill (), Text = "Date Format: " diff --git a/UICatalog/Scenarios/Unicode.cs b/UICatalog/Scenarios/Unicode.cs index 987c50934..a16887b3c 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, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = $"Align Right - {gitString}" }; Win.Add (checkBox, checkBoxRight); diff --git a/UICatalog/Scenarios/ViewExperiments.cs b/UICatalog/Scenarios/ViewExperiments.cs index be9bbdf5c..d80a98f5d 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", - TextAlignment = TextAlignment.Centered + Justification = Justification.Centered }; window1.Margin.Thickness = new (0); @@ -84,7 +84,7 @@ public class ViewExperiments : Scenario Width = 37, Title = "Window2", Text = "Window #2 (Right(window1)+1", - TextAlignment = TextAlignment.Centered + Justification = Justification.Centered }; //view3.InitializeFrames (); @@ -109,7 +109,7 @@ public class ViewExperiments : Scenario Width = 37, Title = "View4", Text = "View #4 (Right(window2)+1", - TextAlignment = TextAlignment.Centered + Justification = Justification.Centered }; //view4.InitializeFrames (); @@ -134,7 +134,7 @@ public class ViewExperiments : Scenario Width = Dim.Fill (), Title = "View5", Text = "View #5 (Right(view4)+1 Fill", - TextAlignment = TextAlignment.Centered + Justification = Justification.Centered }; //view5.InitializeFrames (); @@ -181,7 +181,7 @@ public class ViewExperiments : Scenario X = Pos.Center (), Y = Pos.Percent (50), Width = 30, - TextAlignment = TextAlignment.Centered + Justification = Justification.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 22f7e042e..d034ffc7f 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, TextAlignment = TextAlignment.Right, Text = "Width:" }; + var label = new Label { X = 0, Y = 0, Justification = Justification.Right, Text = "Width:" }; frame.Add (label); var widthEdit = new TextField @@ -41,7 +41,7 @@ public class Wizards : Scenario Width = Dim.Width (label), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Height:" }; frame.Add (label); @@ -63,7 +63,7 @@ public class Wizards : Scenario Width = Dim.Width (label), Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, Text = "Title:" }; frame.Add (label); @@ -88,7 +88,7 @@ public class Wizards : Scenario label = new() { - X = Pos.Center (), Y = Pos.AnchorEnd (1), TextAlignment = TextAlignment.Right, Text = "Action:" + X = Pos.Center (), Y = Pos.AnchorEnd (1), Justification = Justification.Right, Text = "Action:" }; Win.Add (label); diff --git a/UnitTests/Text/TextFormatterTests.cs b/UnitTests/Text/TextFormatterTests.cs index fda92ad8e..d313aa12a 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 (TextAlignment.Left, tf.Alignment); + Assert.Equal (Justification.Left, tf.Alignment); Assert.Equal (expectedSize, tf.Size); tf.Draw (testBounds, new Attribute (), new Attribute ()); Assert.Equal (expectedSize, tf.Size); Assert.NotEmpty (tf.GetLines ()); - tf.Alignment = TextAlignment.Right; + tf.Alignment = Justification.Right; expectedSize = new (testText.Length, 1); Assert.Equal (testText, tf.Text); - Assert.Equal (TextAlignment.Right, tf.Alignment); + Assert.Equal (Justification.Right, tf.Alignment); Assert.Equal (expectedSize, tf.Size); tf.Draw (testBounds, new Attribute (), new Attribute ()); Assert.Equal (expectedSize, tf.Size); Assert.NotEmpty (tf.GetLines ()); - tf.Alignment = TextAlignment.Right; + tf.Alignment = Justification.Right; expectedSize = new (testText.Length, 1); tf.Size = expectedSize; Assert.Equal (testText, tf.Text); - Assert.Equal (TextAlignment.Right, tf.Alignment); + Assert.Equal (Justification.Right, tf.Alignment); Assert.Equal (expectedSize, tf.Size); tf.Draw (testBounds, new Attribute (), new Attribute ()); Assert.Equal (expectedSize, tf.Size); Assert.NotEmpty (tf.GetLines ()); - tf.Alignment = TextAlignment.Centered; + tf.Alignment = Justification.Centered; expectedSize = new (testText.Length, 1); tf.Size = expectedSize; Assert.Equal (testText, tf.Text); - Assert.Equal (TextAlignment.Centered, tf.Alignment); + Assert.Equal (Justification.Centered, tf.Alignment); 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, TextAlignment.Left)); - Assert.Equal (expected, TextFormatter.ClipAndJustify (text, 0, TextAlignment.Left)); + Assert.Equal (expected, TextFormatter.ClipAndJustify (text, 0, Justification.Left)); + Assert.Equal (expected, TextFormatter.ClipAndJustify (text, 0, Justification.Left)); Assert.Throws ( () => - TextFormatter.ClipAndJustify (text, -1, TextAlignment.Left) + TextFormatter.ClipAndJustify (text, -1, Justification.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 align = TextAlignment.Centered; + var align = Justification.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 align = TextAlignment.Justified; + var align = Justification.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 align = TextAlignment.Left; + var align = Justification.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 align = TextAlignment.Right; + var align = Justification.Right; var textDirection = TextDirection.LeftRight_BottomTop; var tabWidth = 1; @@ -757,7 +757,7 @@ ssb TextFormatter.Format ( "Some text", 4, - TextAlignment.Left, + Justification.Left, false, true ) @@ -785,7 +785,7 @@ ssb for (int i = text.GetRuneCount (); i < maxWidth; i++) { - fmtText = TextFormatter.Format (text, i, TextAlignment.Justified, false, true) [0]; + fmtText = TextFormatter.Format (text, i, Justification.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, - TextAlignment.Justified, + Justification.Justified, false, true, 0, @@ -862,7 +862,7 @@ ssb " A sentence has words. \n This is the second Line - 2. ", 4, -50, - TextAlignment.Left, + Justification.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, - TextAlignment.Left, + Justification.Left, true, true, new [] @@ -900,7 +900,7 @@ ssb string text, int maxWidth, int widthOffset, - TextAlignment textAlignment, + Justification Justification, bool wrap, bool preserveTrailingSpaces, IEnumerable resultLines, @@ -908,7 +908,7 @@ ssb ) { Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset); - List list = TextFormatter.Format (text, maxWidth, textAlignment, wrap, preserveTrailingSpaces); + List list = TextFormatter.Format (text, maxWidth, Justification, wrap, preserveTrailingSpaces); Assert.Equal (list.Count, resultLines.Count ()); Assert.Equal (resultLines, list); var wrappedText = string.Empty; @@ -1336,30 +1336,30 @@ ssb Assert.NotEmpty (tf.GetLines ()); Assert.False (tf.NeedsFormat); // get_Lines causes a Format - tf.Alignment = TextAlignment.Centered; + tf.Alignment = Justification.Centered; Assert.True (tf.NeedsFormat); Assert.NotEmpty (tf.GetLines ()); Assert.False (tf.NeedsFormat); // get_Lines causes a Format } [Theory] - [InlineData ("", -1, TextAlignment.Left, false, 0)] - [InlineData (null, 0, TextAlignment.Left, false, 1)] - [InlineData (null, 0, TextAlignment.Left, true, 1)] - [InlineData ("", 0, TextAlignment.Left, false, 1)] - [InlineData ("", 0, TextAlignment.Left, true, 1)] - public void Reformat_Invalid (string text, int maxWidth, TextAlignment textAlignment, bool wrap, int linesCount) + [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) { if (maxWidth < 0) { Assert.Throws ( () => - TextFormatter.Format (text, maxWidth, textAlignment, wrap) + TextFormatter.Format (text, maxWidth, Justification, wrap) ); } else { - List list = TextFormatter.Format (text, maxWidth, textAlignment, wrap); + List list = TextFormatter.Format (text, maxWidth, Justification, wrap); Assert.NotEmpty (list); Assert.True (list.Count == linesCount); Assert.Equal (string.Empty, list [0]); @@ -1367,25 +1367,25 @@ ssb } [Theory] - [InlineData ("A sentence has words.\nLine 2.", 0, -29, TextAlignment.Left, false, 1, true)] - [InlineData ("A sentence has words.\nLine 2.", 1, -28, TextAlignment.Left, false, 1, false)] - [InlineData ("A sentence has words.\nLine 2.", 5, -24, TextAlignment.Left, false, 1, false)] - [InlineData ("A sentence has words.\nLine 2.", 28, -1, TextAlignment.Left, false, 1, false)] + [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)] // no clip - [InlineData ("A sentence has words.\nLine 2.", 29, 0, TextAlignment.Left, false, 1, false)] - [InlineData ("A sentence has words.\nLine 2.", 30, 1, TextAlignment.Left, false, 1, false)] - [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, TextAlignment.Left, false, 1, true)] - [InlineData ("A sentence has words.\r\nLine 2.", 1, -29, TextAlignment.Left, false, 1, false)] - [InlineData ("A sentence has words.\r\nLine 2.", 5, -25, TextAlignment.Left, false, 1, false)] - [InlineData ("A sentence has words.\r\nLine 2.", 29, -1, TextAlignment.Left, false, 1, false, 1)] - [InlineData ("A sentence has words.\r\nLine 2.", 30, 0, TextAlignment.Left, false, 1, false)] - [InlineData ("A sentence has words.\r\nLine 2.", 31, 1, TextAlignment.Left, false, 1, false)] + [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)] public void Reformat_NoWordrap_NewLines_MultiLine_False ( string text, int maxWidth, int widthOffset, - TextAlignment textAlignment, + Justification Justification, bool wrap, int linesCount, bool stringEmpty, @@ -1394,7 +1394,7 @@ ssb { Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset); int expectedClippedWidth = Math.Min (text.GetRuneCount (), maxWidth) + clipWidthOffset; - List list = TextFormatter.Format (text, maxWidth, textAlignment, wrap); + List list = TextFormatter.Format (text, maxWidth, Justification, wrap); Assert.NotEmpty (list); Assert.True (list.Count == linesCount); @@ -1430,12 +1430,12 @@ ssb } [Theory] - [InlineData ("A sentence has words.\nLine 2.", 0, -29, TextAlignment.Left, false, 1, true, new [] { "" })] + [InlineData ("A sentence has words.\nLine 2.", 0, -29, Justification.Left, false, 1, true, new [] { "" })] [InlineData ( "A sentence has words.\nLine 2.", 1, -28, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1445,7 +1445,7 @@ ssb "A sentence has words.\nLine 2.", 5, -24, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1455,7 +1455,7 @@ ssb "A sentence has words.\nLine 2.", 28, -1, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1466,7 +1466,7 @@ ssb "A sentence has words.\nLine 2.", 29, 0, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1476,18 +1476,18 @@ ssb "A sentence has words.\nLine 2.", 30, 1, - TextAlignment.Left, + Justification.Left, false, 2, false, new [] { "A sentence has words.", "Line 2." } )] - [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, TextAlignment.Left, false, 1, true, new [] { "" })] + [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, Justification.Left, false, 1, true, new [] { "" })] [InlineData ( "A sentence has words.\r\nLine 2.", 1, -29, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1497,7 +1497,7 @@ ssb "A sentence has words.\r\nLine 2.", 5, -25, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1507,7 +1507,7 @@ ssb "A sentence has words.\r\nLine 2.", 29, -1, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1517,7 +1517,7 @@ ssb "A sentence has words.\r\nLine 2.", 30, 0, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1527,7 +1527,7 @@ ssb "A sentence has words.\r\nLine 2.", 31, 1, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1537,7 +1537,7 @@ ssb string text, int maxWidth, int widthOffset, - TextAlignment textAlignment, + Justification Justification, bool wrap, int linesCount, bool stringEmpty, @@ -1549,7 +1549,7 @@ ssb List list = TextFormatter.Format ( text, maxWidth, - textAlignment, + Justification, wrap, false, 0, @@ -1572,12 +1572,12 @@ ssb } [Theory] - [InlineData ("A sentence has words.\nLine 2.", 0, -29, TextAlignment.Left, false, 1, true, new [] { "" })] + [InlineData ("A sentence has words.\nLine 2.", 0, -29, Justification.Left, false, 1, true, new [] { "" })] [InlineData ( "A sentence has words.\nLine 2.", 1, -28, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1587,7 +1587,7 @@ ssb "A sentence has words.\nLine 2.", 5, -24, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1597,7 +1597,7 @@ ssb "A sentence has words.\nLine 2.", 28, -1, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1608,7 +1608,7 @@ ssb "A sentence has words.\nLine 2.", 29, 0, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1618,18 +1618,18 @@ ssb "A sentence has words.\nLine 2.", 30, 1, - TextAlignment.Left, + Justification.Left, false, 2, false, new [] { "A sentence has words.", "Line 2." } )] - [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, TextAlignment.Left, false, 1, true, new [] { "" })] + [InlineData ("A sentence has words.\r\nLine 2.", 0, -30, Justification.Left, false, 1, true, new [] { "" })] [InlineData ( "A sentence has words.\r\nLine 2.", 1, -29, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1639,7 +1639,7 @@ ssb "A sentence has words.\r\nLine 2.", 5, -25, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1649,7 +1649,7 @@ ssb "A sentence has words.\r\nLine 2.", 29, -1, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1659,7 +1659,7 @@ ssb "A sentence has words.\r\nLine 2.", 30, 0, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1669,7 +1669,7 @@ ssb "A sentence has words.\r\nLine 2.", 31, 1, - TextAlignment.Left, + Justification.Left, false, 2, false, @@ -1679,7 +1679,7 @@ ssb string text, int maxWidth, int widthOffset, - TextAlignment textAlignment, + Justification Justification, bool wrap, int linesCount, bool stringEmpty, @@ -1691,7 +1691,7 @@ ssb List list = TextFormatter.Format ( text, maxWidth, - textAlignment, + Justification, wrap, false, 0, @@ -1714,21 +1714,21 @@ ssb } [Theory] - [InlineData ("", 0, 0, TextAlignment.Left, false, 1, true)] - [InlineData ("", 1, 1, TextAlignment.Left, false, 1, true)] - [InlineData ("A sentence has words.", 0, -21, TextAlignment.Left, false, 1, true)] - [InlineData ("A sentence has words.", 1, -20, TextAlignment.Left, false, 1, false)] - [InlineData ("A sentence has words.", 5, -16, TextAlignment.Left, false, 1, false)] - [InlineData ("A sentence has words.", 20, -1, TextAlignment.Left, false, 1, false)] + [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)] // no clip - [InlineData ("A sentence has words.", 21, 0, TextAlignment.Left, false, 1, false)] - [InlineData ("A sentence has words.", 22, 1, TextAlignment.Left, false, 1, false)] + [InlineData ("A sentence has words.", 21, 0, Justification.Left, false, 1, false)] + [InlineData ("A sentence has words.", 22, 1, Justification.Left, false, 1, false)] public void Reformat_NoWordrap_SingleLine ( string text, int maxWidth, int widthOffset, - TextAlignment textAlignment, + Justification Justification, bool wrap, int linesCount, bool stringEmpty @@ -1736,7 +1736,7 @@ ssb { Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset); int expectedClippedWidth = Math.Min (text.GetRuneCount (), maxWidth); - List list = TextFormatter.Format (text, maxWidth, textAlignment, wrap); + List list = TextFormatter.Format (text, maxWidth, Justification, wrap); Assert.NotEmpty (list); Assert.True (list.Count == linesCount); @@ -1759,7 +1759,7 @@ ssb "\u2460\u2461\u2462\n\u2460\u2461\u2462\u2463\u2464", 8, -1, - TextAlignment.Left, + Justification.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, - TextAlignment.Left, + Justification.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, - TextAlignment.Left, + Justification.Left, true, false, new [] { "\u2460\u2461\u2462", "\u2460\u2461\u2462\u2463\u2464" } @@ -1788,14 +1788,14 @@ ssb string text, int maxWidth, int widthOffset, - TextAlignment textAlignment, + Justification Justification, bool wrap, bool preserveTrailingSpaces, IEnumerable resultLines ) { Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset); - List list = TextFormatter.Format (text, maxWidth, textAlignment, wrap, preserveTrailingSpaces); + List list = TextFormatter.Format (text, maxWidth, Justification, wrap, preserveTrailingSpaces); Assert.Equal (list.Count, resultLines.Count ()); Assert.Equal (resultLines, list); } @@ -1805,32 +1805,32 @@ ssb // Unicode // Even # of chars // 0123456789 - [InlineData ("\u2660пÑРвРÑ", 10, -1, TextAlignment.Left, true, false, new [] { "\u2660пÑРвÐ", "Ñ" })] + [InlineData ("\u2660пÑРвРÑ", 10, -1, Justification.Left, true, false, new [] { "\u2660пÑРвÐ", "Ñ" })] // no clip - [InlineData ("\u2660пÑРвРÑ", 11, 0, TextAlignment.Left, true, false, new [] { "\u2660пÑРвРÑ" })] - [InlineData ("\u2660пÑРвРÑ", 12, 1, TextAlignment.Left, true, false, new [] { "\u2660пÑРвРÑ" })] + [InlineData ("\u2660пÑРвРÑ", 11, 0, Justification.Left, true, false, new [] { "\u2660пÑРвРÑ" })] + [InlineData ("\u2660пÑРвРÑ", 12, 1, Justification.Left, true, false, new [] { "\u2660пÑРвРÑ" })] // Unicode // Odd # of chars // 0123456789 - [InlineData ("\u2660 ÑРвРÑ", 9, -1, TextAlignment.Left, true, false, new [] { "\u2660 ÑРвÐ", "Ñ" })] + [InlineData ("\u2660 ÑРвРÑ", 9, -1, Justification.Left, true, false, new [] { "\u2660 ÑРвÐ", "Ñ" })] // no clip - [InlineData ("\u2660 ÑРвРÑ", 10, 0, TextAlignment.Left, true, false, new [] { "\u2660 ÑРвРÑ" })] - [InlineData ("\u2660 ÑРвРÑ", 11, 1, TextAlignment.Left, true, false, new [] { "\u2660 ÑРвРÑ" })] + [InlineData ("\u2660 ÑРвРÑ", 10, 0, Justification.Left, true, false, new [] { "\u2660 ÑРвРÑ" })] + [InlineData ("\u2660 ÑРвРÑ", 11, 1, Justification.Left, true, false, new [] { "\u2660 ÑРвРÑ" })] public void Reformat_Unicode_Wrap_Spaces_No_NewLines ( string text, int maxWidth, int widthOffset, - TextAlignment textAlignment, + Justification Justification, bool wrap, bool preserveTrailingSpaces, IEnumerable resultLines ) { Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset); - List list = TextFormatter.Format (text, maxWidth, textAlignment, wrap, preserveTrailingSpaces); + List list = TextFormatter.Format (text, maxWidth, Justification, wrap, preserveTrailingSpaces); Assert.Equal (list.Count, resultLines.Count ()); Assert.Equal (resultLines, list); } @@ -1839,37 +1839,37 @@ ssb // Even # of spaces // 0123456789 - [InlineData ("012 456 89", 0, -10, TextAlignment.Left, true, true, true, new [] { "" })] + [InlineData ("012 456 89", 0, -10, Justification.Left, true, true, true, new [] { "" })] [InlineData ( "012 456 89", 1, -9, - TextAlignment.Left, + Justification.Left, true, true, false, new [] { "0", "1", "2", " ", "4", "5", "6", " ", "8", "9" }, "01245689" )] - [InlineData ("012 456 89", 5, -5, TextAlignment.Left, true, true, false, new [] { "012 ", "456 ", "89" })] - [InlineData ("012 456 89", 9, -1, TextAlignment.Left, true, true, false, new [] { "012 456 ", "89" })] + [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" })] // no clip - [InlineData ("012 456 89", 10, 0, TextAlignment.Left, true, true, false, new [] { "012 456 89" })] - [InlineData ("012 456 89", 11, 1, TextAlignment.Left, true, true, false, new [] { "012 456 89" })] + [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" })] // Odd # of spaces // 01234567890123 - [InlineData ("012 456 89 end", 13, -1, TextAlignment.Left, true, true, false, new [] { "012 456 89 ", "end" })] + [InlineData ("012 456 89 end", 13, -1, Justification.Left, true, true, false, new [] { "012 456 89 ", "end" })] // no clip - [InlineData ("012 456 89 end", 14, 0, TextAlignment.Left, true, true, false, new [] { "012 456 89 end" })] - [InlineData ("012 456 89 end", 15, 1, TextAlignment.Left, true, true, false, new [] { "012 456 89 end" })] + [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" })] public void Reformat_Wrap_Spaces_No_NewLines ( string text, int maxWidth, int widthOffset, - TextAlignment textAlignment, + Justification Justification, bool wrap, bool preserveTrailingSpaces, bool stringEmpty, @@ -1879,7 +1879,7 @@ ssb { Assert.Equal (maxWidth, text.GetRuneCount () + widthOffset); int expectedClippedWidth = Math.Min (text.GetRuneCount (), maxWidth); - List list = TextFormatter.Format (text, maxWidth, textAlignment, wrap, preserveTrailingSpaces); + List list = TextFormatter.Format (text, maxWidth, Justification, wrap, preserveTrailingSpaces); Assert.NotEmpty (list); Assert.True (list.Count == resultLines.Count ()); @@ -1909,7 +1909,7 @@ ssb ); } - list = TextFormatter.Format (text, maxWidth, TextAlignment.Left, wrap); + list = TextFormatter.Format (text, maxWidth, Justification.Left, wrap); if (maxWidth == 1) { @@ -2224,25 +2224,25 @@ ssb } //[Theory] - //[InlineData (TextAlignment.Left, false)] - //[InlineData (TextAlignment.Centered, true)] - //[InlineData (TextAlignment.Right, false)] - //[InlineData (TextAlignment.Justified, true)] + //[InlineData (Justification.Left, false)] + //[InlineData (Justification.Centered, true)] + //[InlineData (Justification.Right, false)] + //[InlineData (Justification.Justified, true)] //public void TestSize_DirectionChange_AutoSize_True_Or_False_Horizontal ( - // TextAlignment textAlignment, + // Justification Justification, // bool autoSize //) //{ // var tf = new TextFormatter // { - // Direction = TextDirection.LeftRight_TopBottom, Text = "你你", Alignment = textAlignment, AutoSize = autoSize + // Direction = TextDirection.LeftRight_TopBottom, Text = "你你", Alignment = Justification, AutoSize = autoSize // }; // Assert.Equal (4, tf.Size.Width); // Assert.Equal (1, tf.Size.Height); // tf.Direction = TextDirection.TopBottom_LeftRight; - // if (autoSize/* && textAlignment != TextAlignment.Justified*/) + // if (autoSize/* && Justification != Justification.Justified*/) // { // Assert.Equal (2, tf.Size.Width); // Assert.Equal (2, tf.Size.Height); @@ -2255,12 +2255,12 @@ ssb //} //[Theory] - //[InlineData (VerticalTextAlignment.Top, false)] - //[InlineData (VerticalTextAlignment.Middle, true)] - //[InlineData (VerticalTextAlignment.Bottom, false)] - //[InlineData (VerticalTextAlignment.Justified, true)] + //[InlineData (Justification.Top, false)] + //[InlineData (Justification.Centered, true)] + //[InlineData (Justification.Bottom, false)] + //[InlineData (Justification.Justified, true)] //public void TestSize_DirectionChange_AutoSize_True_Or_False_Vertical ( - // VerticalTextAlignment textAlignment, + // Justification Justification, // bool autoSize //) //{ @@ -2268,7 +2268,7 @@ ssb // { // Direction = TextDirection.TopBottom_LeftRight, // Text = "你你", - // VerticalAlignment = textAlignment, + // VerticalAlignment = Justification, // AutoSize = autoSize // }; // Assert.Equal (2, tf.Size.Width); @@ -2276,7 +2276,7 @@ ssb // tf.Direction = TextDirection.LeftRight_TopBottom; - // if (autoSize/* && textAlignment != VerticalTextAlignment.Justified*/) + // if (autoSize/* && Justification != Justification.Justified*/) // { // Assert.Equal (4, tf.Size.Width); // Assert.Equal (1, tf.Size.Height); @@ -2331,15 +2331,15 @@ ssb //} //[Theory] - //[InlineData (TextAlignment.Left, false)] - //[InlineData (TextAlignment.Centered, true)] - //[InlineData (TextAlignment.Right, false)] - //[InlineData (TextAlignment.Justified, true)] - //public void TestSize_SizeChange_AutoSize_True_Or_False_Horizontal (TextAlignment textAlignment, bool autoSize) + //[InlineData (Justification.Left, false)] + //[InlineData (Justification.Centered, true)] + //[InlineData (Justification.Right, false)] + //[InlineData (Justification.Justified, true)] + //public void TestSize_SizeChange_AutoSize_True_Or_False_Horizontal (Justification Justification, bool autoSize) //{ // var tf = new TextFormatter // { - // Direction = TextDirection.LeftRight_TopBottom, Text = "你你", Alignment = textAlignment, AutoSize = autoSize + // Direction = TextDirection.LeftRight_TopBottom, Text = "你你", Alignment = Justification, AutoSize = autoSize // }; // Assert.Equal (4, tf.Size.Width); // Assert.Equal (1, tf.Size.Height); @@ -2359,12 +2359,12 @@ ssb //} //[Theory] - //[InlineData (VerticalTextAlignment.Top, false)] - //[InlineData (VerticalTextAlignment.Middle, true)] - //[InlineData (VerticalTextAlignment.Bottom, false)] - //[InlineData (VerticalTextAlignment.Justified, true)] + //[InlineData (Justification.Top, false)] + //[InlineData (Justification.Centered, true)] + //[InlineData (Justification.Bottom, false)] + //[InlineData (Justification.Justified, true)] //public void TestSize_SizeChange_AutoSize_True_Or_False_Vertical ( - // VerticalTextAlignment textAlignment, + // Justification Justification, // bool autoSize //) //{ @@ -2372,7 +2372,7 @@ ssb // { // Direction = TextDirection.TopBottom_LeftRight, // Text = "你你", - // VerticalAlignment = textAlignment, + // VerticalAlignment = Justification, // AutoSize = autoSize // }; // Assert.Equal (2, tf.Size.Width); @@ -3362,7 +3362,7 @@ ssb TextFormatter tf = new () { Text = text, - Alignment = TextAlignment.Left, + Alignment = Justification.Left, AutoSize = autoSize, }; @@ -3399,7 +3399,7 @@ ssb TextFormatter tf = new () { Text = text, - Alignment = TextAlignment.Right, + Alignment = Justification.Right, AutoSize = autoSize, }; @@ -3442,7 +3442,7 @@ ssb TextFormatter tf = new () { Text = text, - Alignment = TextAlignment.Centered, + Alignment = Justification.Centered, AutoSize = autoSize, }; @@ -3487,7 +3487,7 @@ ssb TextFormatter tf = new () { Text = text, - Alignment = TextAlignment.Justified, + Alignment = Justification.Justified, AutoSize = autoSize, }; @@ -3577,7 +3577,7 @@ Nice Work")] TextFormatter tf = new () { Text = text, - Alignment = TextAlignment.Justified, + Alignment = Justification.Justified, Size = new Size (width, height), MultiLine = true }; @@ -3629,7 +3629,7 @@ ek")] { Text = text, Direction = TextDirection.TopBottom_LeftRight, - VerticalAlignment = VerticalTextAlignment.Justified, + VerticalAlignment = Justification.Justified, Size = new Size (width, height), MultiLine = true }; @@ -3685,9 +3685,9 @@ ek")] TextFormatter tf = new () { Text = text, - Alignment = TextAlignment.Right, + Alignment = Justification.Right, Direction = TextDirection.TopBottom_LeftRight, - VerticalAlignment = VerticalTextAlignment.Bottom, + VerticalAlignment = Justification.Bottom, AutoSize = autoSize, }; @@ -3827,7 +3827,7 @@ B")] { Text = text, Direction = TextDirection.TopBottom_LeftRight, - VerticalAlignment = VerticalTextAlignment.Middle, + VerticalAlignment = Justification.Centered, AutoSize = autoSize, }; @@ -4083,9 +4083,9 @@ B")] [SetupFakeDriver] [Theory] - // Horizontal with VerticalTextAlignment.Top + // Horizontal with Justification.Top // LeftRight_TopBottom - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.LeftRight_TopBottom, @" 0 2 4** ******* ******* @@ -4093,7 +4093,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.LeftRight_TopBottom, @" **0 2 4 ******* ******* @@ -4101,7 +4101,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.LeftRight_TopBottom, @" *0 2 4* ******* ******* @@ -4109,7 +4109,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.LeftRight_TopBottom, @" 0 2 4 ******* ******* @@ -4118,7 +4118,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.LeftRight_TopBottom, @" 0 你 4* ******* ******* @@ -4126,7 +4126,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.LeftRight_TopBottom, @" *0 你 4 ******* ******* @@ -4134,7 +4134,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.LeftRight_TopBottom, @" 0 你 4* ******* ******* @@ -4142,7 +4142,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.LeftRight_TopBottom, @" 0 你 4 ******* ******* @@ -4152,7 +4152,7 @@ B")] *******")] // LeftRight_BottomTop - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.LeftRight_BottomTop, @" 0 2 4** ******* ******* @@ -4160,7 +4160,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.LeftRight_BottomTop, @" **0 2 4 ******* ******* @@ -4168,7 +4168,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.LeftRight_BottomTop, @" *0 2 4* ******* ******* @@ -4176,7 +4176,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.LeftRight_BottomTop, @" 0 2 4 ******* ******* @@ -4185,7 +4185,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.LeftRight_BottomTop, @" 0 你 4* ******* ******* @@ -4193,7 +4193,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.LeftRight_BottomTop, @" *0 你 4 ******* ******* @@ -4201,7 +4201,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.LeftRight_BottomTop, @" 0 你 4* ******* ******* @@ -4209,7 +4209,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.LeftRight_BottomTop, @" 0 你 4 ******* ******* @@ -4219,7 +4219,7 @@ B")] *******")] // RightLeft_TopBottom - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.RightLeft_TopBottom, @" 4 2 0** ******* ******* @@ -4227,7 +4227,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.RightLeft_TopBottom, @" **4 2 0 ******* ******* @@ -4235,7 +4235,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.RightLeft_TopBottom, @" *4 2 0* ******* ******* @@ -4243,7 +4243,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.RightLeft_TopBottom, @" 4 2 0 ******* ******* @@ -4252,7 +4252,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.RightLeft_TopBottom, @" 4 你 0* ******* ******* @@ -4260,7 +4260,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.RightLeft_TopBottom, @" *4 你 0 ******* ******* @@ -4268,7 +4268,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.RightLeft_TopBottom, @" 4 你 0* ******* ******* @@ -4276,7 +4276,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.RightLeft_TopBottom, @" 4 你 0 ******* ******* @@ -4286,7 +4286,7 @@ B")] *******")] // RightLeft_BottomTop - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.RightLeft_BottomTop, @" 4 2 0** ******* ******* @@ -4294,7 +4294,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.RightLeft_BottomTop, @" **4 2 0 ******* ******* @@ -4302,7 +4302,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.RightLeft_BottomTop, @" *4 2 0* ******* ******* @@ -4310,7 +4310,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.RightLeft_BottomTop, @" 4 2 0 ******* ******* @@ -4319,7 +4319,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.RightLeft_BottomTop, @" 4 你 0* ******* ******* @@ -4327,7 +4327,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.RightLeft_BottomTop, @" *4 你 0 ******* ******* @@ -4335,7 +4335,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.RightLeft_BottomTop, @" 4 你 0* ******* ******* @@ -4343,7 +4343,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.RightLeft_BottomTop, @" 4 你 0 ******* ******* @@ -4352,9 +4352,9 @@ B")] ******* *******")] - // Horizontal with VerticalTextAlignment.Bottom + // Horizontal with Justification.Bottom // LeftRight_TopBottom - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4362,7 +4362,7 @@ B")] ******* ******* 0 2 4**")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4370,7 +4370,7 @@ B")] ******* ******* **0 2 4")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4378,7 +4378,7 @@ B")] ******* ******* *0 2 4*")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4387,7 +4387,7 @@ B")] ******* 0 2 4")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4395,7 +4395,7 @@ B")] ******* ******* 0 你 4*")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4403,7 +4403,7 @@ B")] ******* ******* *0 你 4")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4411,7 +4411,7 @@ B")] ******* ******* 0 你 4*")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4421,7 +4421,7 @@ B")] 0 你 4")] // LeftRight_BottomTop - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4429,7 +4429,7 @@ B")] ******* ******* 0 2 4**")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4437,7 +4437,7 @@ B")] ******* ******* **0 2 4")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4445,7 +4445,7 @@ B")] ******* ******* *0 2 4*")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4454,7 +4454,7 @@ B")] ******* 0 2 4")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4462,7 +4462,7 @@ B")] ******* ******* 0 你 4*")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4470,7 +4470,7 @@ B")] ******* ******* *0 你 4")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4478,7 +4478,7 @@ B")] ******* ******* 0 你 4*")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4488,7 +4488,7 @@ B")] 0 你 4")] // RightLeft_TopBottom - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4496,7 +4496,7 @@ B")] ******* ******* 4 2 0**")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4504,7 +4504,7 @@ B")] ******* ******* **4 2 0")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4512,7 +4512,7 @@ B")] ******* ******* *4 2 0*")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4521,7 +4521,7 @@ B")] ******* 4 2 0")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4529,7 +4529,7 @@ B")] ******* ******* 4 你 0*")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4537,7 +4537,7 @@ B")] ******* ******* *4 你 0")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4545,7 +4545,7 @@ B")] ******* ******* 4 你 0*")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4555,7 +4555,7 @@ B")] 4 你 0")] // RightLeft_BottomTop - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4563,7 +4563,7 @@ B")] ******* ******* 4 2 0**")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4571,7 +4571,7 @@ B")] ******* ******* **4 2 0")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4579,7 +4579,7 @@ B")] ******* ******* *4 2 0*")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4588,7 +4588,7 @@ B")] ******* 4 2 0")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4596,7 +4596,7 @@ B")] ******* ******* 4 你 0*")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4604,7 +4604,7 @@ B")] ******* ******* *4 你 0")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4612,7 +4612,7 @@ B")] ******* ******* 4 你 0*")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4621,9 +4621,9 @@ B")] ******* 4 你 0")] - // Horizontal with VerticalTextAlignment.Middle + // Horizontal with Justification.Centered // LeftRight_TopBottom - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4631,7 +4631,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4639,7 +4639,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4647,7 +4647,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4656,7 +4656,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4664,7 +4664,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4672,7 +4672,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4680,7 +4680,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.LeftRight_TopBottom, @" ******* ******* ******* @@ -4690,7 +4690,7 @@ B")] *******")] // LeftRight_BottomTop - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4698,7 +4698,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4706,7 +4706,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4714,7 +4714,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4723,7 +4723,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4731,7 +4731,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4739,7 +4739,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4747,7 +4747,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.LeftRight_BottomTop, @" ******* ******* ******* @@ -4757,7 +4757,7 @@ B")] *******")] // RightLeft_TopBottom - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4765,7 +4765,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4773,7 +4773,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4781,7 +4781,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4790,7 +4790,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4798,7 +4798,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4806,7 +4806,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4814,7 +4814,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.RightLeft_TopBottom, @" ******* ******* ******* @@ -4824,7 +4824,7 @@ B")] *******")] // RightLeft_BottomTop - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4832,7 +4832,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4840,7 +4840,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4848,7 +4848,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4857,7 +4857,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4865,7 +4865,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4873,7 +4873,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4881,7 +4881,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.RightLeft_BottomTop, @" ******* ******* ******* @@ -4890,9 +4890,9 @@ B")] ******* *******")] - // Horizontal with VerticalTextAlignment.Justified + // Horizontal with Justification.Justified // LeftRight_TopBottom - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.LeftRight_TopBottom, @" 0 2 4** ******* ******* @@ -4900,7 +4900,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.LeftRight_TopBottom, @" **0 2 4 ******* ******* @@ -4908,7 +4908,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.LeftRight_TopBottom, @" *0 2 4* ******* ******* @@ -4916,7 +4916,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.LeftRight_TopBottom, @" 0 2 4 ******* ******* @@ -4925,7 +4925,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.LeftRight_TopBottom, @" 0 你 4* ******* ******* @@ -4933,7 +4933,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.LeftRight_TopBottom, @" *0 你 4 ******* ******* @@ -4941,7 +4941,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.LeftRight_TopBottom, @" 0 你 4* ******* ******* @@ -4949,7 +4949,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.LeftRight_TopBottom, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.LeftRight_TopBottom, @" 0 你 4 ******* ******* @@ -4959,7 +4959,7 @@ B")] *******")] // LeftRight_BottomTop - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.LeftRight_BottomTop, @" 0 2 4** ******* ******* @@ -4967,7 +4967,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.LeftRight_BottomTop, @" **0 2 4 ******* ******* @@ -4975,7 +4975,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.LeftRight_BottomTop, @" *0 2 4* ******* ******* @@ -4983,7 +4983,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.LeftRight_BottomTop, @" 0 2 4 ******* ******* @@ -4992,7 +4992,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.LeftRight_BottomTop, @" 0 你 4* ******* ******* @@ -5000,7 +5000,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.LeftRight_BottomTop, @" *0 你 4 ******* ******* @@ -5008,7 +5008,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.LeftRight_BottomTop, @" 0 你 4* ******* ******* @@ -5016,7 +5016,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.LeftRight_BottomTop, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.LeftRight_BottomTop, @" 0 你 4 ******* ******* @@ -5026,7 +5026,7 @@ B")] *******")] // RightLeft_TopBottom - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.RightLeft_TopBottom, @" 4 2 0** ******* ******* @@ -5034,7 +5034,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.RightLeft_TopBottom, @" **4 2 0 ******* ******* @@ -5042,7 +5042,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.RightLeft_TopBottom, @" *4 2 0* ******* ******* @@ -5050,7 +5050,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.RightLeft_TopBottom, @" 4 2 0 ******* ******* @@ -5059,7 +5059,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.RightLeft_TopBottom, @" 4 你 0* ******* ******* @@ -5067,7 +5067,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.RightLeft_TopBottom, @" *4 你 0 ******* ******* @@ -5075,7 +5075,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.RightLeft_TopBottom, @" 4 你 0* ******* ******* @@ -5083,7 +5083,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.RightLeft_TopBottom, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.RightLeft_TopBottom, @" 4 你 0 ******* ******* @@ -5093,7 +5093,7 @@ B")] *******")] // RightLeft_BottomTop - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.RightLeft_BottomTop, @" 4 2 0** ******* ******* @@ -5101,7 +5101,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.RightLeft_BottomTop, @" **4 2 0 ******* ******* @@ -5109,7 +5109,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.RightLeft_BottomTop, @" *4 2 0* ******* ******* @@ -5117,7 +5117,7 @@ B")] ******* ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.RightLeft_BottomTop, @" 4 2 0 ******* ******* @@ -5126,7 +5126,7 @@ B")] ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.RightLeft_BottomTop, @" 4 你 0* ******* ******* @@ -5134,7 +5134,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.RightLeft_BottomTop, @" *4 你 0 ******* ******* @@ -5142,7 +5142,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.RightLeft_BottomTop, @" 4 你 0* ******* ******* @@ -5150,7 +5150,7 @@ B")] ******* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.RightLeft_BottomTop, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.RightLeft_BottomTop, @" 4 你 0 ******* ******* @@ -5159,9 +5159,9 @@ B")] ******* *******")] - // Vertical with TextAlignment.Left + // Vertical with Justification.Left // TopBottom_LeftRight - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.TopBottom_LeftRight, @" 0****** ****** 2****** @@ -5169,7 +5169,7 @@ B")] 4****** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.TopBottom_LeftRight, @" ******* ******* 0****** @@ -5177,7 +5177,7 @@ B")] 2****** ****** 4******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.TopBottom_LeftRight, @" ******* 0****** ****** @@ -5185,7 +5185,7 @@ B")] ****** 4****** *******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.TopBottom_LeftRight, @" 0****** ****** ****** @@ -5194,7 +5194,7 @@ B")] ****** 4******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.TopBottom_LeftRight, @" 0****** ****** 你***** @@ -5202,7 +5202,7 @@ B")] 4****** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.TopBottom_LeftRight, @" ******* ******* 0****** @@ -5210,7 +5210,7 @@ B")] 你***** ****** 4******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.TopBottom_LeftRight, @" ******* 0****** ****** @@ -5218,7 +5218,7 @@ B")] ****** 4****** *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.TopBottom_LeftRight, @" 0****** ****** ****** @@ -5228,7 +5228,7 @@ B")] 4******")] // TopBottom_RightLeft - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.TopBottom_RightLeft, @" 0****** ****** 2****** @@ -5236,7 +5236,7 @@ B")] 4****** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.TopBottom_RightLeft, @" ******* ******* 0****** @@ -5244,7 +5244,7 @@ B")] 2****** ****** 4******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.TopBottom_RightLeft, @" ******* 0****** ****** @@ -5252,7 +5252,7 @@ B")] ****** 4****** *******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.TopBottom_RightLeft, @" 0****** ****** ****** @@ -5261,7 +5261,7 @@ B")] ****** 4******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.TopBottom_RightLeft, @" 0****** ****** 你***** @@ -5269,7 +5269,7 @@ B")] 4****** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.TopBottom_RightLeft, @" ******* ******* 0****** @@ -5277,7 +5277,7 @@ B")] 你***** ****** 4******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.TopBottom_RightLeft, @" ******* 0****** ****** @@ -5285,7 +5285,7 @@ B")] ****** 4****** *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.TopBottom_RightLeft, @" 0****** ****** ****** @@ -5295,7 +5295,7 @@ B")] 4******")] // BottomTop_LeftRight - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.BottomTop_LeftRight, @" 4****** ****** 2****** @@ -5303,7 +5303,7 @@ B")] 0****** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.BottomTop_LeftRight, @" ******* ******* 4****** @@ -5311,7 +5311,7 @@ B")] 2****** ****** 0******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.BottomTop_LeftRight, @" ******* 4****** ****** @@ -5319,7 +5319,7 @@ B")] ****** 0****** *******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.BottomTop_LeftRight, @" 4****** ****** ****** @@ -5328,7 +5328,7 @@ B")] ****** 0******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.BottomTop_LeftRight, @" 4****** ****** 你***** @@ -5336,7 +5336,7 @@ B")] 0****** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.BottomTop_LeftRight, @" ******* ******* 4****** @@ -5344,7 +5344,7 @@ B")] 你***** ****** 0******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.BottomTop_LeftRight, @" ******* 4****** ****** @@ -5352,7 +5352,7 @@ B")] ****** 0****** *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.BottomTop_LeftRight, @" 4****** ****** ****** @@ -5362,7 +5362,7 @@ B")] 0******")] // BottomTop_RightLeft - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Left, Justification.Top, TextDirection.BottomTop_RightLeft, @" 4****** ****** 2****** @@ -5370,7 +5370,7 @@ B")] 0****** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Left, Justification.Bottom, TextDirection.BottomTop_RightLeft, @" ******* ******* 4****** @@ -5378,7 +5378,7 @@ B")] 2****** ****** 0******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Left, Justification.Centered, TextDirection.BottomTop_RightLeft, @" ******* 4****** ****** @@ -5386,7 +5386,7 @@ B")] ****** 0****** *******")] - [InlineData ("0 2 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Left, Justification.Justified, TextDirection.BottomTop_RightLeft, @" 4****** ****** ****** @@ -5395,7 +5395,7 @@ B")] ****** 0******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Top, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Left, Justification.Top, TextDirection.BottomTop_RightLeft, @" 4****** ****** 你***** @@ -5403,7 +5403,7 @@ B")] 0****** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Bottom, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Left, Justification.Bottom, TextDirection.BottomTop_RightLeft, @" ******* ******* 4****** @@ -5411,7 +5411,7 @@ B")] 你***** ****** 0******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Middle, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Left, Justification.Centered, TextDirection.BottomTop_RightLeft, @" ******* 4****** ****** @@ -5419,7 +5419,7 @@ B")] ****** 0****** *******")] - [InlineData ("0 你 4", TextAlignment.Left, VerticalTextAlignment.Justified, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Left, Justification.Justified, TextDirection.BottomTop_RightLeft, @" 4****** ****** ****** @@ -5428,9 +5428,9 @@ B")] ****** 0******")] - // Vertical with TextAlignment.Right + // Vertical with Justification.Right // TopBottom_LeftRight - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.TopBottom_LeftRight, @" ******0 ****** ******2 @@ -5438,7 +5438,7 @@ B")] ******4 ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.TopBottom_LeftRight, @" ******* ******* ******0 @@ -5446,7 +5446,7 @@ B")] ******2 ****** ******4")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.TopBottom_LeftRight, @" ******* ******0 ****** @@ -5454,7 +5454,7 @@ B")] ****** ******4 *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.TopBottom_LeftRight, @" ******0 ****** ****** @@ -5463,7 +5463,7 @@ B")] ****** ******4")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.TopBottom_LeftRight, @" *****0* ***** * *****你 @@ -5471,7 +5471,7 @@ B")] *****4* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.TopBottom_LeftRight, @" ******* ******* *****0* @@ -5479,7 +5479,7 @@ B")] *****你 ***** * *****4*")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.TopBottom_LeftRight, @" ******* *****0* ***** * @@ -5487,7 +5487,7 @@ B")] ***** * *****4* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.TopBottom_LeftRight, @" *****0* ***** * ***** * @@ -5497,7 +5497,7 @@ B")] *****4*")] // TopBottom_RightLeft - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.TopBottom_RightLeft, @" ******0 ****** ******2 @@ -5505,7 +5505,7 @@ B")] ******4 ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.TopBottom_RightLeft, @" ******* ******* ******0 @@ -5513,7 +5513,7 @@ B")] ******2 ****** ******4")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.TopBottom_RightLeft, @" ******* ******0 ****** @@ -5521,7 +5521,7 @@ B")] ****** ******4 *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.TopBottom_RightLeft, @" ******0 ****** ****** @@ -5530,7 +5530,7 @@ B")] ****** ******4")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.TopBottom_RightLeft, @" *****0* ***** * *****你 @@ -5538,7 +5538,7 @@ B")] *****4* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.TopBottom_RightLeft, @" ******* ******* *****0* @@ -5546,7 +5546,7 @@ B")] *****你 ***** * *****4*")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.TopBottom_RightLeft, @" ******* *****0* ***** * @@ -5554,7 +5554,7 @@ B")] ***** * *****4* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.TopBottom_RightLeft, @" *****0* ***** * ***** * @@ -5564,7 +5564,7 @@ B")] *****4*")] // BottomTop_LeftRight - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.BottomTop_LeftRight, @" ******4 ****** ******2 @@ -5572,7 +5572,7 @@ B")] ******0 ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.BottomTop_LeftRight, @" ******* ******* ******4 @@ -5580,7 +5580,7 @@ B")] ******2 ****** ******0")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.BottomTop_LeftRight, @" ******* ******4 ****** @@ -5588,7 +5588,7 @@ B")] ****** ******0 *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.BottomTop_LeftRight, @" ******4 ****** ****** @@ -5597,7 +5597,7 @@ B")] ****** ******0")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.BottomTop_LeftRight, @" *****4* ***** * *****你 @@ -5605,7 +5605,7 @@ B")] *****0* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.BottomTop_LeftRight, @" ******* ******* *****4* @@ -5613,7 +5613,7 @@ B")] *****你 ***** * *****0*")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.BottomTop_LeftRight, @" ******* *****4* ***** * @@ -5621,7 +5621,7 @@ B")] ***** * *****0* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.BottomTop_LeftRight, @" *****4* ***** * ***** * @@ -5631,7 +5631,7 @@ B")] *****0*")] // BottomTop_RightLeft - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Right, Justification.Top, TextDirection.BottomTop_RightLeft, @" ******4 ****** ******2 @@ -5639,7 +5639,7 @@ B")] ******0 ******* *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Right, Justification.Bottom, TextDirection.BottomTop_RightLeft, @" ******* ******* ******4 @@ -5647,7 +5647,7 @@ B")] ******2 ****** ******0")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Right, Justification.Centered, TextDirection.BottomTop_RightLeft, @" ******* ******4 ****** @@ -5655,7 +5655,7 @@ B")] ****** ******0 *******")] - [InlineData ("0 2 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Right, Justification.Justified, TextDirection.BottomTop_RightLeft, @" ******4 ****** ****** @@ -5664,7 +5664,7 @@ B")] ****** ******0")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Top, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Right, Justification.Top, TextDirection.BottomTop_RightLeft, @" *****4* ***** * *****你 @@ -5672,7 +5672,7 @@ B")] *****0* ******* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Bottom, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Right, Justification.Bottom, TextDirection.BottomTop_RightLeft, @" ******* ******* *****4* @@ -5680,7 +5680,7 @@ B")] *****你 ***** * *****0*")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Middle, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Right, Justification.Centered, TextDirection.BottomTop_RightLeft, @" ******* *****4* ***** * @@ -5688,7 +5688,7 @@ B")] ***** * *****0* *******")] - [InlineData ("0 你 4", TextAlignment.Right, VerticalTextAlignment.Justified, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Right, Justification.Justified, TextDirection.BottomTop_RightLeft, @" *****4* ***** * ***** * @@ -5697,9 +5697,9 @@ B")] ***** * *****0*")] - // Vertical with TextAlignment.Centered + // Vertical with Justification.Centered // TopBottom_LeftRight - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.TopBottom_LeftRight, @" ***0*** *** *** ***2*** @@ -5707,7 +5707,7 @@ B")] ***4*** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.TopBottom_LeftRight, @" ******* ******* ***0*** @@ -5715,7 +5715,7 @@ B")] ***2*** *** *** ***4***")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.TopBottom_LeftRight, @" ******* ***0*** *** *** @@ -5723,7 +5723,7 @@ B")] *** *** ***4*** *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.TopBottom_LeftRight, @" ***0*** *** *** *** *** @@ -5732,7 +5732,7 @@ B")] *** *** ***4***")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.TopBottom_LeftRight, @" **0**** ** **** **你*** @@ -5740,7 +5740,7 @@ B")] **4**** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.TopBottom_LeftRight, @" ******* ******* **0**** @@ -5748,7 +5748,7 @@ B")] **你*** ** **** **4****")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.TopBottom_LeftRight, @" ******* **0**** ** **** @@ -5756,7 +5756,7 @@ B")] ** **** **4**** *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.TopBottom_LeftRight, @" **0**** ** **** ** **** @@ -5766,7 +5766,7 @@ B")] **4****")] // TopBottom_RightLeft - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.TopBottom_RightLeft, @" ***0*** *** *** ***2*** @@ -5774,7 +5774,7 @@ B")] ***4*** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.TopBottom_RightLeft, @" ******* ******* ***0*** @@ -5782,7 +5782,7 @@ B")] ***2*** *** *** ***4***")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.TopBottom_RightLeft, @" ******* ***0*** *** *** @@ -5790,7 +5790,7 @@ B")] *** *** ***4*** *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.TopBottom_RightLeft, @" ***0*** *** *** *** *** @@ -5799,7 +5799,7 @@ B")] *** *** ***4***")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.TopBottom_RightLeft, @" **0**** ** **** **你*** @@ -5807,7 +5807,7 @@ B")] **4**** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.TopBottom_RightLeft, @" ******* ******* **0**** @@ -5815,7 +5815,7 @@ B")] **你*** ** **** **4****")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.TopBottom_RightLeft, @" ******* **0**** ** **** @@ -5823,7 +5823,7 @@ B")] ** **** **4**** *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.TopBottom_RightLeft, @" **0**** ** **** ** **** @@ -5833,7 +5833,7 @@ B")] **4****")] // BottomTop_LeftRight - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.BottomTop_LeftRight, @" ***4*** *** *** ***2*** @@ -5841,7 +5841,7 @@ B")] ***0*** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.BottomTop_LeftRight, @" ******* ******* ***4*** @@ -5849,7 +5849,7 @@ B")] ***2*** *** *** ***0***")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.BottomTop_LeftRight, @" ******* ***4*** *** *** @@ -5857,7 +5857,7 @@ B")] *** *** ***0*** *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.BottomTop_LeftRight, @" ***4*** *** *** *** *** @@ -5866,7 +5866,7 @@ B")] *** *** ***0***")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.BottomTop_LeftRight, @" **4**** ** **** **你*** @@ -5874,7 +5874,7 @@ B")] **0**** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.BottomTop_LeftRight, @" ******* ******* **4**** @@ -5882,7 +5882,7 @@ B")] **你*** ** **** **0****")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.BottomTop_LeftRight, @" ******* **4**** ** **** @@ -5890,7 +5890,7 @@ B")] ** **** **0**** *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.BottomTop_LeftRight, @" **4**** ** **** ** **** @@ -5900,7 +5900,7 @@ B")] **0****")] // BottomTop_RightLeft - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Top, TextDirection.BottomTop_RightLeft, @" ***4*** *** *** ***2*** @@ -5908,7 +5908,7 @@ B")] ***0*** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Bottom, TextDirection.BottomTop_RightLeft, @" ******* ******* ***4*** @@ -5916,7 +5916,7 @@ B")] ***2*** *** *** ***0***")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Centered, TextDirection.BottomTop_RightLeft, @" ******* ***4*** *** *** @@ -5924,7 +5924,7 @@ B")] *** *** ***0*** *******")] - [InlineData ("0 2 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Centered, Justification.Justified, TextDirection.BottomTop_RightLeft, @" ***4*** *** *** *** *** @@ -5933,7 +5933,7 @@ B")] *** *** ***0***")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Top, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Top, TextDirection.BottomTop_RightLeft, @" **4**** ** **** **你*** @@ -5941,7 +5941,7 @@ B")] **0**** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Bottom, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Bottom, TextDirection.BottomTop_RightLeft, @" ******* ******* **4**** @@ -5949,7 +5949,7 @@ B")] **你*** ** **** **0****")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Middle, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Centered, TextDirection.BottomTop_RightLeft, @" ******* **4**** ** **** @@ -5957,7 +5957,7 @@ B")] ** **** **0**** *******")] - [InlineData ("0 你 4", TextAlignment.Centered, VerticalTextAlignment.Justified, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Centered, Justification.Justified, TextDirection.BottomTop_RightLeft, @" **4**** ** **** ** **** @@ -5966,9 +5966,9 @@ B")] ** **** **0****")] - // Vertical with TextAlignment.Justified + // Vertical with Justification.Justified // TopBottom_LeftRight - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.TopBottom_LeftRight, @" 0****** ****** 2****** @@ -5976,7 +5976,7 @@ B")] 4****** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.TopBottom_LeftRight, @" ******* ******* 0****** @@ -5984,7 +5984,7 @@ B")] 2****** ****** 4******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.TopBottom_LeftRight, @" ******* 0****** ****** @@ -5992,7 +5992,7 @@ B")] ****** 4****** *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.TopBottom_LeftRight, @" 0****** ****** ****** @@ -6001,7 +6001,7 @@ B")] ****** 4******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.TopBottom_LeftRight, @" 0****** ****** 你***** @@ -6009,7 +6009,7 @@ B")] 4****** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.TopBottom_LeftRight, @" ******* ******* 0****** @@ -6017,7 +6017,7 @@ B")] 你***** ****** 4******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.TopBottom_LeftRight, @" ******* 0****** ****** @@ -6025,7 +6025,7 @@ B")] ****** 4****** *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.TopBottom_LeftRight, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.TopBottom_LeftRight, @" 0****** ****** ****** @@ -6035,7 +6035,7 @@ B")] 4******")] // TopBottom_RightLeft - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.TopBottom_RightLeft, @" 0****** ****** 2****** @@ -6043,7 +6043,7 @@ B")] 4****** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.TopBottom_RightLeft, @" ******* ******* 0****** @@ -6051,7 +6051,7 @@ B")] 2****** ****** 4******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.TopBottom_RightLeft, @" ******* 0****** ****** @@ -6059,7 +6059,7 @@ B")] ****** 4****** *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.TopBottom_RightLeft, @" 0****** ****** ****** @@ -6068,7 +6068,7 @@ B")] ****** 4******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.TopBottom_RightLeft, @" 0****** ****** 你***** @@ -6076,7 +6076,7 @@ B")] 4****** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.TopBottom_RightLeft, @" ******* ******* 0****** @@ -6084,7 +6084,7 @@ B")] 你***** ****** 4******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.TopBottom_RightLeft, @" ******* 0****** ****** @@ -6092,7 +6092,7 @@ B")] ****** 4****** *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.TopBottom_RightLeft, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.TopBottom_RightLeft, @" 0****** ****** ****** @@ -6102,7 +6102,7 @@ B")] 4******")] // BottomTop_LeftRight - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.BottomTop_LeftRight, @" 4****** ****** 2****** @@ -6110,7 +6110,7 @@ B")] 0****** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.BottomTop_LeftRight, @" ******* ******* 4****** @@ -6118,7 +6118,7 @@ B")] 2****** ****** 0******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.BottomTop_LeftRight, @" ******* 4****** ****** @@ -6126,7 +6126,7 @@ B")] ****** 0****** *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.BottomTop_LeftRight, @" 4****** ****** ****** @@ -6135,7 +6135,7 @@ B")] ****** 0******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.BottomTop_LeftRight, @" 4****** ****** 你***** @@ -6143,7 +6143,7 @@ B")] 0****** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.BottomTop_LeftRight, @" ******* ******* 4****** @@ -6151,7 +6151,7 @@ B")] 你***** ****** 0******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.BottomTop_LeftRight, @" ******* 4****** ****** @@ -6159,7 +6159,7 @@ B")] ****** 0****** *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.BottomTop_LeftRight, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.BottomTop_LeftRight, @" 4****** ****** ****** @@ -6169,7 +6169,7 @@ B")] 0******")] // BottomTop_RightLeft - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Top, TextDirection.BottomTop_RightLeft, @" 4****** ****** 2****** @@ -6177,7 +6177,7 @@ B")] 0****** ******* *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Bottom, TextDirection.BottomTop_RightLeft, @" ******* ******* 4****** @@ -6185,7 +6185,7 @@ B")] 2****** ****** 0******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Centered, TextDirection.BottomTop_RightLeft, @" ******* 4****** ****** @@ -6193,7 +6193,7 @@ B")] ****** 0****** *******")] - [InlineData ("0 2 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 2 4", Justification.Justified, Justification.Justified, TextDirection.BottomTop_RightLeft, @" 4****** ****** ****** @@ -6202,7 +6202,7 @@ B")] ****** 0******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Top, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Top, TextDirection.BottomTop_RightLeft, @" 4****** ****** 你***** @@ -6210,7 +6210,7 @@ B")] 0****** ******* *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Bottom, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Bottom, TextDirection.BottomTop_RightLeft, @" ******* ******* 4****** @@ -6218,7 +6218,7 @@ B")] 你***** ****** 0******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Middle, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Centered, TextDirection.BottomTop_RightLeft, @" ******* 4****** ****** @@ -6226,7 +6226,7 @@ B")] ****** 0****** *******")] - [InlineData ("0 你 4", TextAlignment.Justified, VerticalTextAlignment.Justified, TextDirection.BottomTop_RightLeft, @" + [InlineData ("0 你 4", Justification.Justified, Justification.Justified, TextDirection.BottomTop_RightLeft, @" 4****** ****** ****** @@ -6235,12 +6235,12 @@ B")] ****** 0******")] - public void Draw_Text_Alignment (string text, TextAlignment horizontalTextAlignment, VerticalTextAlignment verticalTextAlignment, TextDirection textDirection, string expectedText) + public void Draw_Text_Alignment (string text, Justification horizontalTextAlignment, Justification Justification, TextDirection textDirection, string expectedText) { TextFormatter tf = new () { Alignment = horizontalTextAlignment, - VerticalAlignment = verticalTextAlignment, + VerticalAlignment = Justification, Direction = textDirection, Size = new (7, 7), Text = text diff --git a/UnitTests/View/DrawTests.cs b/UnitTests/View/DrawTests.cs index 6d9c4b0af..8d1043046 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, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, ColorScheme = Colors.ColorSchemes ["Base"] }; @@ -350,7 +350,7 @@ public class DrawTests (ITestOutputHelper _output) Y = 1, Width = 1, Height = 6, - VerticalTextAlignment = VerticalTextAlignment.Bottom, + VerticalJustification = Justification.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 ed2500877..c5517b2d4 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.Alignment = TextAlignment.Justified; + view.TextFormatter.Alignment = Justification.Justified; Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); - view.TextFormatter.VerticalAlignment = VerticalTextAlignment.Middle; + view.TextFormatter.VerticalAlignment = Justification.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.TextAlignment = TextAlignment.Justified; + view.Justification = Justification.Justified; Assert.False (view.TextFormatter.AutoSize); Assert.Equal (Size.Empty, view.Frame.Size); - view.VerticalTextAlignment = VerticalTextAlignment.Middle; + view.VerticalJustification = Justification.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.TextAlignment = TextAlignment.Justified; + view.Justification = Justification.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.VerticalTextAlignment = VerticalTextAlignment.Middle; + view.VerticalJustification = Justification.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 78939f779..62e93e000 100644 --- a/UnitTests/View/Text/AutoSizeTrueTests.cs +++ b/UnitTests/View/Text/AutoSizeTrueTests.cs @@ -1811,7 +1811,7 @@ Y Y = 1, Width = width, Height = 1, - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, }; if (autoSize) @@ -1826,7 +1826,7 @@ Y Y = 2, Width = width, Height = 1, - TextAlignment = TextAlignment.Right, + Justification = Justification.Right, }; if (autoSize) { @@ -1840,7 +1840,7 @@ Y Y = 3, Width = width, Height = 1, - TextAlignment = TextAlignment.Justified, + Justification = Justification.Justified, }; if (autoSize) { @@ -1937,7 +1937,7 @@ Y Width = 1, Height = height, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Middle + Justification = Justification.Centered }; if (autoSize) { @@ -1952,7 +1952,7 @@ Y Width = 1, Height = height, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Bottom + VerticalJustification = Justification.Bottom }; if (autoSize) { @@ -1967,7 +1967,7 @@ Y Width = 1, Height = height, TextDirection = TextDirection.TopBottom_LeftRight, - VerticalTextAlignment = VerticalTextAlignment.Justified + VerticalJustification = Justification.Justified }; if (autoSize) { diff --git a/UnitTests/Views/ButtonTests.cs b/UnitTests/Views/ButtonTests.cs index 0d91bc151..0aa841c44 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 (TextAlignment.Centered, btn.TextAlignment); + Assert.Equal (Justification.Centered, btn.Justification); 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 (TextAlignment.Centered, btn.TextAlignment); + Assert.Equal (Justification.Centered, btn.Justification); 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 (TextAlignment.Centered, btn.TextAlignment); + Assert.Equal (Justification.Centered, btn.Justification); 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 (TextAlignment.Centered, btn.TextAlignment); + Assert.Equal (Justification.Centered, btn.Justification); Assert.Equal ('_', btn.HotKeySpecifier.Value); Assert.True (btn.CanFocus); diff --git a/UnitTests/Views/CheckBoxTests.cs b/UnitTests/Views/CheckBoxTests.cs index ef938c748..0ff1f75c3 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 你", - TextAlignment = TextAlignment.Centered, + Justification = Justification.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 (TextAlignment.Centered, checkBox.TextAlignment); + Assert.Equal (Justification.Centered, checkBox.Justification); 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 你", - TextAlignment = TextAlignment.Justified, + Justification = Justification.Justified, Width = 25 }; @@ -310,7 +310,7 @@ public class CheckBoxTests X = 1, Y = Pos.Bottom (checkBox1), Text = "Check second out 你", - TextAlignment = TextAlignment.Justified, + Justification = Justification.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 (TextAlignment.Justified, checkBox1.TextAlignment); + Assert.Equal (Justification.Justified, checkBox1.Justification); Assert.Equal (new (1, 1, 25, 1), checkBox1.Frame); - Assert.Equal (TextAlignment.Justified, checkBox2.TextAlignment); + Assert.Equal (Justification.Justified, checkBox2.Justification); 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 (TextAlignment.Left, checkBox.TextAlignment); + Assert.Equal (Justification.Left, checkBox.Justification); 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 你", - TextAlignment = TextAlignment.Right, + Justification = Justification.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 (TextAlignment.Right, checkBox.TextAlignment); + Assert.Equal (Justification.Right, checkBox.Justification); 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 959eecbb8..3989ff9ba 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 (TextAlignment.Left, label.TextAlignment); + Assert.Equal (Justification.Left, label.Justification); 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 5e9aa6e68..62686f59f 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 { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // **** @@ -44,7 +44,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Left, + Justification = Justification.Left, Width = 30, // **** @@ -81,7 +81,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // **** @@ -115,7 +115,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // * @@ -137,7 +137,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // * @@ -161,7 +161,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // **** @@ -179,7 +179,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // **** @@ -196,7 +196,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // **** @@ -214,7 +214,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // * @@ -233,7 +233,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // * @@ -253,7 +253,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // ** ** @@ -283,7 +283,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // * @@ -308,7 +308,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Left, + Justification = Justification.Left, Width = 30, // **** @@ -338,7 +338,7 @@ public class TextValidateField_NET_Provider_Tests var field = new TextValidateField { - TextAlignment = TextAlignment.Left, Width = 30, Provider = new NetMaskedTextProvider ("--(0000)--") + Justification = Justification.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 { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // * @@ -381,7 +381,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Left, + Justification = Justification.Left, Width = 30, // **** @@ -400,7 +400,7 @@ public class TextValidateField_NET_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.Centered, Width = 20, // **** @@ -540,7 +540,7 @@ public class TextValidateField_Regex_Provider_Tests { var field = new TextValidateField { - TextAlignment = TextAlignment.Centered, + Justification = Justification.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 { - TextAlignment = TextAlignment.Centered, + Justification = Justification.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 { - TextAlignment = TextAlignment.Centered, + Justification = Justification.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 28d9b94f4..eebd7aef7 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 (), - TextAlignment = TextAlignment.Centered, - VerticalTextAlignment = VerticalTextAlignment.Middle, + Justification = Justification.Centered, + VerticalJustification = Justification.Centered, Text = "Test" } );