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