This project is work-in-progress
How to use
To use cursive-multiplex in your cursive application add to your crate root
extern crate cursive_multiplex;
And then use the MuxBuilder
to build a new Mux View
let builder = new;
let _= builder.build;
With the MuxBuilder defaults are automatically set for controls of course you can still change them, have a look at the docs.
Adding views
You can add views by giving a path or an id to an existing node e.g.
let new_node = mux.add_horizontal_id.unwrap;
Its also possible to add views by their path.
let new_node = mux.add_horizontal_path;
Returned will be a Result Ok contains the new id assigned to the view, or an error in case of failure.
Removing Views
You can also remove views, by giving the id of the views.
mux.remove_id?;
On success the id of the removed node is returned.
Switch Views
If you want to reorder your views you can easily switch them by using
mux.switch_views?;
Add to your project
Add the crate to your Cargo.toml
under dependencies
[dependencies]
cursive-multiplex = "0.1.0"
Troubleshooting
If you find any bugs/unexpected behaviour or you have a proposition for future changes open an issue describing the current behaviour and what you expected.
Development
TBD
Running the tests
Preparing integration tests
In order to run the integration tests, you first need to install a recent version of npm
!
After npm
is installed, install required dependencies:
$ ./scripts/prepare-end2end-tests.sh
This will use npm
to install jest
and shellshot
in the `tests** folder.
Running all test suites
Just run
$ cargo test
to execute all available tests.
shields.io endpoints
shields.io endpoints are generated inside the ./target/shields
folder. They are used in this README.
Authors
Fin Christensen
:octocat:
@fin-ger
:elephant:@fin_ger@mastodon.social
:bird:@fin_ger_github
Johannes Wünsche
:octocat:
@jwuensche
:elephant:@fredowald@mastodon.social
:bird:@Fredowald
Show your support
Give a :star: if this project helped you!