Commit Graph

898 Commits

Author SHA1 Message Date
Steven van den Broek
5cffb1b403
Fix directories not showing up with fileExtensionMatch 2020-01-27 21:25:07 +01:00
Brian Wignall
23261c6993 Fix typos 2019-11-29 14:43:38 -05:00
Kevin Quick
0392ef52e0
Fixes Issue #251: recursive symlinks hang the FileBrowser Widget. 2019-11-15 11:31:00 -08:00
Róman Joost
86aaf7e77d Focus: provide a size function
This patch adds a function returning the length of the focus ring. That
is the size returned by the underlying circular list.

Fixes https://github.com/jtdaugherty/brick/issues/249
2019-10-31 06:08:52 +10:00
Jonathan Daugherty
e0fdfc7786 BChan: add writeBChanNonBlocking, raise STM lower bound to 2.4.3 2019-09-13 10:20:12 -07:00
Jonathan Daugherty
5baad2bc63 Whitespace 2019-09-13 10:17:10 -07:00
Jonathan Daugherty
f6bbd37be8 FileBrowser: allow browsing of symlinks if they point to directories 2019-08-30 15:47:54 -07:00
Jonathan Daugherty
df89a58eec Edit: support EvPaste Vty events by default, assuming UTF-8 encoding of pasted bytes 2019-08-30 12:37:37 -07:00
Jonathan Daugherty
8e7c4a99eb Size: improve documentation 2019-07-12 17:10:09 -07:00
Jonathan Daugherty
0a582fca0b Core: update wrapping functions with size policy info 2019-07-12 17:07:42 -07:00
Jonathan Daugherty
926d317c46 txtWrapWith: always pad to available width to obey Greedy requirement 2019-07-12 17:02:28 -07:00
Jonathan Daugherty
28a6e377de
Merge pull request #231 from frasertweedale/ci/cabal-3.0
fix CI for latest cabal-install; add GHC 8.6 to matrix
2019-05-04 09:11:25 -07:00
Fraser Tweedale
6c0ce46dd7 fix RULES pragma closing delimiter indentation
GHC 7.10 requires the the closing '#-}' delimiter of a multi-line
RULES pragma to be indented.
2019-05-04 20:39:21 +10:00
Fraser Tweedale
3324049c90 refactor many applications of 'view listElementsL'
List / GenericList derives Foldable, which means that in many cases
where 'length (l ^. listElementsL)' was written, we can instead
write 'length l'.  Likewise for 'null'.  Avoid these unnecessary
applications.
2019-05-04 19:10:07 +10:00
Jonathan Daugherty
581964442d customMain: allow caller to pass initial Vty handle, and add customMainWithVty 2019-03-19 08:27:43 -07:00
Jonathan Daugherty
0bd86b97a9 Core: viewport code cleanup (no functionality change) 2019-02-28 10:09:22 -08:00
Jonathan Daugherty
dc0ae4627e Core: add rewrite rules to optimize away nested redundant boxes 2018-12-27 11:07:59 -08:00
Jonathan Daugherty
d0bab0337d List: add cautionary note about lenses 2018-12-26 13:24:17 -08:00
Jonathan Daugherty
77293b548d renderList: add note about forceAttr 2018-12-23 09:07:31 -08:00
Jonathan Daugherty
2f6f7c3e01 Data.Text.Markup: empty -> isEmpty 2018-12-13 16:11:54 -08:00
Fraser Tweedale
bba4320f35 List: add "move to next" function
A common use case is to seek to the next occurrence in the list of
an element matching some predicate (e.g. next unread email).  Add
the 'listFindBy' function to satisfy this use case.

'listFindBy' is lazy.  Also redefine 'listMoveToElement' in terms of
'listFindBy', making it lazy.  This changes the constraints from
(Traversable t) to (Foldable t, Splittable t), which is reasonable.
2018-12-14 08:41:08 +10:00
Jonathan Daugherty
bf0fb2f4c6 Data.Text.Markup: add empty function (fixes #213) 2018-12-13 13:35:10 -08:00
Jan Hrcek
0d27a748ec Remove reference to Default class from haddock 2018-12-13 08:35:22 +01:00
Roman Joost
60b0b1a302
Fix typo in FileBrowser widget documentation 2018-12-09 14:57:04 +10:00
Jonathan Daugherty
f2237887ea Brick.Markup: fix rendering of empty lines (fixes #209) 2018-12-08 14:01:34 -08:00
Jonathan Daugherty
785899a829 Brick.Markup: skip text unpack 2018-12-08 13:56:38 -08:00
Jonathan Daugherty
fb88258970 List: omnibus style/whitespace/haddock/indentation pass 2018-12-08 08:30:49 -08:00
Fraser Tweedale
cd4fed802a List: make listMoveBy lazy
'listMoveBy' was evaluating the whole container, making it (and the
many functions that use it) unusable for applications needing lazy
loading.  Fix the function and add a regression test.
2018-12-08 21:52:32 +10:00
Fraser Tweedale
7e95c111bf List: apply HLint suggestions 2018-12-08 18:38:06 +10:00
Fraser Tweedale
72b7387215 List: include simplified type signatures in haddock
Mention the simplified type signatures when using the 'List' type
synonym.  This should improve the readability and usefulness of the
documentation.

Also do a couple of drive-by doc cleanups and complexity assertions.
2018-12-08 18:36:12 +10:00
Fraser Tweedale
f715cb62f3 List: add class Reversible
Add the 'Reversible' type class and generalise 'listReverse' over
it.  Add instances and QuickCheck properties for Vector and Seq.
2018-12-08 18:34:10 +10:00
Fraser Tweedale
f23b6b1dba List: add instance Splittable Seq
Add an instance of Splittable for Data.Sequence.Seq, and QuickCheck
properties for it.

Add lower bound containers >= 0.5.7, being the version at which the
Semigroup instance was introduced.
2018-12-08 18:33:11 +10:00
Fraser Tweedale
8db170a02b List: abstract container type
Introduce 'GenericList' which abstracts list behaviour over the
container type.  This allows the use of types other than Vector, if
it would suit a particular application (e.g. lazy loading of list
contents).

'List' is retained as a type synonym for backwards compatibility.
For a container type to be usable with 'List', it must have
instances of 'Traversable' and a new type class 'Splittable' which
allows splitting the container at a given index.

Some operations impose additional constraints on the container type:

- listInsert: 'Applicative' and 'Semigroup'
- listRemove: 'Semigroup'
- listClear: 'Monoid'

Fixes: https://github.com/jtdaugherty/brick/issues/201
2018-12-08 18:32:57 +10:00
Fraser Tweedale
dc84681bdb List: fix listMoveBy behaviour when no selection
Add QuickCheck properties for the behaviour described in the
'listMoveBy' haddock, particularly for when there is no current
selection.  Then fix 'listMoveBy' to make the tests pass.
2018-12-08 08:26:27 +10:00
Fraser Tweedale
eafa41a13a List: fix listReplace behaviour on invalid index
Add QuickCheck properties for the behaviour described in the
'listReplace' haddock.  Then fix 'listReplace' to make the tests
pass.
2018-12-08 08:26:27 +10:00
Jonathan Daugherty
c8f79647a8 FileBrowser: bugfixes for multi-selection patch 2018-12-06 13:03:00 -08:00
Jonathan Daugherty
557521a2e1 FileBrowser: support multiple entry selection (fixes #204)
This change adds fileBrowserSelectedAttr to indicate selected entries
and changes the API of fileBrowserSelection to return a list of selected
entries rather than a Maybe. It also adds Space as an input event to
toggle entry selection.
2018-12-06 11:55:24 -08:00
Jonathan Daugherty
73073f00d2 FileBrowser: handle IOExceptions and fix directory scanning
This changes the API of FileBrowser so that FileInfos now have a
FileStatus if a file status could be obtained, or an IOException
otherwise. It also fixes and exposes getFileInfo to properly read file
entries, which fixes symlink status reads.
2018-12-06 11:10:30 -08:00
Jonathan Daugherty
41a4fa5178 FileBrowser: Enter terminates search mode 2018-12-04 08:00:08 -08:00
Jonathan Daugherty
641abc92ed FileBrowser: mention demo program 2018-12-03 11:10:40 -08:00
Jonathan Daugherty
6b91659513 FileBrowser: haddock nits 2018-12-03 11:09:49 -08:00
Jonathan Daugherty
35ca35bd18 FileBrowser: haddock nit 2018-12-03 10:58:06 -08:00
Jonathan Daugherty
796feff75d FileBrowser: update API to let caller control what constitutes a selectable entry 2018-12-03 10:57:10 -08:00
Jonathan Daugherty
a99183f439 FileBrowser: more documentation 2018-12-03 10:42:34 -08:00
Jonathan Daugherty
c9ba96c786 renderFileBrowser cautionary note 2018-12-03 10:35:16 -08:00
Jonathan Daugherty
0172756039 FileBrowser: haddock updates, API nits, and demo improvements 2018-12-03 10:33:47 -08:00
Jonathan Daugherty
c92e32d100 Nit 2018-12-01 09:21:56 -08:00
Jonathan Daugherty
c5fff2f8e0 Nit 2018-12-01 09:21:09 -08:00
Jonathan Daugherty
212d240f31 FileBrowser: various haddock edits 2018-11-30 20:32:24 -08:00
Jonathan Daugherty
cb1580a115 Haddock nits 2018-11-30 20:24:11 -08:00
Jonathan Daugherty
fbc02529e1 FileBrowser: Socket -> UnixSocket 2018-11-30 20:20:22 -08:00
Jonathan Daugherty
efb06a8f61 FileBrowser: factor out common events, add C-n/C-p 2018-11-30 19:52:15 -08:00
Jonathan Daugherty
39d5cc340a FileBrowser: document attributes 2018-11-30 16:08:23 -08:00
Jonathan Daugherty
17730e679c FileBrowser: various API tweaks and documentation updates 2018-11-30 16:06:22 -08:00
Jonathan Daugherty
800b8add22 FileBrowser: expose search state, update demo dispatch 2018-11-30 15:16:35 -08:00
Jonathan Daugherty
116452620e FileBrowser: only rescan directory on dir change, not search change 2018-11-30 14:56:06 -08:00
Jonathan Daugherty
e5da55e5ab FileBrowser: add search support 2018-11-30 14:39:14 -08:00
Jonathan Daugherty
eca517f480 FileBrowser: use proper attributes depending on focus state 2018-11-30 13:38:58 -08:00
Jonathan Daugherty
f74cd326a5 FileBrowser: improve info display and directory rendering 2018-11-30 13:36:17 -08:00
Jonathan Daugherty
df4a70da1f FileBrowser: show current file info in footer 2018-11-30 11:49:08 -08:00
Jonathan Daugherty
4289e87b6b FileBrowser: do info filtering in setCurrentDirectory, not entriesForDirectory 2018-11-30 11:27:01 -08:00
Jonathan Daugherty
1adaddce7f FileBrowser: add attribute for header 2018-11-30 11:14:12 -08:00
Jonathan Daugherty
324c4840ce FileInfo: include sanitized filename as a field 2018-11-30 11:10:41 -08:00
Jonathan Daugherty
aaf0bd6e30 FileBrowser: sanitize rendered filenames of non-printable characters 2018-11-30 11:08:23 -08:00
Jonathan Daugherty
8bc78a5ce1 FileBrowser: add filter function setting 2018-11-30 10:08:26 -08:00
Jonathan Daugherty
6ab5c4dbae More file browser updates 2018-11-30 10:04:22 -08:00
Jonathan Daugherty
3188588c23 Initial working draft of file browser widget 2018-11-29 16:21:15 -08:00
Jonathan Daugherty
8286eca325 suspendAndResume: empty the rendering cache when returning to brick 2018-11-27 10:39:50 -08:00
Jonathan Daugherty
c8b2c59b2c Forms: add setFormFocus 2018-11-22 12:37:04 -08:00
Fraser Tweedale
1a8bde4b87 add NFData instances for AttrMap and Themes types 2018-11-19 17:45:45 +10:00
Andre Van Der Merwe
af7bc8ebf1 Prevent vector exception when list is too small to draw correctly
Vector.slice throws if the index or start is out of bounds.
Adding a `min 0` to num does not work as you can end up with
 idx being out of bounds. Checking for a zero/negative `idx`
 prevents the crash.
2018-11-13 20:46:35 +02:00
Ömer Sinan Ağacan
f7888a5d81
Support stm == 2.5.*
(in stm-2.5.0.0`newTBQueue` takes a `Natural` argument instead of `Int`)
2018-09-26 14:06:15 +03:00
Jonathan Daugherty
ad036d27d9 Forms: add radioCustomField, checkboxCustomField to customize presentation 2018-09-08 13:37:13 -07:00
Mario Lang
f184490d9c Fix broken build
I should never edit code without building, sorry
2018-09-07 18:49:52 +02:00
Mario Lang
7af320135a Only show the cursor if focused 2018-09-07 18:15:47 +02:00
Mario Lang
5d3a71c771 Forms: position cursor between checkbox brackets 2018-09-07 14:39:35 +02:00
Mario Lang
d4d027fe68 Forms: position cursor between radio brackets
Before this change, the cursor would be set to the last column of the
line, which is confusing at least for braille users who
rely on cursor position in terminal program to know where the "focus"
is.
2018-09-07 13:32:25 +02:00
Jonathan Daugherty
65bd3efbb4 Forms: add listField 2018-09-06 12:36:58 -07:00
Jonathan Daugherty
5c05d71de3 List: add listMoveToElement function 2018-09-06 10:45:10 -07:00
Jonathan Daugherty
24de9b7661 viewport: fix failable patterns for forward compatibility with GHC 8.6 (fixes #183) 2018-08-31 16:02:54 -07:00
Jonathan Daugherty
75eecc3060 Remove unnecessary getDisplaySize function 2018-08-30 16:15:20 -07:00
Jonathan Daugherty
24a44f608b Add Generic and NFData instances for some types 2018-08-27 16:04:41 -07:00
Jonathan Daugherty
4720d82ba1 Expose display size in EventM via getDisplaySize 2018-08-23 15:16:06 -07:00
Jonathan Daugherty
09d7c76ae2 Expose resetRenderState for resetting render states prior to drawing 2018-08-23 13:50:37 -07:00
Jonathan Daugherty
c993fcbe76 Add Read instance for various types 2018-08-23 13:50:09 -07:00
Jonathan Daugherty
95a206aa63 Add Read instance for BorderMap 2018-08-23 13:49:49 -07:00
Jonathan Daugherty
495adfd675 Add Generic instances for List, AttrMap, and AttrName 2018-08-23 08:44:09 -07:00
Jonathan Daugherty
5ec13bfe92 Core: add hLimitPercent, vLimitPercent 2018-08-04 20:19:16 -07:00
Jonathan Daugherty
c89221c19b Support italic style in theme customization file parser 2018-07-30 09:38:15 -07:00
Jonathan Daugherty
da9359d6c5 Core: update text/string widget constructors to indicate that escapes are not permitted 2018-07-26 07:25:25 -07:00
Brent Carmer
44789924b4 math is hard 2018-07-12 10:10:31 -07:00
Brent Carmer
18cc8d1169 Hah! 8 bits... 256 possibilities! 2018-07-12 10:02:11 -07:00
Brent Carmer
4793d4fdf0 Add comment to Themes.hs regarding new color specification format 2018-07-12 09:10:58 -07:00
Brent Carmer
58936477c9 Fix vtyColorName for updated color240CodeToRGB 2018-07-11 17:28:48 -07:00
Brent Carmer
d7c0c1c0d9 Add support for renamed color240CodeToRGB
Update for commit 36aec9f in vty
2018-07-11 16:39:29 -07:00
Brent Carmer
04f865831c Themes: Add Color240 to vtyColorName and parseColor
This supports reading and serializing Color240s
2018-07-11 16:09:10 -07:00
Jonathan Daugherty
ca5a65aa1b Themes: make parseStyle support empty style lists 2018-07-10 11:34:18 -07:00
Jonathan Daugherty
cc76dd9432 Merge branch 'master' of github.com:jtdaugherty/brick 2018-05-26 12:35:46 -07:00
Jonathan Daugherty
adf0ab7517 Brick.Forms: document and expose renderFormFieldState 2018-05-26 12:35:40 -07:00
Jonathan Daugherty
68d6c7bbed List: resolve warning 2018-05-08 09:30:39 -07:00
Jonathan Daugherty
29b483fa91
Merge pull request #177 from pkamenarsky/list-selection-fix
Set list selection on move when previous selection was Nothing
2018-05-08 07:38:50 -07:00
Philip Kamenarsky
47bcc21467 Remove empty line 2018-05-08 09:02:55 +02:00
Philip Kamenarsky
3ad5f516df Adjust haddocks, revert cabal version 2018-05-08 09:01:15 +02:00
liam
d8541990a0 Add renderListWithIndex: provides index to the list entry render function 2018-05-04 22:40:05 +01:00
Philip Kamenarsky
d06de52005 Set list selection on move when previous selection was Nothing 2018-05-04 14:18:34 +02:00
Jonathan Daugherty
80dba3470c Main: translate viewport mouse-up events just as with mouse-down events (fixes #173) 2018-04-29 20:29:55 -07:00
Jonathan Daugherty
5fdfaf327a Forms: expose control over concatenation of field input renderings (relevant to #172) 2018-04-23 11:10:33 -07:00
Jonathan Daugherty
6d88cb7dab Haddock nit 2018-04-07 07:54:17 -07:00
liam
097162fa9b Add accessor documentation for list widget 2018-04-07 09:54:48 +01:00
Jonathan Daugherty
40d6c52964 Brick.Main: use a Set, not a list, to store invalidation requests to avoid duplicates 2018-04-06 15:30:46 -07:00
Jonathan Daugherty
c80f3c7c4a List: warning cleanup 2018-03-31 11:23:21 -07:00
Jonathan Daugherty
12f68b3bee Core: re-flow comments 2018-03-31 11:16:26 -07:00
Jonathan Daugherty
dcb576de98 Border: re-flow comments 2018-03-31 11:15:54 -07:00
Daniel Wagner
0290362aaa more documentation 2018-03-25 18:08:07 -04:00
Daniel Wagner
ec54d28d4b rearrange modules
Previously, the brick-specific Location type had been moved from
Brick.Types.Internal into the new BorderMap module. It's a bit of an odd
place to define it. So now there's an internal internal module named
Brick.Types.Common with a few things that BorderMap needs but that don't
really make sense to define inside the BorderMap module. Both BorderMap
and Types.Internal import this new Common module.
2018-03-25 18:08:07 -04:00
Daniel Wagner
2975cb9156 warning police 2018-03-25 18:04:16 -04:00
Daniel Wagner
5dd5bc4100 add a way to join neighboring borders 2018-03-25 18:04:15 -04:00
Jonathan Daugherty
bd89f787d2 Support GHC 8.4 (fixes #162)
This change splits up Monoid instances into Monoid and Semigroup. It
also conditionally imports Data.Monoid on GHCs prior to 8.4.
2018-03-17 09:03:59 -07:00
Jonathan Daugherty
e449284ba2 Themes: normalize style list to avoid case mismatches in lookups 2018-02-25 08:27:07 -08:00
Yuriy Lazarev
7016da84b9
Fix for the "Invalid style: reversevideo" error
Parser wouldn't find a `reverseVideo` style by name because of the `T.toLower`
2018-02-25 15:07:54 +01:00
Jonathan Daugherty
29e426cc47 Merge branch 'master' of github.com:jtdaugherty/brick 2018-02-05 18:19:08 -08:00
Jonathan Daugherty
208d699525 Core: make vLimit and hLimit bound sizes rather than setting them 2018-02-05 18:19:03 -08:00
Karl Ostmo
e4d9ee253a Do not wrap around dialog button selection with arrow keys (w.r.t. #156) 2018-02-01 14:20:15 -08:00
Jonathan Daugherty
343a2806c4 Core: update docs for str/txt to mention tab character issues 2018-01-22 17:25:06 -08:00
Jonathan Daugherty
ed14778b8e Forms: improve setFieldValid haddock 2018-01-08 13:10:16 -08:00
Jonathan Daugherty
23b8f291e2 Forms: add support for external validation, update FormDemo 2018-01-08 13:09:13 -08:00
Jonathan Daugherty
c1aad4bd5e Borders: simplify attribute API for borders by providing only one attribute name
This change removes attribute names that I think were inadvisable to
begin with.
2018-01-07 16:14:26 -08:00
Jonathan Daugherty
fabc23a496 Core: make all text wrap widgets Greedy horizontally 2018-01-02 10:45:10 -08:00
Jonathan Daugherty
2c85349343 Dialog: clarify purpose in documentation (w.r.t. #149) 2017-12-29 20:55:19 -08:00
Jonathan Daugherty
6af543784b Forms: docs nit 2017-12-27 18:45:58 -08:00
Jonathan Daugherty
e6c5c5b688 nit 2017-12-27 18:37:10 -08:00
Jonathan Daugherty
7bc500da09 Forms: make arrow keys cycle between fields in collections 2017-12-27 18:22:44 -08:00
Jonathan Daugherty
b8e914d75b Forms: haddock update 2017-12-27 18:01:55 -08:00
Jonathan Daugherty
45c40fdbbd Forms: all editors now start out with cursors at end of input 2017-12-27 17:36:22 -08:00
Jonathan Daugherty
21b029769b Forms: more haddock 2017-12-27 12:25:57 -08:00
Jonathan Daugherty
925b998272 Forms: mention event handling info for field constructors 2017-12-27 12:07:25 -08:00
Jonathan Daugherty
ef4159940e Forms: more haddock 2017-12-27 11:48:12 -08:00
Jonathan Daugherty
ec53a83dcd Forms: more haddock 2017-12-27 11:45:11 -08:00
Jonathan Daugherty
c72425e19e Forms: more haddock 2017-12-27 11:37:35 -08:00
Jonathan Daugherty
1d7407e6fc Forms: more haddock, export formAttr 2017-12-27 11:24:19 -08:00
Jonathan Daugherty
fe92079376 Forms: more haddock 2017-12-27 11:15:33 -08:00
Jonathan Daugherty
5f32afd10c Forms: haddock for handleFormEvent 2017-12-27 11:08:25 -08:00
Jonathan Daugherty
4fb8963fe6 Forms: document @@= 2017-12-27 11:03:40 -08:00
Jonathan Daugherty
21706347c6 Forms: nit 2017-12-27 10:58:58 -08:00
Jonathan Daugherty
daa409e1e5 Forms: more haddock 2017-12-27 10:57:26 -08:00
Jonathan Daugherty
bb78f3cab0 Forms: Haddock for FormField type 2017-12-27 10:38:01 -08:00
Jonathan Daugherty
f37798e743 Forms: haddock nit 2017-12-27 10:33:16 -08:00
Jonathan Daugherty
cc2498f881 Forms: add note about stability 2017-12-27 10:31:59 -08:00
Jonathan Daugherty
782794d61c Forms: module haddock 2017-12-27 10:21:42 -08:00
Jonathan Daugherty
d20c84daf4 Forms: make checkbox labels strings to be consistent with other functions 2017-12-26 23:21:15 -08:00
Jonathan Daugherty
df7b936cdc Merge branch 'master' into feature/forms 2017-12-26 22:58:18 -08:00
Jonathan Daugherty
feabfdd5b8 viewport: generate click events
This change makes it so that all uses of 'viewport' generate click
events. Those events are then adjusted to the local coordinate system of
the viewport contents using the viewport's upper-left corner offset.
This means editors now generate click events outside their populated
text regions.
2017-12-26 22:57:04 -08:00
Jonathan Daugherty
1a845b5bdb Forms: remove TODO 2017-12-26 22:38:17 -08:00
Jonathan Daugherty
b3004fb4dc Forms: make radio buttons reponsive to mouse events 2017-12-26 22:35:17 -08:00
Jonathan Daugherty
c1e7704eac Forms: make checkboxes responsive to mouse clicks 2017-12-26 22:31:54 -08:00
Jonathan Daugherty
61c2d715c9 Forms: propagate mouse events to clicked form inputs 2017-12-26 22:31:42 -08:00
Jonathan Daugherty
18c6ad9559 Reinstate checkbox labels as widgets 2017-12-26 22:07:41 -08:00
Jonathan Daugherty
80075e05f0 Forms: add functions to test form field validity 2017-12-26 22:04:51 -08:00
Jonathan Daugherty
172bb58b9a Forms: permit @@= chaining 2017-12-26 21:52:15 -08:00
Jonathan Daugherty
8bea52cbe3 Forms: fix checkbox rendering 2017-12-26 21:39:01 -08:00
Jonathan Daugherty
d86177a75a Forms: unify focused attributes 2017-12-26 21:35:14 -08:00
Jonathan Daugherty
0d6cfaa289 Forms: simplify checkbox API 2017-12-26 21:35:06 -08:00
Jonathan Daugherty
d431dfb361 Forms: update TODO 2017-12-26 21:31:23 -08:00
Jonathan Daugherty
4773ea927b Forms: add editTextField 2017-12-26 21:31:09 -08:00
Jonathan Daugherty
34e721e7b7 Forms: update TODO 2017-12-26 21:11:32 -08:00
Jonathan Daugherty
af60c49bb3 Forms, FormDemo: add checkbox fields 2017-12-26 21:11:26 -08:00
Jonathan Daugherty
cb3178d256 Forms: remove unused defaultFormRenderer 2017-12-26 21:04:33 -08:00
Jonathan Daugherty
bc01acfff7 Forms: update TODO 2017-12-26 20:59:55 -08:00
Jonathan Daugherty
1baf5ce830 Forms: just get rid of withHelper 2017-12-26 20:58:50 -08:00
Jonathan Daugherty
6d8cbe1e6c Forms: add infix operator alternative to withHelper 2017-12-26 20:11:18 -08:00
Jonathan Daugherty
47d4d144fe Forms: handle shift-tab 2017-12-26 20:05:31 -08:00
Jonathan Daugherty
e420a51ca6 Forms: TODO update 2017-12-26 20:05:26 -08:00
Jonathan Daugherty
ee9b476adf Forms: update TODO 2017-12-26 20:00:28 -08:00
Jonathan Daugherty
0654305a44 Forms: add radio button input support 2017-12-26 19:58:08 -08:00
Jonathan Daugherty
6b2be1885d Forms: refactor API to decouple form input elements from state fields 2017-12-26 19:44:49 -08:00
Jonathan Daugherty
2b3f664097 Whitespace 2017-12-26 18:46:50 -08:00
Jonathan Daugherty
c37d4b5c43 Forms: adjust nomenclature 2017-12-26 18:46:34 -08:00
Jonathan Daugherty
fb6c975aaa Forms: FormEntry fields no longer silenced 2017-12-26 17:00:13 -08:00
Jonathan Daugherty
a8ee3c9662 Forms: TODO updates 2017-12-26 17:00:05 -08:00
Jonathan Daugherty
79284f471c Forms: more export cleanup 2017-12-26 16:59:55 -08:00
Jonathan Daugherty
eaa14ed144 Forms: move TODO to forms module 2017-12-26 16:40:30 -08:00
Jonathan Daugherty
fbb9d41e0a Forms: nit 2017-12-26 16:38:35 -08:00
Jonathan Daugherty
ba78ce92f8 Forms: improve naming convention of field constructors 2017-12-26 16:38:28 -08:00
Jonathan Daugherty
410c74a301 Forms: clean up export list 2017-12-26 16:35:51 -08:00
Jonathan Daugherty
8bea691093 Add an experimental, incomplete forms API and demo program 2017-12-26 16:29:05 -08:00
Jonathan Daugherty
b4993d0876 Brick.Main: remove stale import 2017-12-13 20:48:42 -08:00
Jonathan Daugherty
58cca5c97d Focus: add focusSetCurrent 2017-12-13 11:45:43 -08:00
Jonathan Daugherty
a59e1e2798 Brick: haddock update 2017-12-10 21:23:39 -08:00
Jonathan Daugherty
eaf66e4580 Brick.Themes: fix/improve module Haddock 2017-12-09 16:32:10 -08:00
Jonathan Daugherty
cae2ea64b7 Brick.Main: parameterize simpleApp on drawn widget 2017-12-09 16:12:50 -08:00
Jonathan Daugherty
acd4bb5a04 simpleMain: use simpleApp 2017-12-09 16:11:09 -08:00
Jonathan Daugherty
7ea8d14258 Brick.Main: add simpleApp 2017-12-09 16:09:48 -08:00
Jonathan Daugherty
15a77fe15d Themes: fix a bug that prevented bright colors from being parsed in theme files 2017-12-05 17:04:20 -08:00
Jonathan Daugherty
19388169e3 Merge branch 'master' into feature/themes 2017-11-05 11:20:14 -08:00
Jonathan Daugherty
dc252e6d91 Themes: mention dot notation 2017-11-05 10:59:13 -08:00
Jonathan Daugherty
8e08d4d493 Themes: add saveTheme for saving whole themes regardless of customization 2017-11-05 10:36:25 -08:00
Jonathan Daugherty
54cd824334 Themes: add applyCustomizations to support obtaining customizations from other sources 2017-10-30 16:02:36 -07:00
Jonathan Daugherty
ef69cc5296 Themes: rename custom section, factor out session names 2017-10-30 09:42:13 -07:00
Jonathan Daugherty
f2ab0b5b7d Themes: move documentation out of Theme 2017-10-30 09:36:09 -07:00
Jonathan Daugherty
f614977d60 Themes: add newTheme convenience constructor 2017-10-30 09:33:59 -07:00
Jonathan Daugherty
2d88753db5 Theme: reorder fields 2017-10-30 09:24:04 -07:00
Jonathan Daugherty
d3fbac3539 Themes: split documentation out of theme type
This enables users to specify the documentation only once and re-use it
per-theme rather than having to package the documentation up with each
theme's defaults.
2017-10-30 09:05:27 -07:00
Jonathan Daugherty
c359ff11e8 Whitespace 2017-10-30 08:51:30 -07:00
Jonathan Daugherty
533804a626 Themes: add more haddock 2017-10-29 21:41:26 -07:00
Jonathan Daugherty
a2ec1b48ac Themes: more cleanup 2017-10-29 21:14:32 -07:00
Jonathan Daugherty
db46420406 Themes: unify use of color lists 2017-10-29 21:13:23 -07:00
Jonathan Daugherty
d5f849d12a Themes: more cleanup 2017-10-29 21:10:41 -07:00
Jonathan Daugherty
6182cd5d9d Themes: cleanup 2017-10-29 21:09:59 -07:00
Jonathan Daugherty
ab3972893c saveCustomizations: include section headings in output 2017-10-29 21:05:39 -07:00
Jonathan Daugherty
5d9fcd7d8b Themes: fix saveCustomizations to emit customizations in mapping 2017-10-29 21:04:10 -07:00
Jonathan Daugherty
f8a96fc624 Nit 2017-10-29 21:01:48 -07:00
Jonathan Daugherty
27b1f50523 Themes: add first pass at theme customization file saving 2017-10-29 21:01:12 -07:00
Jonathan Daugherty
7daf38e1b1 Themes: permit all sections to be optional 2017-10-29 20:40:26 -07:00
Jonathan Daugherty
1aa08ef269 Themes: add first pass at theme customization file loading 2017-10-29 20:27:19 -07:00
Jonathan Daugherty
c949fe3077 AttrMap: expose attribute name components 2017-10-29 20:26:59 -07:00
Jonathan Daugherty
bc18ad04a5 Whitespace 2017-10-29 19:40:09 -07:00
Jonathan Daugherty
9ef9d08e72 Themes: clarify mapping customization 2017-10-29 19:39:48 -07:00
Jonathan Daugherty
883dce30ff Themes: document the base mapping 2017-10-29 19:29:25 -07:00
Jonathan Daugherty
aaa5f6f038 Add first draft of themes module 2017-10-29 19:24:09 -07:00
Jonathan Daugherty
a106ad4a14 AttrMap: add Read instance for AttrName 2017-10-29 19:23:59 -07:00
Tom Sydney Kerckhove
16b59a6257 Make events orderable 2017-10-25 16:35:04 +02:00
Jonathan Daugherty
eef78a0a67 Support attribute modification with modifyDefAttr, rename setDefault to setDefaultAttr 2017-10-09 13:02:21 -07:00
Jonathan Daugherty
dbebb512e9 Add hyperlink combinator, update attribute demo 2017-10-06 13:27:41 -07:00
Getty Ritter
646304fc10 Update AttrMap for the URL annotations in VTY 2017-10-06 12:33:27 -07:00
Jonathan Daugherty
f567083104 List: fix haddock for listHandleEventVi 2017-10-03 11:03:37 -07:00
Richard Alex Hofer
f1f9da0c87 Document movements handled by handleListEventVi. 2017-10-03 08:03:43 -04:00
Richard Alex Hofer
017c0c1bf8 Add a list event handler with vi keybindings and a demo. 2017-10-01 16:25:55 -04:00
Richard Alex Hofer
4df23d59da Add in page movement commands: listMoveByPages, listMovePageUp, listMovePageDown. 2017-09-30 20:04:05 -04:00
Edward Betts
71e44b3c0e correct spelling mistake 2017-09-01 18:16:43 +01:00
Jonathan Daugherty
231adfe276 borderWithLabel: add explanatory note about label truncation 2017-08-27 12:42:23 -07:00
Jonathan Daugherty
ee8755c8e3 Core: remove stale import 2017-08-25 09:59:36 -07:00
Jonathan Daugherty
adf599ff49 vBox/hBox: when there is leftover space, spread it amongst the elements instead of assigning it all to the first one 2017-08-21 22:03:35 -07:00
Jonathan Daugherty
1162324b2b API: add setAvailableSize 2017-08-20 18:40:56 -07:00
Jonathan Daugherty
57ffef581c getVtyHandle: always return a Vty handle rather than Maybe
Previously, in appStartEvent you'd get Nothing because Vty had not been
initialized yet. This made various use cases impossible to satisfy
because appStartEvent is a natural place to get initial terminal state
from Vty. This change makes it so that a Vty handle is always available,
even in appStartEvent.
2017-08-05 14:41:12 -07:00
Jonathan Daugherty
8e8a09b28f txtWrapWith: missing haddock 2017-08-05 09:30:04 -07:00
Jonathan Daugherty
6de72ae6b7 Add txtWrapWith, strWrapWith to provide control over wrapping behavior 2017-08-05 09:20:07 -07:00
Jonathan Daugherty
66fc8e7372 Brick.Types.Internal: improve mouse constructor haddock 2017-08-03 21:07:45 -07:00
Jonathan Daugherty
c09966ee81 Upgrade to word-wrap 0.2 2017-08-03 21:06:45 -07:00
Jonathan Daugherty
8f684c01ec Edit: haddock fix 2017-07-20 19:32:37 -07:00
Jonathan Daugherty
85d51e092c str: fix constraint confusion on GHC 7.10.1 2017-07-14 13:22:01 -07:00
Jonathan Daugherty
974453c55c Core: use word-wrap library for text-wrapping 2017-07-08 12:12:12 -07:00
Jonathan Daugherty
472fba88e8 str/txtWrap: haddock 2017-07-06 21:49:07 -07:00
Jonathan Daugherty
687fe20ca5 Core: add txtWrap, strWrap, and TextWrapDemo (fixes #128) 2017-07-06 21:47:41 -07:00
Jonathan Daugherty
6de0154701 Merge branch 'master' of github.com:jtdaugherty/brick 2017-07-05 21:37:11 -07:00
Jonathan Daugherty
456f523d84 txt: fix Haddock 2017-07-05 21:37:08 -07:00
Jonathan Daugherty
c07e9c0503 Edit: move content draw function to render time, not construction
This change makes the renderEditor function take the content drawing
function that "editor" previously took. This does a better job of
separating presentation and representation concerns, and the content
drawing function never should have been part of the state to begin with.

This change removed the corresponding lens and Editor accessor for the
drawing function, removed the smart constructor parameter, and moved it
to be a parameter of the renderEditor function.
2017-06-26 11:52:46 -07:00
Jonathan Daugherty
5f6c0e443d Focus: slightly better haddock 2017-06-18 15:38:42 -07:00
Jonathan Daugherty
c6d0e89a52 Brick.Focus: haddock improvements 2017-06-11 12:30:06 -07:00
Jonathan Daugherty
d64b89b7fa Merge branch 'master' of github.com:jtdaugherty/brick 2017-06-11 12:24:30 -07:00
Jonathan Daugherty
0718443b2f Focus: replace internal list-based implementation with data-clist CList (fixes #122) 2017-06-11 12:24:13 -07:00