✓ Uses Rust 2018 edition
|new 0.1.4||Sep 10, 2019|
|0.1.3||Sep 9, 2019|
|0.1.2||Sep 9, 2019|
|0.1.1||Sep 3, 2019|
|0.1.0||Sep 3, 2019|
#51 in Command-line interface
Welcome to cursive-aligned-view 👋
A view wrapper for gyscos/cursive views which aligns child views
This project provides an
AlignedView for gyscos/cursive views which makes it possible to align the child view (center, left, right, top, bottom). The
AlignedView uses the
required_size reported by the child view and fills the rest of the available space with the views background color.
Expand to view
Simply add to your
[dependencies] cursive-aligned-view = "^0"
The easiest way to align a view is via the
use cursive_aligned_view::Alignable; let aligned = child_view.align_center();
This is the preferred way as it is chainable and consistent with cursive's
As an alternative you can use the
AlignedView constructors directly:
use cursive_aligned_view::AlignedView; let aligned = AlignedView::with_center(child_view);
Look into the documentation for a detailed explanation on the API.
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.
‼️ CAUTION ‼️ This crate uses Tmux for end2end testing and will kill your Tmux server during testing!
In order to run the integration tests, you first need to install a recent version of
tmux are installed, install required dependencies:
This will use
npm to install
shellshot in the
$ cargo test
to execute all available tests.
shields.io endpoints are generated inside the
./target/shields folder. They are used in this README.
Give a ⭐️ if this project helped you!