lambox: Text User Interface library for Haskell

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

LamBox is a package built around the haskell ncurses bindings library to provide a high level tool that allows the creation of simple static or dynamic terminal based text user interfaces. Its main purpose is to streamline the process of creating a user interface and eliminate a lot of the boilerplate required to get ncurses up and running.

Much of this library acts within the ncurses Curses monad, which in itself is a wrapper around IO. The purpose of this library is to provide a higher level wrapper around ncurses to remove much of the boilerplate required to set up a tui, and to make building a tui a bit simpler. This library is meant to be used in conjuction with ncurses, as importing UI.NCurses is required to use the Event type, for instance.

Example:

{-# LANGUAGE OverloadedStrings #-}

module Main where

import UI.NCurses (Event(..))
import UI.Lambox

main :: IO ()
main = lambox $ do
  (box1,box2) <- do
    (b1,b2) <- splitBox config Vertical 0.5
    nb1 <- withBox b1
      [ setTitle (Just title)
      , writeStr 2 2 "Hello World!"
      ]
    nb2 <- writeStr' b2 2 2 "Press 'q' to quit!"
    pure (nb1, nb2)
  update
  waitForGlobal (== EventCharacter 'q')
  deleteBoxes [box1, box2]
  where
    title = Title "LamBox" AlignTop AlignRight
    config = Config 2 2 22 10 (BoxAttributes Line Nothing) ""

Properties

Versions 0.1.0.0
Change log CHANGELOG.md
Dependencies base (>=4.12.0.0 && <4.13), lambox, ncurses (>=0.2.16 && <0.3), text (>=1.2.3 && <1.3) [details]
License Zlib
Copyright 2019 Daniel Grinshpon
Author grinshpon
Maintainer grinshpondaniel@protonmail.com
Category Development
Source repo head: git clone https://github.com/Grinshpon/lambox
Uploaded by Grinshpon at 2019-08-08T13:47:00Z

Modules

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees