Commit Graph

16 Commits

Author SHA1 Message Date
Alexandre Bury
22b8364877 Fix clippy warnings
Add default implementations
Return &mut View instead of &mut Box<View>
2017-07-18 01:43:50 +02:00
Alexandre Bury
ffe5b57749 Add ListView::is_empty 2017-06-08 09:41:53 -07:00
Alexandre Bury
d031d3784a Add methods to access ListView's children 2017-05-21 09:50:16 -07:00
Alexandre Bury
c300e0628d Rename find -> call_on
And update tutorials
2017-03-26 20:50:50 -07:00
Alexandre Bury
cdb3df7fc8 Merge branch 'master' into refview 2017-03-25 15:01:57 -07:00
Alexandre Bury
017bb21710 Add View::focus_view 2017-03-25 14:50:52 -07:00
Alexandre Bury
2cd2787119 Event::Unknown now carries the unknown bytes rather than a i32
And termion has been updated to use termion::Event::Unsupported
2017-03-25 11:01:25 -07:00
Alexandre Bury
7d9cb03ffb More checks against small viewports
Prevents panics when the terminal is resized.
2017-03-05 11:35:20 -08:00
Alexandre Bury
b63762d441 View::find_any now takes a closure instead of returning reference
Also updated Finder::find and find_id.
2017-02-07 15:49:06 -08:00
Alexandre Bury
d7eaa5a086 Rename View::get_min_size -> required_size 2017-01-23 22:53:03 -08:00
Casey Primozic
9894dd9715 Added functions to register callbacks for ListView
- Added `on_selected()` and `set_on_selected()` funtions that are called when the focus is changed
 - Added `focused()` to return the index of the currently focused item.
2017-01-10 19:20:06 -06:00
Alexandre Bury
fde1091051 Fix focus in ListView 2016-10-13 11:57:24 -07:00
Alexandre Bury
3b3f403f7a Apply rustfmt 2016-10-02 15:22:29 -07:00
Alexandre Bury
93980a7d0c Rename View::find -> View::find_any
And add the `Finder` trait on Views to provide a true `find`.
2016-09-21 11:33:44 -07:00
Alexandre Bury
3701c85ffd Add clear methods to SelectView and ListView 2016-09-05 15:33:52 -07:00
Alexandre Bury
f87d0e7c5b Move views to new views module 2016-07-28 16:36:01 -07:00