prototty_common
A collection of common elements and decorators.
Decorators Example
Let's continue the title example started here:
This will extend the unix frontend to draw a border around its output using the
Border
decorator defined in this crate.
extern crate prototty;
extern crate prototty_unix;
extern crate prototty_common;
// Assuming the title and its views were defined here
extern crate prototty_title;
use ;
use *;
// The `Border` decorator in prototty_common requires that the
// view which it decorates implements `ViewSize`, defined in
// prototty. Since neither `ViewSize` nor `Title` are defined
// in this crate, we need to define a new type, and implement
// `View` and `ViewSize` here in this crate.
;
Running this will produce the following output in your terminal: