Releases: gyscos/cursive
Releases · gyscos/cursive
0.9.1
New features
- Add
Cursive::on_event
to send simulated events. - Add
EventResult::and
to combine callbacks. - Allow custom color in
ProgressBar
.
Bugfixes
- LinearLayout:
- Better geometry computation with constrained size
- Fixed cache invalidation
- Fix possible panic when removing children
- ScrollView:
- Fix possible panic with full-height scrollbar
- Fix possible panic with empty content
- Fix cache
- Fix menubar focus after action
- Pin
enumset
version (fix compilation error)
0.9.0
This releases is quite large and includes some breaking changes:
Cursive::new()
has been renamedCursive::default()
.Cursive::new
is now used to select a backend, allowing third-party backends.- Scrolling is now handled by a new view wrapper,
ScrollView
. ForTextView
,SelectView
andListView
, it is opt-in, by wrapping it in aScrollView
or calling.scrollable()
from theScrollable
trait. Cursive::cb_sink()
now returns acrossbeam_channel::Sender
instead ofchan::Sender
. The API is mostly similar.SelectView::selection
now returns aOption<Rc<T>>
instead of panicking on an empty list.- The features of
AnyView
have been merged into the regularView
, so you should not need to useAnyView
directly, and can only useView
. Vec4
has been renamed toMargins
.
In addition, many non-breaking changes are present as well:
- Callbacks sent through
Cursive::cb_sink()
are now processed instantly, without the need forset_fps
. - Backends are now a dynamic choice rather than a comile-time selection.
- This means library do not need to bother with backend features anymore
- Features are still there to add available backends, but they are mutually compatible.
- Events are batch-processed, resulting in higher performance when a lot of events are sent at once (for instance when scrolling with the mouse).
- Some methods now return a callback:
SelectView::{set_selection, select_up, select_down, remove_item}
EditView::{set_content, insert, remove}
- API additions:
StackView::find_layer_from_id
SelectView::insert_item
TextArea::{enable, disable}
rect::Rect
- Various bugfixes
0.8.2
0.8.1
0.8.0
Major update. Check CHANGELOG.md
for complete list.
Highlights:
- Add styled text support.
TextView
can now display aStyledString
. AStyledString
can be built from multiple sources, including parsing markdown text.
- Fixed line-breaking algorithm (now doesn't break at invalid locations).
- Refactored
ColorStyle
. - Added
TextContent
to manage the content from aTextView
remotely. StackView
: added methods to re-order the layers, and reposition them on screen.Cursive::cb_sink
can now acceptFnOnce
callbacks- Various methods were added to query/update the selection/focus for most views.
- Usual bunch of bugfixes.
0.7.5
- Add mouse support to pancurses
- Better key modifier detection on ncurses backend
- Fix possible panic in
TextArea::set_content
- Add
TextArea::cursor(&self) -> usize
andTextArea::set_cursor(&mut self, usize)
- Use
Vec::splice
instead ofVecExt
from theodds
crate. This may require rustc > 1.21