cursive/examples
2019-09-09 14:45:07 -07:00
..
mines Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
colors.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
debug_console.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
dialog.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
edit.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
hello_world.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
key_codes.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
linear.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
list_view.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
logs.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
lorem.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
markup.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
menubar.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
mutation.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
position.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
progress.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
radio.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
Readme.md Add examples descriptions 2018-01-18 10:32:08 -08:00
refcell_view.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
scroll.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
select_test.rs Rustfmt 2019-07-30 16:08:40 -07:00
select.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
slider.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
tcp_server.rs Improve tcp_server example a bit 2019-06-18 11:44:47 -07:00
terminal_default.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
text_area.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
theme_manual.rs Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
theme.rs Make toml an optional feature 2019-09-09 14:45:07 -07:00
user_data.rs Add user-data 2019-03-03 18:06:50 -08:00
vpv.rs replace CbFunc with Box<FnOnce()> (#351) 2019-07-05 00:16:26 -07:00

Cursive Examples

Here are example programs using Cursive to help you getting familiar with the various aspects of the library.

To run an example, use cargo run --example EXAMPLE_NAME.

hello_world

Simplest example possible, it will show you the starting point of a basic Cursive application.

dialog

This example wraps the text in a Dialog view, showing the basic idea of view composition.

lorem

This example loads a large text file to show scrolling behaviour. It also includes greek and japanese characters to show non-ascii support.

edit

Here we have an EditView to get input from the user, and use that input in the next view. It shows how to identify a view with an ID and refer to it later.

mutation

This example modifies the content of an existing view.

linear

This example uses a LinearView to put multiple views side-by-side.

menubar

Here we learn how to create a menubar at the top of the screen, and populate it with static and dynamic entried.

logs

This example defines a custom view to display asynchronous input from a channel.

key_codes

This example uses a custom view to print any input received. Can be used as a debugging tool to see what input the application is receiving.

select

This example uses a SelectView to have the user pick a city from a long list.

list_view

This shows a use of a ListView, used to build simple forms.

text_area

This example uses a TextArea, where the user can input a block of text.

markup

This example prints a text with markup decorations.

theme

This loads a theme file at runtime to change default colors.

theme_manual

Instead of loading a theme file, this manually sets various theme settings.

terminal_default

This example shows the effect of the Color::TerminalDefault setting.

colors

This example draws a colorful square to show off true color support.

refcell_view

Here we show how to access multiple views concurently through their IDs.

progress

This shows how to send information from an asynchronous task (like a download or slow computation) to update a progress bar.

radio

This shows how to use RadioGroup and RadioButton.

slider

This is a demonstration of the SliderView.

mines (Work in progress)

A larger example showing an implementation of minesweeper.