Crate cursive_extras
source ·Expand description
Cursive Extras
Extra views for the Cursive TUI library as well some helper functions and macros
Features
image_view
: Enables theImageView
viewtab_dialog
: Enables theTabDialog
viewbuffered_backend
: Enables a termion based buffered backend
Macros
Convenience macro that creates a horizontal layout of views
Convenience macro that updates the specified
StatusView
reference with an error message and returns
from the current callback if an error happens, returns the Ok
value otherwiseConvenience macro that makes
SelectView
s easier to createConvenience macro that generates a settings view using sub-views wrapped in a
Dialog
viewSame as the
settings!
macro, but allows for a custom confirmation text to be defined as wellConvenience macro that creates a vertical layout of views
Structs
Horizontal divider view
Simple loading animation view that runs a task in a background thread and shows a loading animation and message while it completes and allows for retrieval of a return value
View that can be used to report an application’s status.
It is meant to be placed at the bottom of the main Cursive layer
Vertical divider view
Functions
Convenience function that generates a better looking Cursive theme
Convenience function that creates a dialog that runs a callback if the
user selects “Yes”
confirm_dialog_styledDeprecated
Same as
confirm_dialog()
, but accepts StyledString
s instead for the textHorizontal spacer fills all the available width
Vertical spacer fills all the available height
Horizontal spacer with fixed width
Vertical spacer with fixed height
Convenience function that return the state of a named check box
Convenience function that shows a user a dialog box
with a message that includes a back button
info_dialog_styledDeprecated
Sames as
info_dialog()
, but accepts StyledString
s instead for the textConvenience function that returns a horizontal
LinearLayout
that is a named check box with a labelSame as
labeled_checkbox()
but also accepts a closure to execute when the check box’s state changesConvenience function that shows a loading pop up
Convenience function that creates a named
EditView
that has a better
looking style and can optionally act as a password entry boxSame as
styled_editview()
but allows for a color to be chosen instead of using the highlight colorType Definitions
A spacer between 2 views