From d3d9139dd6aa535ed1d7f2c78accd6ac5fa89b3e Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 15 Nov 2021 21:03:19 +0100 Subject: Abstract away FlexibleCell, fix pageUp/pageDown --- src/io/cell.nim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/io/cell.nim') diff --git a/src/io/cell.nim b/src/io/cell.nim index d757c2de..e1b2aef4 100644 --- a/src/io/cell.nim +++ b/src/io/cell.nim @@ -46,6 +46,21 @@ func width*(cell: FixedCell): int = func newFormatting*(): Formatting = return Formatting(fgcolor: defaultColor, bgcolor: defaultColor) +proc addLine*(grid: var FlexibleGrid) = + grid.add(newSeq[FlexibleCell]()) + +proc addCell*(grid: var FlexibleGrid, y: int, r: Rune) = + grid[y].add(FlexibleCell(rune: r)) + +proc addCell*(grid: var FlexibleGrid, y: int, r: Rune, format: Formatting) = + grid[y].add(FlexibleCell(rune: r, formatting: format)) + +proc addCell*(grid: var FlexibleGrid, y: int, r: Rune, format: Formatting, nodes: seq[Node]) = + grid[y].add(FlexibleCell(rune: r, formatting: format, nodes: nodes)) + +proc addCell*(grid: var FlexibleGrid, r: Rune, format: Formatting) = + grid[^1].add(FlexibleCell(rune: r, formatting: format)) + proc setText*(grid: var FlexibleGrid, x: int, y: int, text: seq[Rune]) = while grid.len <= y: grid.add(newSeq[FlexibleCell]()) -- cgit 1.4.1-2-gfad0 ef='/danisanti/profani-tty/log/src/config/accounts.c'>log blame commit diff stats
path: root/src/config/accounts.c
blob: 385e86f34d480322e69a826c29e7e49063399326 (plain) (tree)
1
2
3
4