Releases: reflex-frp/reflex-vty
Releases · reflex-frp/reflex-vty
v0.3.1.0
v0.3.0.0
0.3.0.0
- Re-design
textInput
,TextInput
andTextInputConfig
.- Allows users to implement more complex behavior.
_textInputConfig_modify
is now applied to the text-value oftextInput
after user input events such as mouse clicks and keyboard input.
This may change the observable behavior.
v0.2.0.0
0.2.0.0
- Module Reorganization: The following modules have been added (and are all re-exported by Reflex.Vty):
- Reflex.Vty.Widget.Box for all the box functions and datatypes
- Reflex.Vty.Widget.Input.Mouse for clicking, dragging, and scrolling
- Reflex.Vty.Widget.Split contains
splitV
,splitH
, etc - Reflex.Vty.Widget.Text contains text rendering functions like
text
anddisplay
- Bugfixes:
- Remove text-icu dependency and switch to
wcwidth
from vty package to compute character width inData.Text.Zipper
. goToDisplayLinePosition
inData.Text.Zipper
correctly accounts for character width now.- #37
Layout
should support focus changes through nested layouts (thanks @pdlla for getting this started -- see entry on Layout and Focus below). - Fix distribution of available space when it cannot be evenly distributed. Previously, all leftover space would be allocated to the first stretchable widget.
- Remove text-icu dependency and switch to
- Breaking Changes:
- Layout and focus have been substantially refactored to fix #37 and support a wider variety of layouts and focus switching requirements.
- Added a new
HasFocus
class (the old one is nowHasFocusReader
) 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 torequestFocus
in the child widget.- Calls to
fixed
andstretch
must now be replaced withtile . fixed
andtile . stretch
stretch
now takes a minimum size argument- Added
flex
which is equivalent tostretch 0
tabNavigation
no longer returns anEvent
. Instead it callsrequestFocus
directly with the appropriateRefocus_Shift
value.- Added
axis
(inHasLayout
), a lower-level primitive which is used to implementrow
andcol
. - Added
region
(inHasLayout
), which is used to claim screen real estate and used to implementtile
andgrout
- Added
grout
, a container element that is not itself focusable (though its children can be)
- Added a new
- Removed
VtyWidget
and replaced it with a number of separate classes and monad transformers- Replace
HasDisplaySize
withHasDisplayRegion
which carries around a region instead of just a width and height.displayWidth
anddisplayHeight
are now functions implemented in terms ofaskRegion
instead of class methods. - Add a
DisplayRegion
monad transformer - Rename
ImageWriter
toHasImageWriter
- Introduce an
ImageWriter
monad transformer - Rename
HasFocus
toHasFocusReader
- Introduce a
FocusReader
monad transformer - Replace
HasVtyInput
withHasInput
- Introduce an
Input
monad transformer - Introduce
HasTheme
reader class to allow setting Vty attributes of all built-in widgets - Introduce
ThemeReader
monad transformer
- Replace
- Remove
DynRegion
andcurrentRegion
. UseDynamic t Region
andcurrent
instead. This also changes the type ofpane
's argument. CheckboxConfig
now has a field taking anEvent
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
(formerlyHasVtyInput
) now has a methodlocalInput
for filtering the input a child widget may receiveHasImageWriter
now has a methodmapImages
for transforming the images emitted by a child widgetboxTitle
now takes aBehavior t Text
as its title, instead of a plainText
fill
now takes aBehavior t Char
instead of aChar
- The following functions are no longer specialized to
VtyWidget
:pane
: Now requiresHasInput t m, HasImageWriter t m, HasDisplayRegion t m, HasFocusReader t m
drag
: Now requiresHasInput
mouseDown
: Now requiresHasInput
mouseUp
: Now requiresHasInput
mouseScroll
: Now requiresHasInput
key
: Now requiresHasInput
keys
: Now requiresHasInput
keyCombo
: Now requiresHasInput
keyCombos
: Now requiresHasInput
splitV
: Now requiresHasDisplayRegion t m, HasInput t m, HasImageWriter t m, HasFocusReader t m
splitH
: Now requiresHasDisplayRegion t m, HasInput t m, HasImageWriter t m, HasFocusReader t m
splitVDrag
: Now requiresHasDisplayRegion t m, HasInput t m, HasImageWriter t m, HasFocusReader t m
fill
: Now requiresHasImageWriter
andHasDisplayRegion
boxTitle
: Now requiresHasDisplayRegion t m, HasImageWriter t m, HasInput t m, HasFocusReader t m, HasTheme t m
box
: Now requiresHasDisplayRegion t m, HasImageWriter t m, HasInput t m, HasFocusReader t m, HasTheme t m
boxStatic
: Now requiresHasDisplayRegion t m, HasImageWriter t m, HasInput t m, HasFocusReader t m, HasTheme t m
richText
: Now requiresHasImageWriter
, andHasDisplayRegion
scrollableText
: Now requiresHasInput
,HasImageWriter
,HasTheme
, andHasDisplayRegion
blank
: Now requiresMonad
button
: Now requiresHasFocusReader
,HasInput
,HasImageWriter
,HasTheme
, andHasDisplayRegion
textButton
: Now requiresHasFocusReader
,HasInput
,HasImageWriter
,HasTheme
, andHasDisplayRegion
textButtonStatic
: Now requiresHasFocusReader
,HasInput
,HasImageWriter
,HasTheme
, andHasDisplayRegion
link
: Now requiresHasInput
,HasImageWriter
,HasTheme
, andHasDisplayRegion
checkbox
: Now requiresHasFocusReader
,HasInput
,HasImageWriter
, andHasDisplayRegion
- TextZipper interface changes
_displayLines_offsetMap
type changed toOffsetMapWithAlignment
_displayLines_cursorY
replaced with_displayLines_cursorPos
which include X position- some exposed methods intended for internal use only have been removed
textInput
: Now requiresHasFocusReader
,HasInput
,HasImageWriter
,HasTheme
, andHasDisplayRegion
multilineTextInput
: Now requiresHasFocusReader
,HasInput
,HasImageWriter
,HasTheme
, andHasDisplayRegion
textInputTile
: Now requiresHasFocusReader
,HasInput
,HasLayout
,HasTheme
, andHasFocus
- Layout and focus have been substantially refactored to fix #37 and support a wider variety of layouts and focus switching requirements.
- Misc:
- (#40 Add alignment support to TextZipper)[https://github.com//pull/40]
- Add alignment (left/center/right) support to TextZipper
- Add basic unit tests for newly created alignment methods in TextZipper
- Add default instances for
HasInput
,HasFocus
, andHasImageWriter
- Export
withinImage
and addimagesInRegion
to crop images to a region - Add
anyChildFocused
, which provides information about whether subwidgets are focused - Add
filterKeys
, which is the same aslocalInput
but only cares about keyboard events - Add
hoistRunLayout
to apply a transformation to the context of aLayout
action and run that action - Add various
MFunctor
instances - Add a CPU usage indicator to the example executable
- (#40 Add alignment support to TextZipper)[https://github.com//pull/40]
v0.1.4.1
v0.1.4.0
0.1.4.0
- (#15) Add
PostBuild
instance forLayout
. - (#17) Add
splitH
to implement horizontal functionality ofsplitV
. - (#19) Add
boxTitle
: a box with a title. - (#19) Update the text editing example to use
boxTitle
. - (#21) Fix bug in
drag
that caused dragging with different mouse button to trigger the click event. - (#22) Add support for GHC 8.8.
v0.1.2.1
v0.1.2.0: Merge pull request #8 from reflex-frp/aa-fullwidth-unicode
Handle wrapping of lines containing fullwidth unicode characters