mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
More documentation
This commit is contained in:
parent
e5c623bb07
commit
6fad4aa36a
@ -1,3 +1,5 @@
|
||||
//! User-input events and their effects.
|
||||
|
||||
use std::rc::Rc;
|
||||
|
||||
/// Callback is a function that can be triggered by an event.
|
||||
|
27
src/lib.rs
27
src/lib.rs
@ -1,12 +1,31 @@
|
||||
//! # Cursive
|
||||
//!
|
||||
//! Cursive is a TUI library built on top of ncurses-rs.
|
||||
//! It allows to easily build layouts for text-based applications.
|
||||
//!
|
||||
//! ## Example
|
||||
//! ```
|
||||
//! extern crate cursive;
|
||||
//!
|
||||
//! use cursive::Cursive;
|
||||
//! use cursive::view::TextView;
|
||||
//!
|
||||
//! fn main() {
|
||||
//! let mut siv = Cursive::new();
|
||||
//!
|
||||
//! siv.add_layer(TextView::new("Hello World!\nPress q to quit."));
|
||||
//!
|
||||
//! siv.add_global_callback('q' as i32, |s| s.quit());
|
||||
//!
|
||||
//! siv.run();
|
||||
//! }
|
||||
//! ```
|
||||
|
||||
extern crate ncurses;
|
||||
|
||||
/// User-input events and their effects.
|
||||
pub mod event;
|
||||
/// Defines various views to use when creating the layout.
|
||||
pub mod view;
|
||||
/// Makes drawing on ncurses windows easier.
|
||||
pub mod printer;
|
||||
/// 2D points.
|
||||
pub mod vec2;
|
||||
mod box_view;
|
||||
mod stack_view;
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! Makes drawing on ncurses windows easier.
|
||||
|
||||
use ncurses;
|
||||
use vec2::{Vec2,ToVec2};
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! 2D points.
|
||||
|
||||
use std::ops::{Add, Sub};
|
||||
use std::cmp::min;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
//! Defines various views to use when creating the layout.
|
||||
|
||||
use event::EventResult;
|
||||
|
||||
pub use box_view::BoxView;
|
||||
|
Loading…
Reference in New Issue
Block a user