Commit Graph

198 Commits

Author SHA1 Message Date
Jonathan Daugherty
8689dd6947 Add a suspend/resume demo program 2015-06-28 23:45:04 -07:00
Jonathan Daugherty
64a1e3edf5 Remove pointless padding operations from full UI in padding demo 2015-06-28 23:07:32 -07:00
Jonathan Daugherty
aac772d573 Remove stale fill benchmarks 2015-06-28 23:05:25 -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
2e3bef7f8e Add resizeOrQuit for easy simple event handling 2015-06-28 22:40:12 -07:00
Jonathan Daugherty
52bf9ec288 Clean up attribute management combinators, use attribute names instead of attributes 2015-06-28 22:08:54 -07:00
Jonathan Daugherty
9ec2d7eb7b Border: add function to build border style from a character 2015-06-28 21:28:55 -07:00
Jonathan Daugherty
8d93c71f03 Expand box benchmarks 2015-06-28 21:04:57 -07:00
Jonathan Daugherty
e2cfcb3b9f Add beginnings of a benchmark suite 2015-06-28 21:00:46 -07:00
Jonathan Daugherty
349d682512 Use more explicit imports in markup demo 2015-06-28 20:18:59 -07:00
Jonathan Daugherty
47da95a36b Add markup demo 2015-06-28 20:16:51 -07:00
Jonathan Daugherty
0faa130f13 List demo improvements 2015-06-28 20:05:30 -07:00
Jonathan Daugherty
6c762fb95b Simplify edit demo application state 2015-06-28 13:24:36 -07:00
Jonathan Daugherty
34e14bf1dd Simplify list demo application state 2015-06-28 13:22:05 -07:00
Jonathan Daugherty
549c4b8663 Improve list demo 2015-06-28 13:15:15 -07:00
Jonathan Daugherty
dc5b8f51e2 Add list demo 2015-06-28 13:06:22 -07:00
Jonathan Daugherty
4f55085a1a Make simpleMain interface as simple as possible 2015-06-28 12:48:39 -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
a1a7a4d5f0 Simplify minimal demo 2015-06-28 12:36:16 -07:00
Jonathan Daugherty
2857be7b10 Rename event demo 2015-06-28 12:34:39 -07:00
Jonathan Daugherty
6cbe25962a Add custom style to border demo 2015-06-28 12:31:44 -07:00
Jonathan Daugherty
141586a086 Minor border demo improvements 2015-06-28 12:25:21 -07:00
Jonathan Daugherty
b643cd9249 Minor border demo improvement 2015-06-28 12:21:58 -07:00
Jonathan Daugherty
6bee7578d9 Minor border demo improvements 2015-06-28 12:21:44 -07:00
Jonathan Daugherty
4f3039b093 Update border demo to show all border features 2015-06-28 12:20:40 -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
0ba00780c0 Add TerminalLocation interface for Location-like things and use it 2015-06-28 11:35:28 -07:00
Jonathan Daugherty
a4ed1dda89 Make editor fields lenses and export them 2015-06-28 11:20:53 -07:00
Jonathan Daugherty
af4ff1dfe1 Rename editStr to editContents 2015-06-28 11:13:04 -07:00
Jonathan Daugherty
4e9de7c80c Make editor interface consistent with list by accepting a content drawing function 2015-06-28 11:02:18 -07:00
Jonathan Daugherty
3bcc144114 Make list fields lenses and export them 2015-06-28 10:58:54 -07:00
Jonathan Daugherty
d49423cc4f Get rid of box rendering priority in favor of using size hints to control rendering order 2015-06-27 16:34:45 -07:00
Jonathan Daugherty
adbcbf72b0 Use text instead of padding in demo 2015-06-27 15:25:19 -07:00
Jonathan Daugherty
6ffc25af75 Rename appMakeEvent 2015-06-25 23:42:52 -07:00
Jonathan Daugherty
585d068364 Add demo program showing how to use custom events 2015-06-25 23:34:20 -07:00
Jonathan Daugherty
552e765ec2 Make main customizable by specifying the event channel 2015-06-25 23:22:22 -07:00
Jonathan Daugherty
d696dfb58b Add suspend-and-resume capability to perform IO without losing application or terminal state 2015-06-25 12:58:32 -07:00
Jonathan Daugherty
146fde46d0 Edit: export editStr, show in demo program 2015-06-24 21:26:44 -07:00
Jonathan Daugherty
258f04ebe3 Make event handlers return whether to continue or shut down, return final application state 2015-06-24 21:24:58 -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
a73b7f70f4 Rename Render to Widget and make it a record type whose field is the rendering function 2015-06-24 20:34:35 -07:00
Jonathan Daugherty
64873a2cae borders: take an arbitrary rendering as the border label instead of requiring a text value 2015-06-21 13:56:27 -07:00
Jonathan Daugherty
074aff9b3a txt now takes a Text value, str takes a String 2015-06-21 13:47:47 -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
33d5ce42f4 Use and export a horizontal border label attribute name 2015-06-15 13:32:10 -07:00
Jonathan Daugherty
895b47cd6a Remove unused language extensions from minimal demo 2015-06-15 12:10:26 -07:00
Jonathan Daugherty
f75ce3c7ee Support hierarchical attribute fallback in map lookup, assign attribute hierarchy to border elements 2015-06-14 17:23:27 -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
a4fbfd4d29 Remove @@ operator from core library in favor of markup operator 2015-06-14 13:16:57 -07:00
Jonathan Daugherty
4af5dc1408 Rename useAttr to withAttr and add @@ operator to do the same 2015-06-07 22:50:08 -07:00
Jonathan Daugherty
1d804c5249 Clean up demo combinators, make vLimit implicit in editors 2015-06-07 20:51:56 -07:00
Jonathan Daugherty
614724f555 centering: make centering combinators support filled or unfilled padding so centered drawings are layer-friendly 2015-06-07 20:38:07 -07:00
Jonathan Daugherty
d1bc47bd71 demo: simplify usage of layout combinators 2015-06-07 20:37:32 -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
5c7c424936 Update edit widget API to use similar naming convention as list 2015-06-07 19:28:16 -07:00
Jonathan Daugherty
3183798952 Use more consistent naming convention for list API 2015-06-07 19:27:35 -07:00
Jonathan Daugherty
4267a809f2 Rename translate to translateBy to avoid import clashes with Vty.translate 2015-06-07 19:27:20 -07:00
Jonathan Daugherty
286ce1d820 Unify cursor names and regular names and use editor and list names to name viewports 2015-06-07 18:52:04 -07:00
Jonathan Daugherty
999d45a632 During rendering, make cropping a caller responsibility to permit last-minute cropping and better support for layers; update rogue demo; add centerAbout; export Context and its lenses; use better box layout for demo UI 2015-06-07 18:37:36 -07:00
Jonathan Daugherty
aa18aba79d Get rid of now-unused type variable on Render type 2015-06-07 17:36:50 -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
Jonathan Daugherty
bbd178ef20 Rename Prim to Render 2015-05-29 18:22:12 -07:00
Jonathan Daugherty
d17754b35f Rename with to withLens 2015-05-25 22:05:32 -07:00
Jonathan Daugherty
c5ccbfcdfe Make prim-building happen in a state monad over underlying data model 2015-05-25 18:07:20 -07:00
Jonathan Daugherty
44e211d18f Export list moveBy and use in demo 2015-05-24 12:11:27 -07:00
Jonathan Daugherty
debe0e4653 Make list/edit draw functions build outer prims and take a lens for list/edit access 2015-05-19 20:43:15 -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
94b891ee6b Add ctrl-arrow note 2015-05-18 21:58:56 -07:00
Jonathan Daugherty
1f91ed32ff Improve translation prim, add translation demo 2015-05-18 21:58:16 -07:00
Jonathan Daugherty
5a75e0a7b5 Update UI 2015-05-18 21:52:26 -07:00
Jonathan Daugherty
54f26d9ba5 Remove "ed" suffix from bordering and centering functions 2015-05-18 21:48:02 -07:00
Jonathan Daugherty
c9c4b611fb Make demo UI a little more interesting 2015-05-18 21:18:51 -07:00
Jonathan Daugherty
9d3367e46a Just use a single style keybinding in the demo 2015-05-18 21:09:59 -07:00
Jonathan Daugherty
cb61befb03 Syntax nit 2015-05-18 21:07:55 -07:00
Jonathan Daugherty
f277551e88 Improve border function argument ordering 2015-05-18 21:03:48 -07:00
Jonathan Daugherty
188883dfdb Shorten border style names 2015-05-18 21:01:59 -07:00
Jonathan Daugherty
0357bd22ce Demo: show different border styles 2015-05-18 20:59:58 -07:00
Jonathan Daugherty
900bc295c8 Make bordered widgets skinnable 2015-05-18 19:10:28 -07:00
Jonathan Daugherty
2809fd4a19 Rename Name to CursorName since that is what it is 2015-05-18 18:53:34 -07:00
Jonathan Daugherty
1df6668712 Get rid of unused list name 2015-05-18 18:51:06 -07:00
Jonathan Daugherty
4b0e192a90 Code cleanup and rename WithState to With 2015-05-18 18:44:28 -07:00
Jonathan Daugherty
af99a58e23 Make resizing happen during rendering by using state lenses provided in Prim constructors 2015-05-18 18:39:10 -07:00
Jonathan Daugherty
2bade50c6c Make WithState transition state types 2015-05-18 14:14:13 -07:00
Jonathan Daugherty
8ee03756d0 Experiment with approaches for improving state management during rendering 2015-05-18 14:10:00 -07:00
Jonathan Daugherty
42fb2ae811 Main: cleanup 2015-05-18 08:38:30 -07:00
Jonathan Daugherty
bcaf01dd55 Fix broken references to Center module 2015-05-17 19:37:25 -07:00
Jonathan Daugherty
2086c43c97 Split library up into modules 2015-05-17 18:41:38 -07:00
Jonathan Daugherty
7836dd94d2 Resolve warning 2015-05-17 10:01:23 -07:00
Jonathan Daugherty
cd453949e1 Demo list is initially empty 2015-05-17 09:57:13 -07:00
Jonathan Daugherty
ddfe28610a Append to list in demo 2015-05-17 09:55:37 -07:00