2015-06-29 09:04:27 +03:00
|
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
module Main where
|
|
|
|
|
|
|
|
import Data.Default
|
|
|
|
import Graphics.Vty
|
|
|
|
|
|
|
|
import Brick.Main
|
|
|
|
import Brick.Widgets.Core
|
|
|
|
import Brick.Widgets.Border
|
|
|
|
import Brick.Widgets.Center
|
|
|
|
|
|
|
|
ui :: Widget
|
|
|
|
ui =
|
|
|
|
vBox [ hBox [ padLeft $ vCenter "Left-padded"
|
|
|
|
, vBorder
|
|
|
|
, padRight $ vCenter "Right-padded"
|
|
|
|
]
|
|
|
|
, hBorder
|
|
|
|
, hBox [ padTop $ hCenter "Top-padded"
|
|
|
|
, vBorder
|
|
|
|
, padBottom $ hCenter "Bottom-padded"
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
app :: App () Event
|
|
|
|
app =
|
2015-06-29 09:07:32 +03:00
|
|
|
App { appDraw = const [ui]
|
2015-06-29 09:04:27 +03:00
|
|
|
, appHandleEvent = resizeOrQuit
|
2015-07-01 05:15:29 +03:00
|
|
|
, appStartEvent = return
|
2015-06-29 09:04:27 +03:00
|
|
|
, appAttrMap = const def
|
|
|
|
, appChooseCursor = neverShowCursor
|
|
|
|
, appMakeVtyEvent = id
|
|
|
|
}
|
|
|
|
|
|
|
|
main :: IO ()
|
|
|
|
main = defaultMain app ()
|