mirror of
https://github.com/dnwSilver/tld.git
synced 2025-04-19 19:46:19 +00:00
37 lines
867 B
C#
37 lines
867 B
C#
|
using System.Text;
|
||
|
using TUI.Engine;
|
||
|
using TUI.Engine.Nodes.Attributes;
|
||
|
using TUI.Engine.Nodes.Attributes.Alignments;
|
||
|
using TUI.Engine.Nodes.Components;
|
||
|
|
||
|
namespace TUI.Components.Controls;
|
||
|
|
||
|
public class CellsComponentBase : ComponentBase, IComponent
|
||
|
{
|
||
|
private const int MaxCellWidth = 10;
|
||
|
|
||
|
private readonly IEnumerable<string> _cells;
|
||
|
|
||
|
|
||
|
public CellsComponentBase(IEnumerable<string> cells)
|
||
|
{
|
||
|
_cells = cells;
|
||
|
}
|
||
|
|
||
|
public void Render(Horizontal horizontal, Size size)
|
||
|
{
|
||
|
var content = new StringBuilder();
|
||
|
foreach (var cell in _cells)
|
||
|
{
|
||
|
content.Append(Symbols.Space.Repeat(MaxCellWidth - cell.Width()));
|
||
|
content.Append(cell);
|
||
|
}
|
||
|
|
||
|
// base.Render(content, position, size);
|
||
|
}
|
||
|
|
||
|
public override Content Render()
|
||
|
{
|
||
|
throw new NotImplementedException();
|
||
|
}
|
||
|
}
|