Alexandre Bury
d9d34b4350
Add EventTrigger, refactor OnEventView
2018-11-09 10:40:06 -08:00
Alexandre Bury
b0a86ceb61
Rephrase doc
2018-10-22 19:30:09 -07:00
Alexandre Bury
333392e034
Add immut! macros
2018-09-24 14:28:23 -07:00
Alexandre Bury
6135b0df79
Refactor input system
...
* Moves from chan to crossbeam-channel
* Moves from chan_signal to signal-hook
2018-07-08 12:49:12 -07:00
Alexandre Bury
9bd1eb320d
Add size cache to ScrollView
2018-06-20 11:48:09 -07:00
Alexandre Bury
3f16e8ed60
Do not use chan_signal on windows
2018-06-18 16:50:09 -07:00
Alexandre Bury
804e41ec43
Fix resize event
2018-06-17 17:26:03 -07:00
Alexandre Bury
83bcf4fb72
Merge branch 'master' into callback_preemption
2018-06-16 11:03:39 -07:00
Alexandre Bury
8acc08f340
Rustfmt
2018-06-10 23:29:19 -07:00
Alexandre Bury
05e1212a50
Refactor Backend input model
...
Backends now have to send input to the given `chan::Sender<Event>`.
They send these events from a separate thread, allowing selection
between input and callbacks.
This currently breaks the BearLibTerminal backend, which requires all
calls to come from the UI thread.
This might not be super-safe for the ncurses backend also. We hope that
input and output are separate enough that they can run concurrently without
problem.
2018-05-20 09:59:35 -07:00
Alexandre Bury
b34fb14957
Use ncurses::newterm instead of initscr
...
This leaves stdout untouched, so it can better be composed in other
commands.
2018-04-05 17:40:08 -07:00
Alexandre Bury
126530b9a9
Cursive::new now takes the backend as argument
2018-04-01 16:39:03 -07:00
Alexandre Bury
5d3c0d3fb0
Add rect::Rect
2018-03-16 17:16:05 -07:00
Alexandre Bury
99046d10c3
Use special key detection for pancurses
...
Shared with the ncurses backend code
2018-02-20 15:44:07 -08:00
Alexandre Bury
767e225db0
Only require maplit for ncurses bqckend
2018-02-20 14:50:13 -08:00
Gergely Nagy
f478d57e51
FnOnce callbacks can be sent to cb_sink
2018-02-12 22:44:50 +01:00
Alexandre Bury
057321abac
Doc: add wikipedia link to TUI
2018-01-24 18:21:39 -08:00
Alexandre Bury
3674c118cb
Rustfmt
2018-01-22 11:55:56 -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
c2d2fa0527
Update Style to include a set of effects
2018-01-08 15:44:27 +01:00
Alexandre Bury
943da46e82
Add SpanListIterator
2018-01-08 01:25:30 +01:00
Alexandre Bury
e4cd68a4eb
Rustfmt
2017-12-30 23:03:42 +01:00
Alexandre Bury
6bc63a40c5
Remove odds dependency
...
Now that `Vec::splice` is stable.
Note: this means rustc >= 1.22 is required.
2017-11-25 10:16:35 -08:00
Alexandre Bury
c10da1390b
Use dynamic key code map in ncurses backend
...
In preparation for detecting key codes dynamically.
(Different ncurses versions will use different code offsets)
2017-11-19 17:14:20 -08:00
Alexandre Bury
a4ca7bbf1e
Rustfmt
2017-10-12 16:43:59 -07:00
Alexandre Bury
74612c65e5
Move Cursive root to its own module
2017-10-12 16:33:24 -07:00
hcpl
ca4410030a
Use log
crate
...
This provides a uniform way to handle logging and can be combined with
logs from other libraries in end-user apps.
2017-08-23 17:49:09 +03:00
Alexandre Bury
a48ff9082f
Replace println_stderr! with eprintln!
2017-08-14 17:01:49 -07:00
Alexandre Bury
2ffae1f524
Rename {Color,ColorStyle}::Default to TerminalDefault
2017-07-18 01:36:34 +02:00
Alexandre Bury
e4464cb44d
Merge remote-tracking branch 'origin/master' into custom_color
2017-06-14 00:44:04 -07:00
Alexandre Bury
dea07d29cf
Give the background color to the clear method.
2017-06-12 23:29:26 -07:00
Alexandre Bury
5c42a59954
Refactor colors management
...
Do not register pairs with backend. Let backend cache color pairs if
needed.
2017-06-12 11:59:33 -07:00
Alexandre Bury
900bdfea58
Reset running = true
in Cursive::run
...
This allows to start another loop after quitting the first time.
2017-06-08 15:02:00 -07:00
Alexandre Bury
bdc49a558f
Remove unused warning for println_stderr macro.
2017-06-05 20:41:01 -07:00
Alexandre Bury
d4f1439abd
Fix clippy warnings
2017-04-23 15:16:39 -07:00
Alexandre Bury
c300e0628d
Rename find
-> call_on
...
And update tutorials
2017-03-26 20:50:50 -07:00
Alexandre Bury
c3c69e7892
Merge IdView and RefCellView
...
And remove `with_id_mut`
2017-03-25 21:56:31 -07:00
Alexandre Bury
146ebd8931
Rename find_id -> call_on_id, find_id_mut -> find_id
2017-03-25 18:22:14 -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
6f129ac83d
Only include chan dependancy with termion backend.
...
We may want to use channels for all backend some day, but not today.
2017-03-05 14:45:21 -08:00
Alexandre Bury
1b8d109e94
Add with_id_mut
and find_id_mut
convenient methods.
2017-02-08 15:20:41 -08:00
Alexandre Bury
b0193b0ebc
Add RefCellView
...
Wraps a view and provide interior mutability
2017-02-08 12:13:14 -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
f504ad8f0e
Add fullscreen layers to StackView
...
Fixes #87
2017-01-23 18:54:52 -08:00
Alexandre Bury
fa82690c10
Fix docs for Cursive::menubar()
...
... again
2017-01-23 16:54:27 -08:00
Alexandre Bury
24b342ced8
Fix doc for Cursive::menubar()
2017-01-23 15:58:38 -08:00
Alexandre Bury
06ce7b570f
Fix clippy warnings
2017-01-19 11:12:12 -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