mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Initial plan * Remove LineView and replace all usages with Line - Deleted LineViewExample.cs scenario - Deleted LineViewTests.cs test file - Replaced LineView with Line in all examples (CollectionNavigatorTester, FileDialogExamples, LineExample, Wizard) - Replaced LineView with Line in all tests (ViewTests, TileViewTests) - Changed TileViewLineView to inherit from Line instead of LineView - Removed LineView.cs file - Removed LineView category from TileViewNesting scenario Co-authored-by: tig <585482+tig@users.noreply.github.com> * Remove LineView references from documentation - Updated Line.cs XML documentation to remove comparison with LineView - Removed LineView section from views.md documentation Co-authored-by: tig <585482+tig@users.noreply.github.com> * Fixes Wizard (#4269) * fixed Wizard * Made Line use GetAttributeForRole --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: Tig <tig@users.noreply.github.com>
This commit is contained in:
@@ -129,7 +129,7 @@ public class CollectionNavigatorTester : Scenario
|
||||
_items = new (_items.OrderBy (i => i, StringComparer.OrdinalIgnoreCase));
|
||||
|
||||
CreateListView ();
|
||||
var vsep = new LineView (Orientation.Vertical) { X = Pos.Right (_listView), Y = 1, Height = Dim.Fill () };
|
||||
var vsep = new Line { Orientation = Orientation.Vertical, X = Pos.Right (_listView), Y = 1, Height = Dim.Fill () };
|
||||
top.Add (vsep);
|
||||
CreateTreeView ();
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ public class FileDialogExamples : Scenario
|
||||
x = 24;
|
||||
|
||||
win.Add (
|
||||
new LineView (Orientation.Vertical) { X = x++, Y = 1, Height = 4 }
|
||||
new Line { Orientation = Orientation.Vertical, X = x++, Y = 1, Height = 4 }
|
||||
);
|
||||
win.Add (new Label { X = x++, Y = y++, Text = "Caption" });
|
||||
|
||||
@@ -74,7 +74,7 @@ public class FileDialogExamples : Scenario
|
||||
x = 34;
|
||||
|
||||
win.Add (
|
||||
new LineView (Orientation.Vertical) { X = x++, Y = 1, Height = 4 }
|
||||
new Line { Orientation = Orientation.Vertical, X = x++, Y = 1, Height = 4 }
|
||||
);
|
||||
win.Add (new Label { X = x++, Y = y++, Text = "OpenMode" });
|
||||
|
||||
@@ -86,7 +86,7 @@ public class FileDialogExamples : Scenario
|
||||
x = 48;
|
||||
|
||||
win.Add (
|
||||
new LineView (Orientation.Vertical) { X = x++, Y = 1, Height = 4 }
|
||||
new Line { Orientation = Orientation.Vertical, X = x++, Y = 1, Height = 4 }
|
||||
);
|
||||
win.Add (new Label { X = x++, Y = y++, Text = "Icons" });
|
||||
|
||||
@@ -101,7 +101,7 @@ public class FileDialogExamples : Scenario
|
||||
x = 24;
|
||||
|
||||
win.Add (
|
||||
new LineView (Orientation.Vertical) { X = x++, Y = y + 1, Height = 4 }
|
||||
new Line { Orientation = Orientation.Vertical, X = x++, Y = y + 1, Height = 4 }
|
||||
);
|
||||
win.Add (new Label { X = x++, Y = y++, Text = "Allowed" });
|
||||
|
||||
@@ -113,7 +113,7 @@ public class FileDialogExamples : Scenario
|
||||
x = 45;
|
||||
|
||||
win.Add (
|
||||
new LineView (Orientation.Vertical) { X = x++, Y = y + 1, Height = 4 }
|
||||
new Line { Orientation = Orientation.Vertical, X = x++, Y = y + 1, Height = 4 }
|
||||
);
|
||||
win.Add (new Label { X = x++, Y = y++, Text = "Buttons" });
|
||||
|
||||
|
||||
@@ -203,21 +203,6 @@ public class LineExample : Scenario
|
||||
|
||||
app.Add (framedView);
|
||||
|
||||
// Section 6: Comparison with LineView
|
||||
var comparisonLabel = new Label
|
||||
{
|
||||
X = 35,
|
||||
Y = 15,
|
||||
Text = "Line vs LineView Comparison:"
|
||||
};
|
||||
app.Add (comparisonLabel);
|
||||
|
||||
app.Add (new Label { X = 35, Y = 16, Text = "Line (uses LineCanvas):" });
|
||||
app.Add (new Line { X = 35, Y = 17, Width = 20, Style = LineStyle.Single });
|
||||
|
||||
app.Add (new Label { X = 35, Y = 18, Text = "LineView (direct render):" });
|
||||
app.Add (new LineView { X = 35, Y = 19, Width = 20 });
|
||||
|
||||
// Add help text
|
||||
var helpLabel = new Label
|
||||
{
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace UICatalog.Scenarios;
|
||||
|
||||
[ScenarioMetadata ("Line View", "Demonstrates drawing lines using the LineView control.")]
|
||||
[ScenarioCategory ("Controls")]
|
||||
[ScenarioCategory ("LineView")]
|
||||
[ScenarioCategory ("Adornments")]
|
||||
public class LineViewExample : Scenario
|
||||
{
|
||||
public override void Main ()
|
||||
{
|
||||
Application.Init ();
|
||||
|
||||
var appWindow = new Window()
|
||||
{
|
||||
Title = GetQuitKeyAndName (),
|
||||
};
|
||||
|
||||
appWindow.Add (new Label { Y = 1, Text = "Regular Line" });
|
||||
|
||||
// creates a horizontal line
|
||||
var line = new LineView { Y = 2 };
|
||||
|
||||
appWindow.Add (line);
|
||||
|
||||
appWindow.Add (new Label { Y = 3, Text = "Double Width Line" });
|
||||
|
||||
// creates a horizontal line
|
||||
var doubleLine = new LineView { Y = 4, LineRune = (Rune)'\u2550' };
|
||||
|
||||
appWindow.Add (doubleLine);
|
||||
|
||||
appWindow.Add (new Label { Y = 5, Text = "Short Line" });
|
||||
|
||||
// creates a horizontal line
|
||||
var shortLine = new LineView { Y = 5, Width = 10 };
|
||||
|
||||
appWindow.Add (shortLine);
|
||||
|
||||
appWindow.Add (new Label { Y = 7, Text = "Arrow Line" });
|
||||
|
||||
// creates a horizontal line
|
||||
var arrowLine = new LineView
|
||||
{
|
||||
Y = 8, Width = 10, StartingAnchor = Glyphs.LeftTee, EndingAnchor = (Rune)'>'
|
||||
};
|
||||
|
||||
appWindow.Add (arrowLine);
|
||||
|
||||
appWindow.Add (new Label { Y = 10, X = 11, Text = "Vertical Line" });
|
||||
|
||||
// creates a horizontal line
|
||||
var verticalLine = new LineView (Orientation.Vertical) { X = 25 };
|
||||
|
||||
appWindow.Add (verticalLine);
|
||||
|
||||
appWindow.Add (new Label { Y = 12, X = 28, Text = "Vertical Arrow" });
|
||||
|
||||
// creates a horizontal line
|
||||
var verticalArrow = new LineView (Orientation.Vertical)
|
||||
{
|
||||
X = 27, StartingAnchor = Glyphs.TopTee, EndingAnchor = (Rune)'V'
|
||||
};
|
||||
|
||||
appWindow.Add (verticalArrow);
|
||||
|
||||
// Run - Start the application.
|
||||
Application.Run (appWindow);
|
||||
appWindow.Dispose ();
|
||||
|
||||
// Shutdown - Calling Application.Shutdown is required.
|
||||
Application.Shutdown ();
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,6 @@ namespace UICatalog.Scenarios;
|
||||
|
||||
[ScenarioMetadata ("Tile View Nesting", "Demonstrates recursive nesting of TileViews")]
|
||||
[ScenarioCategory ("Controls")]
|
||||
[ScenarioCategory ("LineView")]
|
||||
public class TileViewNesting : Scenario
|
||||
{
|
||||
private CheckBox _cbBorder;
|
||||
|
||||
Reference in New Issue
Block a user