Cursive v0.15.0 Release Notes

Release Date: 2020-05-26 // almost 4 years ago
  • ๐Ÿ’ฅ Breaking changes

    • Split library into a backend-agnostic cursive-core and a user-facing cursive.
    • 0๏ธโƒฃ Cursive::default now needs the cursive::CursiveExt trait to be in scope.
    • โšก๏ธ Update dependencies:
      • crossterm to 0.17.
      • enumset to 1.0
      • ahash to 0.3
      • pulldown-cmark to 0.7
    • โž• Add PaletteColor::HighlightText
    • AnyCb now takes a &mut dyn View rather than a &mut dyn Any.

    โšก๏ธ API updates

    • โž• Added cursive::{default,ncurses,pancurses,termion,crossterm,blt,dummy} functions.
    • โž• Add Cursive::debug_name
    • โž• Add ScreensView to move some code away from the Cursive root
      • Reworked global callbacks configuration
      • Ctrl-C can be rewired to no longer exit the application
    • Add SelectView::(try_)iter_mut()
    • ๐Ÿ’… Dialog::{test, info} now accept StyledString as input
    • โž• Add missing functions to Checkbox re: enabled state

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fix Ctrl-Z binding for ncurses
    • ๐Ÿ›  Fix potential crash with empty SelectView
    • โž• Add toml and markdown features to docs.rs

Previous changes from v0.14.0

  • ๐Ÿ’ฅ Breaking changes

    • cursive::event::AnyCb changed from Box<...> to &mut ..., so users of View::call_on_any no longer need to box their closures.
    • โœ‚ Remove BoxView::squishable.
    • โšก๏ธ Update crossterm to 0.14.
    • โœ‚ Removed From implementations for Margins. Use Margins::lrtb and the like instead.
      • Or Dialog::padding_lrtb.
    • ๐Ÿ—„ Renamed multiple types (old names are still re-exported, but deprecated):
      • BoxView -> ResizedView
      • ViewBox -> BoxedView
      • SizedView -> LastSizeView
      • Identifiable -> Nameable
      • Boxable -> Resizable
      • IdView -> NamedView
      • Selector::Id -> Selector::Name
      • with_id -> with_name
      • call_on_id -> call_on_name
      • find_id -> find_name
      • focus_id -> focus_name

    โšก๏ธ API updates

    • ๐Ÿ’… SelectView::{item, with_all} now accept S: Into<StyledString> for colored labels.
    • Add ScrollView::scroll_to_important_area.
    • Add LinearLayout::set_focus_index.
    • โž• Add XY::{sum, product}.
    • view::scroll is now a public module.
    • Add Cursive::process_events and Cursive::post_events.
      • This gives users finer control than Cursive::step.
    • Layer now has a color option.
    • LinearLayout can now directly add boxed views without re-boxing.
    • โž• Add inner getters to EnableableView.
    • Add PaddedView::get_inner(_mut).
    • โž• Add a bunch of constructors for Margins.
    • โž• Add Dialog::padding_lrtb
    • Add Dialog::set_padding*
    • โž• Add PaddedView::lrtb

    ๐Ÿ‘Œ Improvements

    • ๐Ÿ”„ Changed the default color for TitleSecondary from yellow to light blue.
    • ๐Ÿ”„ Changed the default color for Tertiary from grey to white.
    • โฌ‡๏ธ Reduced dependencies (toml is now optional, removed hashbrown).
    • 0๏ธโƒฃ Cursive::default() now fallbacks do dummy backend if no other is available.

    ๐Ÿ›  Bugfixes

    • ๐Ÿ›  Fixed ScrollView::show_scrollbars().
    • โšก๏ธ Correctly update the offset for ScrollView after focus change.
    • ๐Ÿ›  Fixed layout for BoxView with some size constraints.
    • ๐Ÿ On Windows, do not print unix-specific character during initialization.
    • ๐Ÿ›  Fix out-of-bounds access for some mouse events in MenuPopup