Commit Graph

833 Commits

Author SHA1 Message Date
Jonathan Daugherty
97fde33674 Update CHANGELOG for #15 2015-08-24 08:38:09 -07:00
Jonathan Daugherty
3c95a8c882 Whitespace 2015-08-24 08:37:08 -07:00
Jonathan Daugherty
e4ccca052c Merge pull request #15 from eigengrau/space-leak
Address space leaks in renderFinal and str
2015-08-24 08:34:07 -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
Sebastian Reuße
8e1d7f4810 Internal: force-evaluate the new render state.
Widgets might retain computations which are not actually needed to render
the image (e. g., the text widget might contain more lines than can be shown
on screen). This seems to leak space as it is left unclear that computations
needed to render the current frame will not be needed anymore after the
image is shown.
2015-08-24 13:51:47 +02:00
Jonathan Daugherty
5314a68477 Core: when rendering viewports, process scroll requests first, then visibility requests 2015-08-21 20:29:06 -07:00
Jonathan Daugherty
5d9036f934 List: use vector length explicitly 2015-08-20 09:12:55 -07:00
Jonathan Daugherty
717186ef5e List: add support for Home/End keys 2015-08-20 08:46:05 -07:00
Jonathan Daugherty
1950bc01de Core: remove multiline string and text functions in favor of catch-all versions 2015-08-20 08:36:39 -07:00
Jonathan Daugherty
6f09859882 guide: typo 2015-08-19 23:37:40 -07:00
Jonathan Daugherty
c6340a51b6 docs: add Makefile for slightly easier documentation development 2015-08-19 23:36:19 -07:00
Jonathan Daugherty
dc9cee623d Add convenience Brick module and simplify basic demo program 2015-08-19 23:13:07 -07:00
Jonathan Daugherty
639fbd2964 User guide updates reflecting changes to module layout and changes in EventM 2015-08-19 23:05:42 -07:00
Jonathan Daugherty
072c03b11d cabal file: update example program in haddock 2015-08-19 22:49:05 -07:00
Jonathan Daugherty
1729a43b82 Core: add growth policy details to haddock for more functions 2015-08-19 22:48:25 -07:00
Jonathan Daugherty
1a1d938ed7 Core: add growth policy details to haddock for padding functions 2015-08-19 22:38:06 -07:00
Jonathan Daugherty
ccb1841dd6 Types: improve haddock organization of module contents 2015-08-19 22:34:21 -07:00
Jonathan Daugherty
a70813b08c List: remove language about item height from render function haddock 2015-08-19 22:28:56 -07:00
Jonathan Daugherty
b391bedb0c List: update haddock for handled events 2015-08-19 22:28:11 -07:00
Jonathan Daugherty
fb8dc330bc Types: implement handleEventLensed 2015-08-19 22:26:25 -07:00
Jonathan Daugherty
b05f9fd414 Markup: remove stale import 2015-08-19 22:15:16 -07:00
Jonathan Daugherty
1b76bf95ba EventM: haddock improvement 2015-08-19 22:00:18 -07:00
Jonathan Daugherty
78d54f8b46 Next: better docs 2015-08-19 21:56:49 -07:00
Jonathan Daugherty
508bd3260b Minor haddock improvement 2015-08-19 21:55:25 -07:00
Jonathan Daugherty
9c5af1625f Viewport: haddock 2015-08-19 21:51:59 -07:00
Jonathan Daugherty
95778e4395 lookupViewport: haddock 2015-08-19 21:50:49 -07:00
Jonathan Daugherty
9d686a516a List: add support for page up and page down key events using viewport state retrieval 2015-08-19 21:48:12 -07:00
Jonathan Daugherty
b39a1bb168 Types: export the Viewport type and lenses 2015-08-19 21:47:52 -07:00
Jonathan Daugherty
ede945f48d EventM: run as a reader transformer over the map of recent viewport state 2015-08-19 21:47:38 -07:00
Jonathan Daugherty
1671c3732c List: pass the item height to the constructor instead of the draw function to make it available to event handlers 2015-08-19 21:46:55 -07:00
Jonathan Daugherty
ee64f2faf4 Merge branch 'master' into feature/eventm-change 2015-08-19 20:04:09 -07:00
Jonathan Daugherty
37e11e74b8 Whitespace 2015-08-19 20:03:59 -07:00
Jonathan Daugherty
f829b4370c Monoid import fixes needed for older GHCs 2015-08-19 20:03:42 -07:00
Jonathan Daugherty
0f84d19cdf API: handleEvent now runs in EventM 2015-08-19 19:52:34 -07:00
Jonathan Daugherty
736a81de97 API: move EventM and Next to Brick.Types 2015-08-19 19:48:55 -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
32b2740409 Edit: use multilineStr to render editors (fixes #8) 2015-08-19 09:21:35 -07:00
Jonathan Daugherty
682e749636 TODO: add notes 2015-08-18 13:17:21 -07:00
Jonathan Daugherty
c4759f0ba2 List: haddock typo 2015-08-18 13:12:39 -07:00
Jonathan Daugherty
693abbb345 List: refactor rendering routine to only render the items in view (fixes #7)
- Changes renderList to expect an item height and all rendered items
  must match this height
- Uses vector slicing to efficiently get the sub-list of items to be
  rendered
- Renders 2 * H items at time instead of all N, where H is the height of
  the list's viewport
2015-08-18 13:06:36 -07:00
Jonathan Daugherty
74aa344564 ListDemo: missing uses of Vector API 2015-08-18 09:39:58 -07:00
Jonathan Daugherty
5b5db6feaf List: missing uses of Vector API 2015-08-18 09:10:15 -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
d7bf9e1c97 List: instead of passing the draw function to the constructor, we pass it at rendering time 2015-08-17 22:19:08 -07:00
Jonathan Daugherty
d33181ed0b Make str and txt single-line only and add slower multiline variants 2015-08-17 21:13:00 -07:00
Jonathan Daugherty
473a5e11b5 README: use absolute URLs for links to support linking from Hackage 2015-08-12 09:19:04 -07:00
Jonathan Daugherty
521d662786 Edit: fix module docstring now that editors are multi-line 2015-08-11 18:24:07 -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
e0830de4c1 README: mention FAQ first 2015-08-10 13:06:48 -07:00