Add Layout widget (#1041)

* Add width to panels
* Add height to panels
* Replace RenderContext with RenderOptions
* Remove exclusivity from alternative buffer
* Add Layout widget
* Add Align widget
This commit is contained in:
Patrik Svensson
2022-11-15 10:12:17 +01:00
committed by GitHub
parent 9ce3b99cd6
commit c3ec6a7363
137 changed files with 2651 additions and 387 deletions

View File

@ -0,0 +1,15 @@

┌──────────────┐
│ Hello World! │
└──────────────┘

View File

@ -0,0 +1,15 @@

┌──────────────┐
│ Hello World! │
└──────────────┘

View File

@ -0,0 +1,15 @@
 ┌──────────────┐
│ Hello World! │
└──────────────┘

View File

@ -0,0 +1,15 @@

┌──────────────┐
│ Hello World! │
└──────────────┘

View File

@ -0,0 +1,15 @@

┌──────────────┐
│ Hello World! │
└──────────────┘

View File

@ -0,0 +1,15 @@
┌──────────────┐
│ Hello World! │
└──────────────┘

View File

@ -0,0 +1,15 @@

┌──────────────┐
│ Hello World! │
└──────────────┘

View File

@ -0,0 +1,15 @@

┌──────────────┐
│ Hello World! │
└──────────────┘

View File

@ -0,0 +1,15 @@
 ┌──────────────┐
│ Hello World! │
└──────────────┘

View File

@ -0,0 +1,15 @@
╭─40 x 15──────────────────────────────╮
│ │
│ │
│ │
│ │
│ │
│ │
│ Placeholder │
│ │
│ │
│ │
│ │
│ │
│ │
╰──────────────────────────────────────╯

View File

@ -0,0 +1,15 @@
╭─T1 (40 x 7)──────────────────────────╮
│ │
│ │
│ Placeholder │
│ │
│ │
╰──────────────────────────────────────╯
╭─T2 (40 x 8)──────────────────────────╮
│ │
│ │
│ Placeholder │
│ │
│ │
│ │
╰──────────────────────────────────────╯

View File

@ -0,0 +1,15 @@
╔══════════════════════════════════════╗
║ Hello ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
║ ║
╚══════════════════════════════════════╝

View File

@ -0,0 +1,15 @@
╭─Left (20 x 15)───╮╭─Right (20 x 15)──╮
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ Placeholder ││ Placeholder │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
╰──────────────────╯╰──────────────────╯

View File

@ -0,0 +1,15 @@
╭─L1…────╮╭─L2…────╮╭─R1…────╮╭─R2…────╮
│ ││ ││ ││ │
│ ││ ││ ││ │
│ ││ ││ ││ │
│ ││ ││ ││ │
│ ││ ││ ││ │
│ Placeh ││ Placeh ││ Placeh ││ Placeh │
│ older ││ older ││ older ││ older │
│ ││ ││ ││ │
│ ││ ││ ││ │
│ ││ ││ ││ │
│ ││ ││ ││ │
│ ││ ││ ││ │
│ ││ ││ ││ │
╰────────╯╰────────╯╰────────╯╰────────╯

View File

@ -0,0 +1,15 @@
╭─T1 (40 x 3)──────────────────────────╮
│ Placeholder │
╰──────────────────────────────────────╯
╭─T2 (40 x 4)──────────────────────────╮
│ Placeholder │
│ │
╰──────────────────────────────────────╯
╭─B1 (40 x 4)──────────────────────────╮
│ Placeholder │
│ │
╰──────────────────────────────────────╯
╭─B2 (40 x 4)──────────────────────────╮
│ Placeholder │
│ │
╰──────────────────────────────────────╯

View File

@ -0,0 +1,15 @@
╭─A (20 x 3)───────╮╭─B (20 x 3)───────╮
│ Placeholder ││ Placeholder │
╰──────────────────╯╰──────────────────╯
╭─C (20 x 4)───────╮╭─D (20 x 4)───────╮
│ Placeholder ││ Placeholder │
│ ││ │
╰──────────────────╯╰──────────────────╯
╭─E (20 x 4)───────╮╭─F (20 x 4)───────╮
│ Placeholder ││ Placeholder │
│ ││ │
╰──────────────────╯╰──────────────────╯
╭─G (20 x 4)───────╮╭─H (20 x 4)───────╮
│ Placeholder ││ Placeholder │
│ ││ │
╰──────────────────╯╰──────────────────╯

View File

@ -0,0 +1,15 @@
╭─Left (30 x 15)─────────────╮╭─Right…─╮
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ Placeh │
│ Placeholder ││ older │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
╰────────────────────────────╯╰────────╯

View File

@ -0,0 +1,15 @@
╭─Left (30 x 15)─────────────╮╭─Right…─╮
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ Placeh │
│ Placeholder ││ older │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
╰────────────────────────────╯╰────────╯

View File

@ -0,0 +1,15 @@
╭─Left (28 x 15)───────────╮╭─Right…───╮
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ Placehol │
│ Placeholder ││ der │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
│ ││ │
╰──────────────────────────╯╰──────────╯

View File

@ -0,0 +1,15 @@
╭─Top (40 x 7)─────────────────────────╮
│ │
│ │
│ Placeholder │
│ │
│ │
╰──────────────────────────────────────╯
╭─Bottom (40 x 8)──────────────────────╮
│ │
│ │
│ Placeholder │
│ │
│ │
│ │
╰──────────────────────────────────────╯

View File

@ -0,0 +1,15 @@
╭─B (40 x 3)───────────────────────────╮
│ Placeholder │
╰──────────────────────────────────────╯
╭─C (20 x 4)───────╮╭─D (20 x 4)───────╮
│ Placeholder ││ Placeholder │
│ ││ │
╰──────────────────╯╰──────────────────╯
╭─E (20 x 4)───────╮╭─F (20 x 4)───────╮
│ Placeholder ││ Placeholder │
│ ││ │
╰──────────────────╯╰──────────────────╯
╭─G (40 x 4)───────────────────────────╮
│ Placeholder │
│ │
╰──────────────────────────────────────╯

View File

@ -0,0 +1,25 @@
┌───────────────────┐
│ Hello World │
│ Hello Hello Hello │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└───────────────────┘

View File

@ -0,0 +1,3 @@
┌───────────────────────┐
│ Hello World │
└───────────────────────┘

View File

@ -0,0 +1,25 @@
┌────────────────────────────────────────────────┐
│ Hello World │
│ Hello Hello Hello │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────┘

View File

@ -0,0 +1,3 @@
┌──────────────────┐
│ Hello World │
└──────────────────┘

View File

@ -0,0 +1,6 @@
 ┌────────┬────────┬───────┐
│ Foo │ Bar │ Baz │
├────────┼────────┼───────┤
│ Qux │ Corgi │ Waldo │
│ Grault │ Garply │ Fred │
└────────┴────────┴───────┘

View File

@ -0,0 +1,6 @@
┌────────┬────────┬───────┐
│ Foo │ Bar │ Baz │
├────────┼────────┼───────┤
│ Qux │ Corgi │ Waldo │
│ Grault │ Garply │ Fred │
└────────┴────────┴───────┘

View File

@ -0,0 +1,6 @@
 ┌────────┬────────┬───────┐
│ Foo │ Bar │ Baz │
├────────┼────────┼───────┤
│ Qux │ Corgi │ Waldo │
│ Grault │ Garply │ Fred │
└────────┴────────┴───────┘