Alexandre Bury
840fd627b7
Remove internal scrolling from SelectView
2018-07-24 19:38:24 -07:00
Alexandre Bury
1af1b9e5fd
Fix doc comment
2018-07-22 20:26:17 -07:00
Alexandre Bury
0046eba66d
SelectVIew::selection now returns Option<Rc<T>>
2018-07-22 20:25:13 -07:00
Alexandre Bury
2610b697a8
Rustfmt
2018-07-19 19:44:59 -07:00
Alexandre Bury
5e1956b737
Merge branch 'master' into scroll
2018-06-15 23:21:10 -07:00
Alexandre Bury
8acc08f340
Rustfmt
2018-06-10 23:29:19 -07:00
Alexandre Bury
2088d5de2a
Cargo fmt
2018-05-17 17:37:39 -07:00
Alexandre Bury
755854963f
Fix clippy warnings
2018-05-17 17:35:57 -07:00
Alexandre Bury
f0b3287d73
Merge branch 'master' into scroll
2018-04-16 22:42:42 -07:00
Alexandre Bury
a355171844
Fix clippy warnings
2018-04-10 11:53:25 -07:00
Alexandre Bury
8641098781
Split Printer::sub_printer into sub-methods
2018-04-04 17:49:11 -07:00
Alexandre Bury
126530b9a9
Cursive::new now takes the backend as argument
2018-04-01 16:39:03 -07:00
Alexandre Bury
3588955f0b
Add SelectView::insert_item
2018-03-25 00:30:48 -07:00
Alexandre Bury
5673b59c10
Implement {SelectView, MenuPopup}::important_area
2018-03-22 14:31:28 -07:00
Alexandre Bury
1ad515e5f0
rustfmt
2018-03-22 11:04:58 -07:00
Alexandre Bury
2c73e35f85
Split import line
...
Not on stable yet it seems
2018-03-15 11:57:12 -07:00
Alexandre Bury
16a3bd7bbe
Return callbacks from EditView::set_content
...
Just like for SelectView::select_up
2018-03-15 11:50:22 -07:00
Alexandre Bury
987796f2fa
Return selection change callback in SelectView methods
2018-03-15 11:42:49 -07:00
Alexandre Bury
1deee26970
Better checks for mouse events on SelectView
2018-03-15 09:36:26 -07:00
Nils Berg
8bf82a9b58
make SelectView less greedy
2018-03-01 21:13:15 +01:00
Alexandre Bury
847fd7d800
Add SelectView::selected
2018-02-11 19:26:44 -08:00
Tymoteusz Jankowski
4545ed0bf3
fmt
2018-01-26 17:26:21 +01:00
Tymoteusz Jankowski
d3fadc7c3c
Add SelectView.get_item_mut
2018-01-26 17:24:44 +01:00
Tymoteusz Jankowski
4dc403df78
Add SelectView.get_item
2018-01-26 13:25:19 +01:00
Alexandre Bury
3674c118cb
Rustfmt
2018-01-22 11:55:56 -08:00
Alexandre Bury
98aff39904
Move View::as_any
to separate trait AnyView
2018-01-22 11:50:25 -08:00
Alexandre Bury
1551fbb543
Add View::as_any and View::as_any_mut
2018-01-22 09:20:45 -08:00
Alexandre Bury
5ac0fce363
Refactor ColorStyle
...
Add the notion of PaletteColor to use a color from the palette.
Breaking change: most color styles are now methods rather than enum
variants.
2018-01-17 10:22:06 -08:00
Alexandre Bury
e4cd68a4eb
Rustfmt
2017-12-30 23:03:42 +01:00
Alexandre Bury
bd9b6a695b
Return view on pop_layer
...
Callbacks now often allow (and ignore) a return type.
2017-12-16 14:41:15 +01:00
Adrian Neumann
c92b1acb6e
Ignore keys properly in SelectView::on_event
...
on_event consumes all keypresses by trying to jump to the item that matches the char. Even if no such item is found, the key event is lost to the rest of the application. By returning EventResult::Ignored when the key press has no effect, the key event that have no effect on the SelectView can still be used by somebody else.
2017-10-26 20:23:00 +02:00
Alexandre Bury
420454cc0f
Better mouse scroll drag
...
Now saturates when to the top or left.
2017-10-14 21:50:08 -07:00
Alexandre Bury
f90621811c
More rustfmt
2017-10-14 21:18:50 -07:00
Alexandre Bury
294a4102b4
Fix mouse support for ListView
2017-10-14 21:01:07 -07:00
Alexandre Bury
850e0b2cd1
Better bounds on SelectView clickable area
2017-10-13 18:11:25 -07:00
Alexandre Bury
a5952d0741
Fix some mouse/scroll issues with SelectView and TextView
2017-10-13 17:53:39 -07:00
Alexandre Bury
93982517ae
Fix clippy warnings
2017-10-13 11:24:17 -07:00
Alexandre Bury
394e61a328
Fix SelectView mouse handling
2017-10-12 16:44:03 -07:00
Alexandre Bury
2fed1f3ff4
Add mouse support for regular SelectView
2017-10-12 14:32:48 -07:00
Alexandre Bury
da6a92f508
feat: Add SelectView::select_{up,down}
2017-08-23 17:01:07 -07:00
Alexandre Bury
05bac7a192
More safe subtractions all around.
2017-08-14 16:32:39 -07:00
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
7c95114955
Add SelectView::set_selection
2017-03-27 13:14:03 -07:00
Alexandre Bury
09202f55c8
Reset focus in SelectView::clear
2017-03-27 13:07:22 -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
d7eaa5a086
Rename View::get_min_size
-> required_size
2017-01-23 22:53:03 -08:00
Alexandre Bury
ed841825f2
Add methods to edit menubar and menutrees
...
Fixes #101
2017-01-23 15:50:56 -08:00
Alexandre Bury
14f971e2bc
Allow negative relative offset in Position
...
Was causing crashes when popup-SelectViews were larger than their
parent.
Made some methods on Vec2 more generic to XY<T: ...>
2017-01-10 17:47:31 -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
nabijaczleweli
c81579a20a
Disable failing doctests
2016-10-11 19:11:40 +02:00