Releases: gyscos/cursive
Releases · gyscos/cursive
cursive_core-v0.1.1
cursive-core 0.1.1
API updates
- Add
Dialog::into_content
. - Add
Callback::from_fn_once
andonce1!
macro to wrap aFnOnce
in aFnMut
. - Add
FixedLayoutView
with manual placement of child views. - Add
OnLayoutView
to overrideView::Layout
- Add
Cursive::{dump, restore}
to save and load the global state. - Add
NamedView::{name, set_name}
to retrieve or replace the given name. - Add
LinearLayout::find_child_with_name
. - Add
ScrollView::on_scroll
callback. - Add
once1!
macro to turn aFnOnce
intoFnMut
. - Implement
Default
for some wrapper views where the child isDefault
.
Bugfixes
- More hygienic
wrap_impl!
macro using fully-qualified paths. - Fixed
LinearLayout
giving children incorrect sizes. - More accurate "important area" for
ShadowView
andPaddedView
. - Fix potential panic when calling
TextArea::set_cursor
before its first layout phase. - Disabled views no longer accept input if they are still in focus.
cursive-v0.15.0
Breaking changes
- Split library into a backend-agnostic
cursive-core
and a user-facingcursive
. Cursive::default
now needs thecursive::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 theCursive
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 acceptStyledString
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
andmarkdown
features to docs.rs
v0.14.0
Breaking changes
cursive::event::AnyCb
changed fromBox<...>
to&mut ...
, so users ofView::call_on_any
no longer need to box their closures.- Remove
BoxView::squishable
. - Update crossterm to 0.14.
- Removed
From
implementations forMargins
. UseMargins::lrtb
and the like instead.- Or
Dialog::padding_lrtb
.
- Or
- 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 acceptS: 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
andCursive::post_events
.- This gives users finer control than
Cursive::step
.
- This gives users finer control than
Layer
now has acolor
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, removedhashbrown
). 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
v0.13.0
Breaking changes
- Update
enum-map
fron 0.5 to 0.6
API updates
- Add
Effect::Strikethrough
(not supported on ncurses) - Add
ListView::remove_child
- Replace
xursive::CbFunc
withBox<FnOnce>
- Add
ScrollView::{inner_size, is_as_{bottom, top, left, right} }
- Add getters for current value in
SliderView
- More fields made public in
cursive::logger
- Add a "puppet" backend for testing and instrumentation
Improvements
- Performance improvements for the crossterm backend
Bugfixes
- Fix a possible panic when a TextView is updated asynchronously while it's being layed out.
- Fixed weird behaviour of
SizeConstraint::Full
withScrollView
.
0.12.0
Breaking changes
- Updated
enumset
from 0.3 to 0.4
API updates
- Add
Cursive::take_user_data
, replaces the current user data with()
.
Improvements
DebugConsole
now has horizontal scrolling enabled.pancurses
backend now correctly recognizes the "Enter" key from the numpad as "Enter".
0.11.2
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.
0.11.1
API updates
- Added manual scrolling methods to
view::scroll::Core
:keep_in_view
,scroll_to
,scroll_to_x
,scroll_to_y
Note: theview::scroll
module is hidden behind an experimental
featureunstable_scroll
.
Improvements
- Improved printer performance (thanks to @chrisvest).
Bugfixes
- Fixed
MenuPopup
borders near delimiters.
0.11.0
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.
- Also added
- Replaced
set_fps(i32)
withset_autorefresh(bool)
Finder::find_id()
is renamed tocall_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 aDebugConsole
(cursive::toggle_debug_console()
) - Add user-data to Cursive.
Cursive::set_user_data()
can store some user-defined data structure.Cursive::user_data()
andCursive::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
andPanel
0.10.0
- Add
EventTrigger
and updateOnEventView
to use it- Breaking change: "inner" callbacks for
OnEventView
now take the event as extra argument.
- Breaking change: "inner" callbacks for
- Add
Printer::enabled
andEnableableView
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 aOption<(&mut StyledString, &mut T)>
- Breaking change:
- Fix mouse events on Ubuntu
- Add doc tests/examples to
XY
andVec2