mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-13 20:53:07 +00:00
9.1 KiB
9.1 KiB
Changelog
0.14.0 (Next version)
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.12.
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
Improvements
- Changed the default color for
TitleSecondary
from yellow to light blue. - Reduced dependencies (
toml
is now optional, removedhashbrown
). Cursive::default()
now fallbacks do dummy backend if no other is available.
Bugfixes
- Fixed
ScrollView::show_scrollbars()
- Fixed layout for
BoxView
with some size constraints. - On Windows, do not print unix-specific character during initialization.
0.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()
. - Add
SliderView::{get_value, get_max_value}
.
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
- Bring back
Cursive::set_fps
for <30Hz refresh rates. - Add
Cursive::backend_name
to get the name of the current backend. - Add a new backend based on the crossterm library.
- 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 returnio::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 properfind_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 ofCursive::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
New features
- Add
EventTrigger
and updateOnEventView
to use it.- Breaking change: "inner" callbacks for OnEventView now take the event as extra argument.
- Add
Printer::enabled
andEnableableView
to disable whole subtrees. - Add
RadioGroup::on_change
to set a callback on selection change. SelectView
now usesStyledString
to display colored text.- Add
PaddedView
to add padding to any view. - Update dependencies
- Breaking change: crossbeam-channel was updated, and using
send()
now returns aResult
.
- Breaking change: crossbeam-channel was updated, and using
Bugfixes
- Fix mouse events on Ubuntu
Doc
- Added examples to most utility types (
XY
,Vec2
, ...)
0.9.2
New features
- Add an optional title to
Panel
- Add
immut1!
,immut2!
andimmut3!
macros to wrap aFnMut
inFn
- SelectView: autojump is now opt-in (jump to an element after a letter is pressed)
Bugfixes
- Fix possible crash with
ListView
andSelectView
in very small spaces - Fix termion backend compilation on non-unix platforms
0.9.1
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
Doc
- Fix Readme and examples with
Cursive::default()
0.9.0
New features
- Cursive now supports third-party backends
- Add generic
ScrollView
wrapper. Removes internal scrolling behaviour fromTextView
. - Callbacks sent through
Cursive::cb_sink()
are now processed instantly, without the need forset_fps
. - Make backend a dynamic choice
- User must select a backend in
Cursive::new
- 3rd party libraries do not need to play with backend features anymore
- User must select a backend in
- Move from
chan
andchan-signals
tocrossbeam-channel
andsignal-hook
- Batch-process events for higher performance
- Add
StackView::find_layer_from_id
- Add
SelectView::insert_item
- Add
TextArea::{enable, disable}
- Reworked
AnyView
SelectView
: Fix mouse events- Return callbacks from manual control methods
SelectView::{set_selection, select_up, select_down, remove_item}
EditView::{set_content, insert, remove}
- Add
rect::Rect
- Add
HideableView
Changes
- Replaced
Cursive::new()
withCursive::default()
- Renamed
Vec4
toMargins
Callbacks
cannot be created from functions that return a value- The returned value used to be completely ignored
AnyView
does not extendView
anymore (instead,View
extendsAnyView
)- If you were using
AnyView
before, you probably need to replace it withView
- If you were using
- Scrolling is now added to a view with
.scrollable()
cb_sink
is now acrossbeam_channel::Sender
instead ofchan::Sender
SelectView::selection
now returns anOption<Rc<T>>
instead of justRc<T>
. It will returnNone
if theSelectView
is empty.
0.8.1
New features
- 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
0.8.0
New features
- Style (breaking change):
- Added support for bold/italic/underlined text
- Added
StyledString
for markup text - Refactored line-break module
- Colors (breaking change):
- Added ColorStyle and PaletteColor for more flexible colored text
- Buttons:
- Added
Dialog::buttons
to iterate on buttons - Added
Button::set_label
andButton::label
- Added
- TextView:
- Added TextContent, a way to separate model and view for TextView
- Added manual scrolling methods
- Allow multiple global callbacks per event
- Allow buttons and delimiters in top-level menubar
- StackView:
- Added
StackView::move_layer
to re-order layers StackView::pop_layer
now returns the pop'ed view- Added
StackView::reposition_layer
to move a layer around
- Added
- Dialog: added
Dialog::focus(&self)
- SelectView: added
SelectView::selected
Cursive::cb_sink
now acceptsFnOnce
(previouslyFn
only)
Bugfixes
- Fix a bug in
TextArea::set_content
- Fix
Color::from_256colors
for grayscale colors - Fix resize detection on windows
- Fix possible panic with weird input on pancurses
- Fix possible panic in ListView layout
Doc
- Add per-distributions instructions to install ncurses
- Improved comments in examples
- Improve doc for
Cursive::find_id
- Improve doc for
Identifiable::with_id
- Include Changelog