Commit Graph

179 Commits

Author SHA1 Message Date
Jonathan Daugherty
aea55a2225 Relax dependency on deepseq to include 1.3 to support GHC 7.8 2015-08-24 08:45:36 -07:00
Sebastian Reuße
6330a59ff5 str: avoid thunk-buildups.
When processing lines, only reference computations which are needed
in the given context. In particular, don’t build up thunks for columns
and lines which cannot be shown.

While «renderFinal» forces unused computations to be garbage-collected,
as of 8e1d7f4, not building up thunks here will save the GC some work.
2015-08-24 14:59:39 +02:00
Jonathan Daugherty
dc9cee623d Add convenience Brick module and simplify basic demo program 2015-08-19 23:13:07 -07:00
Jonathan Daugherty
072c03b11d cabal file: update example program in haddock 2015-08-19 22:49:05 -07:00
Jonathan Daugherty
35aa2ad8a4 Monster patch: move most data types to Brick.Types, remove IsString
instance for Widget

- This makes the module layout more predictable since Brick.Widgets.Core
  now (mostly) only contains widgets and widget transformations
- Utility functions closely related to types are now in Brick.Types
- Brick.Types.Internal contains types used internal by the renderer,
  some are re-exported by Brick.Types
2015-08-19 19:40:06 -07:00
Jonathan Daugherty
14d2147c85 List: use Vector instead of [] to manage elements to improve performance 2015-08-17 23:33:47 -07:00
Jonathan Daugherty
69503f6641 Depend on vty 5.3.1 2015-08-11 16:00:45 -07:00
Jonathan Daugherty
47ef979221 Increase vty bound to 5.3 and remove comment about now-fixed bug 2015-08-11 15:32:12 -07:00
Jonathan Daugherty
1c79445592 Include user guide and readme in package 2015-08-09 12:57:05 -07:00
Jonathan Daugherty
5256ec57c4 cabal: add vty-ui deprecation notice 2015-08-08 21:19:38 -07:00
Jonathan Daugherty
5f6df6dbc4 Remove stale demo 2015-08-06 19:26:22 -07:00
Jonathan Daugherty
90066b51ca More cabal file improvements 2015-08-06 19:25:11 -07:00
Jonathan Daugherty
31a689c62e Seed changelog 2015-08-06 19:19:02 -07:00
Jonathan Daugherty
e4e62a1d04 Update package description and add hello, world demo 2015-08-06 19:10:47 -07:00
Jonathan Daugherty
e631ed7a63 Update string handling to account for Vty change where empty strings have zero height 2015-07-30 10:52:20 -07:00
Jonathan Daugherty
c35e20196b Add support for multi-line editors
- Changes the editor constructor to take a line limit
- Changes the editor drawing function to take [String] instead of String
- Changes the editor to use a viewport that scrolls both horizontally
  and vertically
- Uses the latest text-zipper release (so cabal update)
2015-07-20 18:10:50 -07:00
Jonathan Daugherty
f930210777 Move toward suffixing all lenses with L 2015-07-19 12:08:00 -07:00
Jonathan Daugherty
4fde0b4f7d Add support for viewports that scroll both vertically and horizontally, add visibility demo 2015-07-17 19:30:42 -07:00
Jonathan Daugherty
2d98be2225 Only build "brick" if demos flag is set 2015-07-13 09:06:12 -07:00
Jonathan Daugherty
eb99d0d8f4 Only build demonstration programs if demos flag is set 2015-07-12 22:34:09 -07:00
Jonathan Daugherty
952b2bdf2e Add progress bar widget 2015-07-12 17:47:24 -07:00
Jonathan Daugherty
f79da4ea2b Remove benchmark suite and dependencies 2015-07-11 16:17:42 -07:00
Jonathan Daugherty
ad9cffc2b7 Remove Vty rogue demo 2015-07-10 13:26:06 -07:00
Jonathan Daugherty
b718a68986 Edit: use text-zipper to generalize editing functionality and simplify API 2015-07-09 14:32:20 -07:00
Jonathan Daugherty
5c70ddd775 Merge pull request #4 from FranklinChen/update-base-bound
Support GHC 7.10 and add support for travis-ci builds
2015-07-09 11:52:55 -07:00
Franklin Chen
b9be0503e7 Add explicit base bound. 2015-07-09 14:13:21 -04:00
Jonathan Daugherty
2e13a1cde5 Add viewport scrolling demo 2015-07-09 11:03:48 -07:00
Franklin Chen
131ca49aa7 Remove restrictive base bound. 2015-07-09 13:45:58 -04:00
Jonathan Daugherty
dfb999132b Add a dialog type and demo 2015-07-08 14:47:48 -07:00
Jonathan Daugherty
91c4504ce4 README / cabal language updates 2015-07-08 13:39:17 -07:00
Jonathan Daugherty
5325e60281 Update package metadata 2015-07-07 22:28:51 -07:00
Jonathan Daugherty
ec00731eaf Update LICENSE and package description 2015-07-07 21:01:23 -07:00
Jonathan Daugherty
8f4be27ec7 Reorder modules in cabal file 2015-07-07 19:44:07 -07:00
Jonathan Daugherty
b6aed19c51 Update package metadata 2015-07-07 19:43:32 -07:00
Jonathan Daugherty
19f5650a1b Merge the "Brick.Merge" module into Brick.List 2015-07-07 19:42:56 -07:00
Jonathan Daugherty
201dfdc4a3 Rename Brick.Core to Brick.Types 2015-07-07 17:00:42 -07:00
Jonathan Daugherty
32c82d0754 Update rogue demo to translate the player rather than using spaces to center it to avoid layer opacity issues 2015-07-03 16:02:35 -07:00
Jonathan Daugherty
149ab2d58b Add a layer demo program 2015-07-03 15:49:33 -07:00
Jonathan Daugherty
19221e6a6f Turn on optimization in demo programs 2015-07-03 15:48:46 -07:00
Jonathan Daugherty
8689dd6947 Add a suspend/resume demo program 2015-06-28 23:45:04 -07:00
Jonathan Daugherty
c763aa1761 Replace directional fills with padding combinators, add padding demo program 2015-06-28 23:04:27 -07:00
Jonathan Daugherty
6a1160c111 Rename event demo 2015-06-28 22:43:52 -07:00
Jonathan Daugherty
7aa4e264a4 Add attribute handling demo program 2015-06-28 22:40:25 -07:00
Jonathan Daugherty
e2cfcb3b9f Add beginnings of a benchmark suite 2015-06-28 21:00:46 -07:00
Jonathan Daugherty
47da95a36b Add markup demo 2015-06-28 20:16:51 -07:00
Jonathan Daugherty
dc5b8f51e2 Add list demo 2015-06-28 13:06:22 -07:00
Jonathan Daugherty
7461901679 Add editor demo 2015-06-28 12:45:26 -07:00
Jonathan Daugherty
e24f2c438e Rename minimal demo to hello world demo 2015-06-28 12:37:24 -07:00
Jonathan Daugherty
2857be7b10 Rename event demo 2015-06-28 12:34:39 -07:00
Jonathan Daugherty
ffbf2d89c6 Add demonstration program for borders 2015-06-28 12:15:55 -07:00
Jonathan Daugherty
700081f7cd Change list/edit lens naming convention to use L suffix
- Lenses for edit and list widgets now have L suffixes, e.g.
  editorNameL
- Non-lens equivalents for edit and list field accessors are now
  exported for non-lens use cases
- suffixLenses is added as an alternative to makeLenses for building
  these lenses
2015-06-28 11:57:38 -07:00
Jonathan Daugherty
585d068364 Add demo program showing how to use custom events 2015-06-25 23:34:20 -07:00
Jonathan Daugherty
0c978dc150 Improve module hierarchy further 2015-06-24 20:58:34 -07:00
Jonathan Daugherty
089f9ae41f Improve module hierarchy 2015-06-24 20:54:32 -07:00
Jonathan Daugherty
7308855d93 Add support for scrollable viewports by making scroll requests in event handlers rather than using render-time visibility requests 2015-06-20 15:02:54 -07:00
Jonathan Daugherty
73a337be4d Support using arbitrary functions to render editor contents; improve Markup interface to work more easily with editors; add demonstration of using markup with editors 2015-06-15 20:26:29 -07:00
Jonathan Daugherty
a029ffe423 Adds support for attribute mapping
- App now provides appAttrMap which extracts an attribute map from
  the application state.  This enables the application to dictate
  which attributes get used for which things.
- Updates list and edit components to use the attribute map to select
  attributes.
- Updates the markup implementation to support either direct attriubute
  specification or indirect via mapped names.
- Updates the demos to show how to use attribute name maps.
- Renames and adds some core library combinators to support using either
  names or attributes.
2015-06-14 16:14:35 -07:00
Jonathan Daugherty
9ad150df47 Add experimental text attribute markup module 2015-06-14 13:23:58 -07:00
Jonathan Daugherty
4e7da0792f Make border style part of the rendering context and expose functions to get or change it; update border functions so they implicitly use the style in the context 2015-06-07 19:40:49 -07:00
Jonathan Daugherty
52c1fe032e Make the rogue demo buildable again 2015-06-07 18:41:59 -07:00
Jonathan Daugherty
5aac657d2f Get rid of scrolling wrappers, replace with viewport abstraction and primitives 2015-06-07 17:33:34 -07:00
Jonathan Daugherty
b409e7f4a8 Rename Prim module hierarchy 2015-05-29 18:25:46 -07:00
Jesse Hallett
d8538b10db Implements listReplace - replaces list content while preserving selected index 2015-05-26 03:00:56 -07:00
Jonathan Daugherty
76a7fc83c8 Add support for scrolling to windows rather than points and add support for variably-sized list prims 2015-05-19 19:28:22 -07:00
Jonathan Daugherty
0c7914175a Merge simple demo 2015-05-19 10:25:12 -07:00
Jonathan Daugherty
2af0357d46 Add ultra-minimal demo program 2015-05-19 10:23:58 -07:00
Jonathan Daugherty
00baf3ad1e Update cabal author/maintainer 2015-05-18 19:37:11 -07:00
Jonathan Daugherty
efcaac93df Enable -O3 ghc option 2015-05-18 19:36:35 -07:00
Jonathan Daugherty
8ee03756d0 Experiment with approaches for improving state management during rendering 2015-05-18 14:10:00 -07:00
Jonathan Daugherty
0a0bad0b9c Move private rendering implementation to internal module 2015-05-17 19:37:43 -07:00
Jonathan Daugherty
2086c43c97 Split library up into modules 2015-05-17 18:41:38 -07:00
Jonathan Daugherty
a66995aeb9 Move utility functions to a module 2015-05-17 18:04:36 -07:00
Jonathan Daugherty
15baa4252d Prim hacking 2015-05-15 22:03:53 -07:00
Jonathan Daugherty
830cdb695e Use lenses in test program 2015-05-11 07:55:48 -07:00
Jonathan Daugherty
2b76a75d16 Add ported version of vty rogue demo 2015-05-10 16:57:53 -07:00
Jonathan Daugherty
a78e9cdf7d Add default instance for app 2015-05-09 09:56:14 -07:00
Jonathan Daugherty
be5ae586b7 Use Data.Default and package rendering results for easier processing 2015-05-09 09:43:40 -07:00
Jonathan Daugherty
a991cdc789 Add support for named and anonymous cursors 2015-05-09 00:45:46 -07:00
Jonathan Daugherty
c47109dc13 Initial commit 2015-05-08 23:09:40 -07:00