Skip to content

0.9.0

Compare
Choose a tag to compare
@gyscos gyscos released this 26 Jul 05:27
· 729 commits to main since this release

This releases is quite large and includes some breaking changes:

  • Cursive::new() has been renamed Cursive::default(). Cursive::new is now used to select a backend, allowing third-party backends.
  • Scrolling is now handled by a new view wrapper, ScrollView. For TextView, SelectView and ListView, it is opt-in, by wrapping it in a ScrollView or calling .scrollable() from the Scrollable trait.
  • Cursive::cb_sink() now returns a crossbeam_channel::Sender instead of chan::Sender. The API is mostly similar.
  • SelectView::selection now returns a Option<Rc<T>> instead of panicking on an empty list.
  • The features of AnyView have been merged into the regular View, so you should not need to use AnyView directly, and can only use View.
  • Vec4 has been renamed to Margins.

In addition, many non-breaking changes are present as well:

  • Callbacks sent through Cursive::cb_sink() are now processed instantly, without the need for set_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