Skip to content

@gyscos gyscos released this Apr 18, 2019 · 1 commit to master since this release

API updates

  • Add a new backend based on the crossterm library.
  • Bring back Cursive::set_fps for <30Hz refresh rates.
  • Add Cursive::backend_name to get the name of the current backend.
  • Add direct downcast methods to dyn AnyView
  • Add sort methods to SelectView

Improvements

  • Improved printer performance with styled spans.
Assets 2

@gyscos gyscos released this Mar 16, 2019 · 18 commits to master since this release

API updates

  • Added manual scrolling methods to view::scroll::Core:
    • keep_in_view, scroll_to, scroll_to_x, scroll_to_y
      Note: the view::scroll module is hidden behind an experimental
      feature unstable_scroll.

Improvements

  • Improved printer performance (thanks to @chrisvest).

Bugfixes

  • Fixed MenuPopup borders near delimiters.
Assets 2

@gyscos gyscos released this Mar 16, 2019 · 28 commits to master since this release

Breaking changes

  • Cursive::{ncurses, pancurses, termion} now return
    io::Result<Self> instead of panicking. Cursive::default() still unwraps.
    • Also added Cursive::try_new for failible backends.
  • Replaced set_fps(i32) with set_autorefresh(bool)
  • Finder::find_id() is renamed to call_on_id(), and a proper
    find_id() was added instead.
  • Updated the Backend trait for a simpler input system
  • Updated to Rust 2018 edition (now requires rustc > 1.31)
  • Cursive::clear() now takes &mut self

API updates

  • Add a logging implementation (logger::init()) and a DebugConsole
    (cursive::toggle_debug_console())
  • Add user-data to Cursive.
    • Cursive::set_user_data() can store some user-defined data structure.
    • Cursive::user_data() and Cursive::with_user_data() can be used to
      access the data.
  • Add StackView::remove_layer()
  • Add CircularFocus view (and bring proper circular focus to dialogs)
  • Add HideableView::is_visible()
  • Add type CbSink = Sender<Box<CbFunc>> as an alias for the return type of
    Cursive::cb_sink()
  • Add LinearLayout::{insert_child, swap_children, set_weight} for more
    in-place modifications.
  • Add Printer::{cropped_centered,shrinked_centered}

Improvements

  • Updated termion backend to use direct /dev/tty access for improved performance.
  • Enabled raw mode for ncurses and pancurses. Among other improvements, this
    lets applications receive Ctrl+S and Ctrl+Q events.

Bugfixes

  • Fixed overflow check for titles in Dialog and Panel
Assets 2

@gyscos gyscos released this Dec 1, 2018 · 78 commits to master since this release

  • Add EventTrigger and update OnEventView to use it
    • Breaking change: "inner" callbacks for OnEventView now take the event as extra argument.
  • Add Printer::enabled and EnableableView to disable whole subtrees
  • Add PaddedView to add padding around any view
  • Add RadioGroup::on_change to set a callback on selection change
  • Use styled strings in SelectView
    • Breaking change: SelectView::get_item_mut now returns a Option<(&mut StyledString, &mut T)>
  • Fix mouse events on Ubuntu
  • Add doc tests/examples to XY and Vec2
Assets 2

@gyscos gyscos released this Nov 5, 2018 · 104 commits to master since this release

  • Add immut! family of macros to wrap a FnMut in a Fn
  • SelectView: autojump (jump to an item when a letter is pressed) is now opt-in
  • Panel can now have a title
  • Fixed layout bug with SelectView and ListView.
Assets 2

@gyscos gyscos released this Sep 17, 2018 · 117 commits to master since this release

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)
Assets 2

@gyscos gyscos released this Jul 26, 2018 · 143 commits to master 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
Assets 2

@gyscos gyscos released this Jul 26, 2018 · 301 commits to master since this release

  • Adds Printer::with_theme to apply a different theme to a subtree.
Assets 2

@gyscos gyscos released this Mar 11, 2018 · 302 commits to master since this release

  • Add Cursive::clear_global_callbacks
  • Bugfixes:
    • Fix non-ASCII input with pancurses backend
    • Fix StackView::move_layer
    • Fix layout computation for SelectView
    • Remove unused maplit dependency for termion and blt backends
Assets 2

@gyscos gyscos released this Feb 20, 2018 · 315 commits to master since this release

Major update. Check CHANGELOG.md for complete list.

Highlights:

  • Add styled text support.
    • TextView can now display a StyledString. A StyledString 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 a TextView remotely.
  • StackView: added methods to re-order the layers, and reposition them on screen.
  • Cursive::cb_sink can now accept FnOnce callbacks
  • Various methods were added to query/update the selection/focus for most views.
  • Usual bunch of bugfixes.
Assets 2
You can’t perform that action at this time.