A Text User Interface library for the Rust programming language
Dialog::into_content
.Callback::from_fn_once
and once1!
macro to wrap a FnOnce
in a FnMut
.FixedLayoutView
with manual placement of child views.OnLayoutView
to override View::Layout
Cursive::{dump, restore}
to save and load the global state.NamedView::{name, set_name}
to retrieve or replace the given name.LinearLayout::find_child_with_name
.ScrollView::on_scroll
callback.once1!
macro to turn a FnOnce
into FnMut
.Default
for some wrapper views where the child is Default
.wrap_impl!
macro using fully-qualified paths.LinearLayout
giving children incorrect sizes.ShadowView
and PaddedView
.TextArea::set_cursor
before its first layout phase.cursive-core
and a user-facing cursive
.Cursive::default
now needs the cursive::CursiveExt
trait to be in scope.PaletteColor::HighlightText
AnyCb
now takes a &mut dyn View
rather than a &mut dyn Any
.cursive::{default,ncurses,pancurses,termion,crossterm,blt,dummy}
functions.Cursive::debug_name
ScreensView
to move some code away from the Cursive
root
SelectView::(try_)iter_mut()
Dialog::{test, info}
now accept StyledString
as inputSelectView
toml
and markdown
features to docs.rscursive::event::AnyCb
changed from Box<...>
to &mut ...
, so users of View::call_on_any
no longer need to box their closures.BoxView::squishable
.From
implementations for Margins
. Use Margins::lrtb
and the like instead.
Dialog::padding_lrtb
.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
SelectView::{item, with_all}
now accept S: Into<StyledString>
for colored labels.ScrollView::scroll_to_important_area
.LinearLayout::set_focus_index
.XY::{sum, product}
.view::scroll
is now a public module.Cursive::process_events
and Cursive::post_events
.
Cursive::step
.Layer
now has a color
option.LinearLayout
can now directly add boxed views without re-boxing.EnableableView
.PaddedView::get_inner(_mut)
.Margins
.Dialog::padding_lrtb
Dialog::set_padding*
PaddedView::lrtb
TitleSecondary
from yellow to light blue.Tertiary
from grey to white.toml
is now optional, removed hashbrown
).Cursive::default()
now fallbacks do dummy backend if no other is available.ScrollView::show_scrollbars()
.ScrollView
after focus change.BoxView
with some size constraints.MenuPopup
enum-map
fron 0.5 to 0.6Effect::Strikethrough
(not supported on ncurses)ListView::remove_child
xursive::CbFunc
with Box<FnOnce>
ScrollView::{inner_size, is_as_{bottom, top, left, right} }
SliderView
cursive::logger
SizeConstraint::Full
with ScrollView
.Cursive::set_fps
for <30Hz refresh rates.Cursive::backend_name
to get the name of the current backend.dyn AnyView
SelectView
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
.MenuPopup
borders near delimiters.Cursive::{ncurses, pancurses, termion}
now return
io::Result<Self>
instead of panicking. Cursive::default()
still unwraps.
Cursive::try_new
for failible backends.set_fps(i32)
with set_autorefresh(bool)
Finder::find_id()
is renamed to call_on_id()
, and a proper
find_id()
was added instead.Cursive::clear()
now takes &mut self
logger::init()
) and a DebugConsole
(cursive::toggle_debug_console()
)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.StackView::remove_layer()
CircularFocus
view (and bring proper circular focus to dialogs)HideableView::is_visible()
type CbSink = Sender<Box<CbFunc>>
as an alias for the return type of
Cursive::cb_sink()
LinearLayout::{insert_child, swap_children, set_weight}
for more
in-place modifications.Printer::{cropped_centered,shrinked_centered}
Dialog
and Panel
EventTrigger
and update OnEventView
to use it
OnEventView
now take the event as extra argument.Printer::enabled
and EnableableView
to disable whole subtreesPaddedView
to add padding around any viewRadioGroup::on_change
to set a callback on selection changeSelectView
SelectView::get_item_mut
now returns a Option<(&mut StyledString, &mut T)>
XY
and Vec2
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-inPanel
can now have a titleSelectView
and ListView
.