Commit Graph

898 Commits

Author SHA1 Message Date
Jonathan Daugherty
2e30bbe33e Haddock nit 2022-08-01 11:36:00 -07:00
Jonathan Daugherty
b7be977d33 KeyEvents: add documentation 2022-08-01 11:35:16 -07:00
Jonathan Daugherty
57679a8f71 newKeyConfig: use a more natural argument ordering 2022-08-01 11:34:59 -07:00
Jonathan Daugherty
5f35cd0e3e KeyConfig: more documentation improvements 2022-08-01 11:29:18 -07:00
Jonathan Daugherty
d83b5eae94 ToBinding: improve description 2022-08-01 11:25:55 -07:00
Jonathan Daugherty
8a3ea98284 KeyConfig: remove redundant key and char functions, improve modifier internals 2022-08-01 11:25:08 -07:00
Jonathan Daugherty
7651cdd546 KeyConfig: add more documentation 2022-08-01 11:22:05 -07:00
Jonathan Daugherty
d81ce60ffb allActiveBindings: only return default bindings when an event has no configured bindings and has not been set to Unbound 2022-08-01 11:06:05 -07:00
Jonathan Daugherty
eedd503cf2 KeyConfig: make active/default binding query functions symmetric 2022-07-28 19:03:55 -07:00
Jonathan Daugherty
63a4083391 EventTrigger: Static -> ByKey 2022-07-10 13:59:27 -07:00
Jonathan Daugherty
456da00fa9 keyHandlersFromConfig: nit 2022-07-10 13:57:58 -07:00
Jonathan Daugherty
6466c4e99d keyHandlersFromConfig: cleanup 2022-07-10 13:56:41 -07:00
Jonathan Daugherty
6c1f357318 Whitespace 2022-07-10 13:56:29 -07:00
Jonathan Daugherty
3014e79304 Remove stale imports 2022-07-10 13:56:26 -07:00
Jonathan Daugherty
232fcc81b4 Keybindings: re-export Pretty module 2022-07-10 09:50:09 -07:00
Jonathan Daugherty
52a370fad8 Parse: move pretty-printing functions to Pretty 2022-07-10 09:50:02 -07:00
Jonathan Daugherty
04676115e6 Incorporate keybinding machinery from Matterhorn 2022-07-10 09:37:16 -07:00
Jonathan Daugherty
b23c40d82a Editor: mention mouse events in docs 2022-07-09 12:20:44 -07:00
Jonathan Daugherty
1c044013b2 Comment edit 2022-07-09 09:23:36 -07:00
Jonathan Daugherty
40a39b92d1
Merge pull request #376 from TristanCacqueray/edit-cursor-pos
Add Brick.Widgets.Edit.getCursorPosition
2022-07-09 09:22:13 -07:00
Jonathan Daugherty
c832aef14a Improve editor cursor placement with moveCursorClosest from text-zipper 0.12 2022-07-09 08:40:04 -07:00
Jonathan Daugherty
8eb41ca8c3 handleEditorEvent: handle mouse click events to place the cursor (adds Eq constraint to handleEditorEvent) 2022-07-09 08:30:42 -07:00
Jonathan Daugherty
65645be3d2 Edit: handle BrickEvents, not Events
This is a breaking API change that changes handleEditorEvent to take
BrickEvents instead of Events. This paves the way for handling Brick's
mouse events in the editor.
2022-07-09 08:23:32 -07:00
Jonathan Daugherty
d2b884586e Edit: let/where refactor 2022-07-09 08:07:28 -07:00
Jonathan Daugherty
2a99ee3fa0 Whitespace 2022-07-09 08:06:49 -07:00
Tristan Cacqueray
767438cd1d Add Brick.Widgets.Edit.getCursorPosition 2022-07-09 11:59:33 +00:00
Jonathan Daugherty
1bed2c8268 Implement a few linter suggestions 2022-07-04 21:11:12 -07:00
Jonathan Daugherty
30a65fc7e0 renderWidget: add attribute map argument and update documentation 2022-07-04 08:41:00 -07:00
Jonathan Daugherty
f3ef855f76 renderWidget: whitespace 2022-07-04 08:32:12 -07:00
Valentin Golev
a5249e5e92 simplified renderWidget, and Render test example 2022-07-03 23:49:59 +02:00
Valentin Golev
b68310e740 renderWidget function 2022-07-01 04:02:27 +02:00
Jonathan Daugherty
c06231cce9 table: another haddock addition 2022-06-20 14:21:11 -07:00
Jonathan Daugherty
84573dace9 table: more haddock additions 2022-06-20 14:17:25 -07:00
Jonathan Daugherty
410fcaa212 Forms: typo 2022-06-19 14:18:41 -07:00
Jonathan Daugherty
aac39c4801 Table: more cleanup 2022-06-19 14:08:28 -07:00
Jonathan Daugherty
03d2a10129 table: cleanup 2022-06-19 13:48:23 -07:00
Jonathan Daugherty
16bf5b7e59 Table: improve documentation 2022-06-19 13:37:00 -07:00
Jonathan Daugherty
a039911c9e Table: use multi-way if to clean up 2022-06-19 13:30:47 -07:00
Jonathan Daugherty
c4ed0a4a91 Add missing import for older GHCs 2022-06-19 13:12:26 -07:00
Jonathan Daugherty
04db41b1f3 Table: remove non-empty and all-empty cell restrictions 2022-06-19 13:03:03 -07:00
Daniel Wagner
539a594c27 make empty BorderMaps even emptier (issue 370)
The BorderMap module provides a notion of an empty map. Previously, this
was accidentally conflating two kinds of emptiness: an map that doesn't
track points, and a map that tracks a point (or multiple points) but
doesn't associate it with anything. This meant that the empty map was
not a unit for the union operation, which seems like a natural
expectation.

This has been resolved by revising the empty map to be the one that
tracks no points. Callers that expected that behavior were left alone,
while callers that expected the other behavior were fixed to use
`emptyCoordinates`.
2022-06-19 14:51:22 -04:00
Jonathan Daugherty
6ccdd8c1f1 emptyResult: use explicit record syntax 2022-06-18 10:08:17 -07:00
Jonathan Daugherty
67c1b99989 Table: add additional cautionary note to the docs about empty cells 2022-06-18 09:05:35 -07:00
Jonathan Daugherty
55c13f7ff4 Table: fill and pad empty cells to avoid layout issues (fixes #369)
This change makes it so that when cells are empty (have zero width and
height) and are top- and left-aligned, we pad them to take up the same
amount of width and height as their row- and column-wise neighbors. This
was already the case for other alignment settings, but the top- and
left-aligned cases were not getting padded.
2022-06-18 09:03:43 -07:00
Jonathan Daugherty
d196695ab7 relativeTo: remove unused Show constraint 2022-05-24 17:43:21 -07:00
Jonathan Daugherty
c416d04a4a relativeTo: improve documentation 2022-05-24 17:43:13 -07:00
Jonathan Daugherty
2fecf53fe7 Core: add relativeTo to support positioning elements relative to elements in lower layers 2022-05-23 13:18:33 -07:00
Jonathan Daugherty
96f06bdfb4 cropExtents: be robust to negative upper-left corner coordinates
This change fixes a bug that surfaces when an extent has been moved
partially "off screen." This can happen if an extent is translated so
that its left or top edges are outside of the rendered image. Prior to
this change, such extents would get cropped so that their upper-left
corners were always clamped to (0,0). This was wrong because it
fundamentally broke the extents' coorinate system. This change not only
preserves upper-left corner coordinates but also updates the width and
height calculations in extent-cropping to ensure that the new width and
height values still reflect the true "width" and "height" of an extent
even if some of that width or height is not visible in a rendered image.
This is essential for ensuring that mouse click detection works as
needed to translate screen-space coordinates of mouse clicks into local
(extent) coordinates for extent-matching purposes.
2022-03-31 21:58:45 -07:00
Jonathan Daugherty
315f19e060 Remove brick-markup-demo, Data.Text.Markup, and Brick.Markup 2022-03-07 08:29:36 -08:00
Jonathan Daugherty
ab9ddacd27 withAttr: docs update 2022-02-02 21:52:40 -08:00