Commit Graph

57 Commits

Author SHA1 Message Date
Alexandre Bury
6ce2dba8a1 Fix clippy warnings 2018-06-21 14:44:30 -07:00
Alexandre Bury
2088d5de2a Cargo fmt 2018-05-17 17:37:39 -07:00
Alexandre Bury
39babacbf5 Add AnyCb type alias 2018-04-16 22:39:16 -07:00
Alexandre Bury
1ad515e5f0 rustfmt 2018-03-22 11:04:58 -07:00
Alexandre Bury
9bc723ab4a Do not accept any return value for callbacks
It got added so we could keep using `s.pop_layer()` in single-line callbacks.
It was confusing, and the return value was ignored anyway.
2018-03-16 15:50:56 -07:00
Alexandre Bury
987796f2fa Return selection change callback in SelectView methods 2018-03-15 11:42:49 -07:00
Alexandre Bury
62260a025e Rustfmt 2018-02-16 17:21:24 -08:00
Alexandre Bury
e4cd68a4eb Rustfmt 2017-12-30 23:03:42 +01:00
Alexandre Bury
799ec812e4 Add TextContent and TextContentRef
To manage the model separately from the view.
2017-12-30 23:00:48 +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
Alexandre Bury
70906aa5de Add mines example 2017-11-29 02:11:11 -08:00
Alexandre Bury
f90621811c More rustfmt 2017-10-14 21:18:50 -07:00
Alexandre Bury
93982517ae Fix clippy warnings 2017-10-13 11:24:17 -07:00
Alexandre Bury
0bb1fb4b2a Add Event::grabs_focus 2017-10-11 15:06:35 -07:00
Alexandre Bury
2d703811c5 Add Event::relativize 2017-10-11 11:33:35 -07:00
Alexandre Bury
c64e7dd7b3 Add MouseEvent::Hold 2017-10-10 17:49:53 -07:00
Alexandre Bury
a68fd3493b Add MouseEvent to the Event enum 2017-10-08 17:13:50 -07:00
Alexandre Bury
6bb3e88c2e feat: Add pre-events and inner events to OnEventView 2017-08-23 16:43:17 -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
65d86f3638 Add Event::Exit
Currently only sent by the bear lib terminal.
2016-10-11 17:48:37 -07:00
Alexandre Bury
4aaee06d9e Fix screen clear on layer removal
Fixes #78.
2016-10-11 17:29:13 -07:00
nabijaczleweli
2c009f694b
Add PauseBreak and F0 keys. Properly handle Tab 2016-10-10 10:34:33 +02:00
Alexandre Bury
3b3f403f7a Apply rustfmt 2016-10-02 15:22:29 -07:00
Alexandre Bury
e29511e757 Add ProgressBar
Also make Callback its own NewType to add comversion methods.
2016-07-24 23:01:09 -07:00
Alexandre Bury
a22c92a1a1 Add ListView
Also added `examples/list_view.rs`.
2016-07-16 13:25:21 -07:00
Alexandre Bury
1010c825ae Added doc for event module 2016-07-14 23:25:32 -07:00
Alexandre Bury
309c471a63 Add #![deny(missing_docs)]
And fill the appropriate missing ones
2016-07-11 20:26:33 -07:00
Alexandre Bury
c07e8b6aee Rustfmt 2016-07-10 19:11:21 -07:00
Alexandre Bury
6e0819f723 Simplify Event enum
Now properly unify Alt/Ctrl/Shift handling
2016-07-10 18:27:26 -07:00
Alexandre Bury
1d54764cdb Working menubar example
Also update callback: use Rc instead of Box
2016-07-02 15:02:42 -07:00
Alexandre Bury
5751a293e5 Push most ncurses-specific code into separate trait
Prepare backend change.

Still not isolated is the color setup in `theme`.
2016-06-29 17:37:51 -07:00
Alexandre Bury
d02c30ae9f Fix clippy warnings 2016-06-27 22:40:11 -07:00
Alexandre Bury
80b219f34a Apply rustfmt 2016-06-27 22:10:59 -07:00
Alexandre Bury
8dbb61830f Added a Resize event
For when the window is resized.
Not exactly a key event, but...

Also (very) partial support for Alt-FX keys.
Obviously most already have a mapping,
but Alt-F9, Alt-F11 and Alt-F12 seem to work.
2016-06-25 19:38:22 -07:00
Alexandre Bury
822ffa7a7b Fix keyboard input
Shift/Ctrl/Alt + special keys (arrow, pageup/down, home/end, ins/del)
are better supported.
2016-06-25 19:28:42 -07:00
Alexandre Bury
58bd274df0 Update Readme & run rustfmt 2016-06-25 16:39:05 -07:00
Alexandre Bury
07c3c99e54 Update for new ncurses version 2016-03-15 15:39:08 -07:00
Alexandre Bury
df11b4f1f0 Update documentation 2015-06-08 15:38:10 -07:00
Alexandre Bury
14a18ce760 Add some more input 2015-06-06 22:48:16 -07:00
Alexandre Bury
3a1e40ed49 Add some input support and updated readme 2015-06-06 15:05:01 -07:00
Alexandre Bury
a77a40558f Add some doc. 2015-06-03 15:36:51 -07:00
Alexandre Bury
405cd1e961 Add support for some ctrl keys
Ctrl-{Ins,Del,Home,End} now work in some terminals.
Tested with xterm and konsole. May not work fot VTE-based ones
(gnome and xfce).
2015-06-01 10:49:43 -07:00
Alexandre Bury
23aa9e6da7 Update for latest ncurses-rs fix
Del and Ins are now correctly reported.
2015-05-29 20:44:53 -07:00
Alexandre Bury
00b75a98f6 Add input support for more keys
Shift and Ctrl Function keys
Shift-Del
2015-05-29 11:31:20 -07:00
Alexandre Bury
ae93b68c05 Recognizes more modified keys
Shift-tab and a few others
2015-05-28 16:19:16 -07:00
Alexandre Bury
dd11d34206 Merged Fn keys into a single enum value 2015-05-28 14:57:21 -07:00
Alexandre Bury
3adb95c7ab Add support for Shift and Ctrl input
Careful: Ctrl-4 and ctrl-\ currently make ncurses crash.
Also some letters combine with Ctrl to make other codes. Run stty -a to
see some mappings.
Basically, you'll have issues with:
C,I,J,M,Q,S,Z
and non-letters.
2015-05-28 14:44:10 -07:00
Alexandre Bury
37e54b3598 Add input support for Esc 2015-05-28 13:49:13 -07:00
Alexandre Bury
6c69453639 Add Insert and Fn keys.
TODO: keys are apparently treated differently when shift is pressed.
Find a better representation.
2015-05-28 12:22:39 -07:00
Alexandre Bury
0bdb86181b Add Tab key to events 2015-05-27 22:21:23 -07:00