Build terminal applications using functional reactive programming (FRP) with Reflex FRP.
displayLineWithAlignment
by @minimapletinytools in https://github.com/reflex-frp/reflex-vty/pull/78
Full Changelog: https://github.com/reflex-frp/reflex-vty/compare/v0.5.1.0...v0.5.2.0
Full Changelog: https://github.com/reflex-frp/reflex-vty/compare/v0.5.0.0...v0.5.1.0
Full Changelog: https://github.com/reflex-frp/reflex-vty/compare/v0.4.1.1...v0.5.0.0
Full Changelog: https://github.com/reflex-frp/reflex-vty/compare/v0.4.1.0...v0.4.1.1
pane
such that
MonadHold
constraint to pane
MonadHold
constraint to several methods that use pane
splitV
, splitH
, etctext
and display
wcwidth
from vty package to compute character width in Data.Text.Zipper
.goToDisplayLinePosition
in Data.Text.Zipper
correctly accounts for character width now.Layout
should support focus changes through nested layouts (thanks @pdlla for getting this started -- see entry on Layout and Focus below).HasFocus
class (the old one is now HasFocusReader
) to produce focusable elements, and manage focus state. See the "Focus" section of the Reflex.Vty.Widget.Layout module documentation.Layout
no longer has any focus-tracking responsibility. See the "Layout" section of the Reflex.Vty.Widget.Layout module documentation.tile
no longer takes a configuration record and no longer requires that its child widget return a focus request event. Focus requests are instead handled using calls to requestFocus
in the child widget.fixed
and stretch
must now be replaced with tile . fixed
and tile . stretch
stretch
now takes a minimum size argumentflex
which is equivalent to stretch 0
tabNavigation
no longer returns an Event
. Instead it calls requestFocus
directly with the appropriate Refocus_Shift
value.axis
(in HasLayout
), a lower-level primitive which is used to implement row
and col
.region
(in HasLayout
), which is used to claim screen real estate and used to implement tile
and grout
grout
, a container element that is not itself focusable (though its children can be)VtyWidget
and replaced it with a number of separate classes and monad transformers
HasDisplaySize
with HasDisplayRegion
which carries around a region instead of just a width and height. displayWidth
and displayHeight
are now functions implemented in terms of askRegion
instead of class methods.DisplayRegion
monad transformerImageWriter
to HasImageWriter
ImageWriter
monad transformerHasFocus
to HasFocusReader
FocusReader
monad transformerHasVtyInput
with HasInput
Input
monad transformerHasTheme
reader class to allow setting Vty attributes of all built-in widgetsThemeReader
monad transformerDynRegion
and currentRegion
. Use Dynamic t Region
and current
instead. This also changes the type of pane
's argument.CheckboxConfig
now has a field taking an Event
to set the value of the checkbox.checkbox
now accepts keyboard input (spacebar to check and uncheck) and is displayed in bold when focused.HasInput
(formerly HasVtyInput
) now has a method localInput
for filtering the input a child widget may receiveHasImageWriter
now has a method mapImages
for transforming the images emitted by a child widgetboxTitle
now takes a Behavior t Text
as its title, instead of a plain Text
fill
now takes a Behavior t Char
instead of a Char
VtyWidget
:
pane
: Now requires HasInput t m, HasImageWriter t m, HasDisplayRegion t m, HasFocusReader t m
drag
: Now requires HasInput
mouseDown
: Now requires HasInput
mouseUp
: Now requires HasInput
mouseScroll
: Now requires HasInput
key
: Now requires HasInput
keys
: Now requires HasInput
keyCombo
: Now requires HasInput
keyCombos
: Now requires HasInput
splitV
: Now requires HasDisplayRegion t m, HasInput t m, HasImageWriter t m, HasFocusReader t m
splitH
: Now requires HasDisplayRegion t m, HasInput t m, HasImageWriter t m, HasFocusReader t m
splitVDrag
: Now requires HasDisplayRegion t m, HasInput t m, HasImageWriter t m, HasFocusReader t m
fill
: Now requires HasImageWriter
and HasDisplayRegion
boxTitle
: Now requires HasDisplayRegion t m, HasImageWriter t m, HasInput t m, HasFocusReader t m, HasTheme t m
box
: Now requires HasDisplayRegion t m, HasImageWriter t m, HasInput t m, HasFocusReader t m, HasTheme t m
boxStatic
: Now requires HasDisplayRegion t m, HasImageWriter t m, HasInput t m, HasFocusReader t m, HasTheme t m
richText
: Now requires HasImageWriter
, and HasDisplayRegion
scrollableText
: Now requires HasInput
, HasImageWriter
, HasTheme
, and HasDisplayRegion
blank
: Now requires Monad
button
: Now requires HasFocusReader
, HasInput
, HasImageWriter
, HasTheme
, and HasDisplayRegion
textButton
: Now requires HasFocusReader
, HasInput
, HasImageWriter
, HasTheme
, and HasDisplayRegion
textButtonStatic
: Now requires HasFocusReader
, HasInput
, HasImageWriter
, HasTheme
, and HasDisplayRegion
link
: Now requires HasInput
, HasImageWriter
, HasTheme
, and HasDisplayRegion
checkbox
: Now requires HasFocusReader
, HasInput
, HasImageWriter
, and HasDisplayRegion
_displayLines_offsetMap
type changed to OffsetMapWithAlignment
_displayLines_cursorY
replaced with _displayLines_cursorPos
which include X positiontextInput
: Now requires HasFocusReader
, HasInput
, HasImageWriter
, HasTheme
, and HasDisplayRegion
multilineTextInput
: Now requires HasFocusReader
, HasInput
, HasImageWriter
, HasTheme
, and HasDisplayRegion
textInputTile
: Now requires HasFocusReader
, HasInput
, HasLayout
, HasTheme
, and HasFocus
HasInput
, HasFocus
, and HasImageWriter
withinImage
and add imagesInRegion
to crop images to a regionanyChildFocused
, which provides information about whether subwidgets are focusedfilterKeys
, which is the same as localInput
but only cares about keyboard eventshoistRunLayout
to apply a transformation to the context of a Layout
action and run that actionMFunctor
instances