Commit Graph

18 Commits

Author SHA1 Message Date
Jonathan Daugherty
bcf6eededb Rename TerminalLocation row/column fields to avoid commonplace name clashes (fixes #96) 2016-11-20 18:22:52 -08:00
Jonathan Daugherty
fc8cfe3b4a Remove appLiftVtyEvent in favor of library event type BrickEvent
This change makes it possible for brick to extent the event space using
its own event notions in addition those provided by Vty and the
application itself. This means we no longer need the user to provide the
type and appLiftVtyEvent went away. This makes pattern-matching in event
handlers a little noisier with the benefit that we can now add events
like mouse clicks or drags to the event type.
2016-10-25 20:19:31 -07:00
Jonathan Daugherty
ef06be53f2 LayerDemo: language tweak 2016-09-18 10:21:43 -07:00
Jonathan Daugherty
d06004952e LayerDemo: demonstrate a centered top layer 2016-06-10 15:01:28 -07:00
Jonathan Daugherty
bd95299148 Resolve master merge conflicts 2016-05-19 20:29:12 -07:00
Jonathan Daugherty
f3950cf96d API: migrate "lens" usage to "microlens" packages 2016-05-08 18:05:30 -07:00
Jonathan Daugherty
3081e7367d Replace "Name" type with custom name type variable everywhere
This experimental change makes it possible to:
* Avoid runtime errors due to name typos
* Achieve compile-time guarantees about name matching and usage
* Force widget functions to be name-agnostic by being polymorphic
  in their name type
* Clean up focus handling by making it possible to pattern-match
  on cursor location names

The change also made many types more heavyweight and in some cases
this is unpleasant when we don't want to have to care about names.
But in those cases we can just use 'n' or '()' depending on how
concrete we need to be.  I'm not yet sure how this is going to play
out in practice.
2016-03-04 14:42:49 -08:00
Markus Hauck
e59559b0d1 Apply hlint hints
- programs/LayerDemo: combine imports
- programs/SuspendAndResumeDemo: redundant do
- programs/ViewportScrollDemo: unused pragma
- src/Brick/Main: redundant do
- src/Brick/Widgets/Center: use fromMaybe
- src/Brick/Widgets/Core: combine imports, redundant do, use >=>
- src/Brick/Widgets/Internals: redundant '$'
- src/Brick/Widgets/List: use fromMaybe
- src/Brick/Widgets/ProgressBar: use fromMaybe
2015-12-09 20:15:09 +01: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
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
d33181ed0b Make str and txt single-line only and add slower multiline variants 2015-08-17 21:13:00 -07:00
Jonathan Daugherty
f930210777 Move toward suffixing all lenses with L 2015-07-19 12:08:00 -07:00
Jonathan Daugherty
962e7c83df Rename appMakeVtyEvent to appLiftVtyEvent 2015-07-10 13:53:21 -07:00
Jonathan Daugherty
191b37f417 LayerDemo: use explicit imports 2015-07-10 13:20:05 -07:00
Jonathan Daugherty
201dfdc4a3 Rename Brick.Core to Brick.Types 2015-07-07 17:00:42 -07:00
Jonathan Daugherty
e9c587189d Layer demo: improve layout of event handler to make layer handling distinction clearer 2015-07-03 16:04:23 -07:00
Jonathan Daugherty
149ab2d58b Add a layer demo program 2015-07-03 15:49:33 -07:00