Add a basic fill demonstration program

This commit is contained in:
Jonathan Daugherty 2017-08-02 15:55:09 -07:00
parent b8af7dcd85
commit c7182aa448
2 changed files with 25 additions and 0 deletions

View File

@ -286,6 +286,19 @@ executable brick-custom-event-demo
microlens >= 0.3.0.0,
microlens-th
executable brick-fill-demo
if !flag(demos)
Buildable: False
hs-source-dirs: programs
ghc-options: -threaded -Wall -fno-warn-unused-do-bind -O3
default-language: Haskell2010
main-is: FillDemo.hs
build-depends: base <= 5,
brick,
vty >= 5.15,
text,
microlens
executable brick-hello-world-demo
if !flag(demos)
Buildable: False

12
programs/FillDemo.hs Normal file
View File

@ -0,0 +1,12 @@
module Main where
import Brick
ui :: Widget ()
ui = vBox [ str "This text is at the top."
, fill ' '
, str "This text is at the bottom."
]
main :: IO ()
main = simpleMain ui