Casey Primozic
7ca9821145
Fixed issue with resetting background color for Termion backend
...
- Background color was being set back to the theme's background color rather than the terminal's background color when the backend was `finish()`ed. This resets the background color to the default instead.
2017-01-10 19:22:05 -06: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
8c366389a7
Fix type cast in pancurses backend
2017-01-06 21:25:10 -08:00
Alexandre Bury
2bacfcb11e
Add manual-loop methods
...
is_running() and step()
2016-12-15 20:39:50 +01:00
Alexandre Bury
858067ef6b
Detect terminal resize in termion backend
...
Using the chan_signal crate
2016-12-13 22:10:00 -08:00
Alexandre Bury
ea3dde33ec
Use async input for termion backend
...
This enables async refresh, fixing the `logs` and `progress` examples.
2016-12-13 20:54:18 -08:00
Alexandre Bury
89ec140f41
Update doc comments
2016-12-12 10:20:19 -08:00
Alexandre Bury
0ab2c6db07
Update pancurses backend
2016-11-24 23:42:31 -08:00
Alexandre Bury
508c9833e3
Add Esc support to termion backend
2016-11-04 16:24:52 -07:00
Alexandre Bury
ce009d0e5f
Back to upstream termion
...
Just figured I could implement Color for a custom wrapper struct.
2016-11-04 10:30:06 -07:00
Alexandre Bury
949b1e9632
Add tab support to pancurses
2016-10-28 17:13:53 -07:00
Alexandre Bury
60bddf7e8d
Better input support in termion backend
...
Still many key combinations unsupported.
2016-10-24 11:16:56 -07:00
Alexandre Bury
965b32bd9b
Bring colors to termion backend
...
Currently require termion fork for color storage support.
2016-10-21 17:18:26 -07:00
nabijaczleweli
13d84970d3
Correctly handle backspace in pancurses backend on Windows
...
Closes #81
2016-10-15 17:48:31 +02:00
Craig M. Brandenburg
df0d93ae74
Documentation spell fix
2016-10-15 06:24:24 -07:00
Alexandre Bury
bfb422067a
Doc fixes
2016-10-14 18:18:19 -07:00
Alexandre Bury
fde1091051
Fix focus in ListView
2016-10-13 11:57:24 -07:00
Alexandre Bury
e81a569e31
Add From<((left,right), (top, bottom))> to Vec4
2016-10-12 15:37:55 -07:00
Alexandre Bury
7e382593a8
Remember current color style in pancurses backend
2016-10-12 14:14:32 -07:00
nabijaczleweli
e33474dd74
Fix back-end warnings
2016-10-12 20:06:04 +02:00
Alexandre Bury
2dc75c2ec0
Make window resizeable in BLT backend
2016-10-12 09:35:03 -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
c4baa0f570
Add BearLibTerminal backend
2016-10-12 01:48:22 +02:00
Alexandre Bury
821d9f1783
Parse utf8 chars in pancurses backend
...
Closes #76
2016-10-11 16:08:44 -07:00
Alexandre Bury
072c1d9b5c
Fix some input in pancurses backend
2016-10-11 12:31:31 -07:00
nabijaczleweli
8a6a49fbc3
Fix Enter being Character('\n') in pancurses backend
...
Closes #73
2016-10-11 20:59:28 +02:00
nabijaczleweli
5eccc2f518
Fix inverted screen size in pancurses backend
...
Closes #71
2016-10-11 20:53:54 +02:00
Alexandre Bury
04f528e2de
Fix clippy warnings
2016-10-11 11:04:01 -07:00
nabijaczleweli
c81579a20a
Disable failing doctests
2016-10-11 19:11:40 +02:00
nabijaczleweli
9fb8309d3a
Hello yes this is typo man
2016-10-10 23:12:42 +02:00
nabijaczleweli
c69db62844
Fix backend tests
2016-10-10 23:08:07 +02:00
nabijaczleweli
51af4350fc
Apply key mappings as they are so far
2016-10-10 23:06:55 +02:00
nabijaczleweli
80e3e4f536
Hide backend
2016-10-10 22:02:07 +02:00
nabijaczleweli
bd93f450df
Handle F[14;15]
2016-10-10 21:55:25 +02:00
nabijaczleweli
c84cafb4fd
Update pancurses to 0.4.0
2016-10-10 20:51:32 +02:00
nabijaczleweli
af0c97749d
Fix doctests using ::B
2016-10-10 20:23:00 +02:00
nabijaczleweli
4c9c4b5568
Move back-end selection to backend::Concrete instead of ::B
2016-10-10 10:34:33 +02:00
nabijaczleweli
2c009f694b
Add PauseBreak and F0 keys. Properly handle Tab
2016-10-10 10:34:33 +02:00
nabijaczleweli
79c4bf29c2
Don't explicitly list features
2016-10-10 10:34:33 +02:00
nabijaczleweli
01951aa213
Mostly add pancurses support. Test pancurses support on Travis
2016-10-10 10:34:33 +02:00
Alexandre Bury
9871e12734
Update for latest ncurses-rs
2016-10-09 17:48:31 -07:00
Alexandre Bury
651c7d619b
Remove debug artifacts
...
And bring back the shadows!
2016-10-09 17:43:24 -07:00
Alexandre Bury
686de0831c
Take &self
in TermionBackend::clear()
2016-10-09 16:03:49 -07:00
Alexandre Bury
ad7606ca55
Switch backend with cargo features
...
Use `termion` feature and disable default features to use the termion
backend.
2016-10-09 16:02:26 -07:00
Alexandre Bury
df4397a174
Add stub termion backend
...
Not supported: input, colors, effects, async
2016-10-09 16:02:26 -07:00
Alexandre Bury
90c9d51a6c
Add comments to menubar example
2016-10-09 15:59:29 -07:00
Alexandre Bury
44dbd5826e
Make Backend::clear
take &self
2016-10-09 15:47:06 -07:00
Alexandre Bury
bb62452149
EditView: Prevent overflow error with no available space
2016-10-04 17:51:18 -07:00
Alexandre Bury
8fded82434
Fix clippy warnings
2016-10-02 16:03:31 -07:00
Alexandre Bury
9cf89c37de
Clear screen if a layer is shrinked
2016-10-02 15:33:55 -07:00
Alexandre Bury
3b3f403f7a
Apply rustfmt
2016-10-02 15:22:29 -07:00
Alexandre Bury
8fa704bcfa
Rename Dialog::new
-> Dialog::around
...
And `Dialog::empty` -> `Dialog::new`
2016-10-02 15:15:30 -07:00
Alexandre Bury
53aea8e91c
Derive Clone
for RadioGroup
...
Also remove broken example.
2016-10-02 15:03:03 -07:00
Alexandre Bury
bf3888e275
Add RadioButton & RadioGroup
2016-10-02 14:57:09 -07:00
Alexandre Bury
d684a5bc1e
Remove prelude
module
...
Add `traits` module instead
2016-09-28 22:45:27 -07:00
Alexandre Bury
f4f2759df2
Make SelectView::on_submit callback take a Borrow<T>
...
Instead of a `T` directly.
2016-09-28 15:06:16 -07:00
Alexandre Bury
af803a4587
Add debuggin mention to doc
2016-09-24 17:19:09 -07:00
Alexandre Bury
b53e2a42bd
Use better type for new_default
macro
...
Again, `ty` is a better fit
2016-09-24 17:06:33 -07:00
Alexandre Bury
0401b3ab53
Use better type for wrap_impl!
macro
...
`ty` is better than `path`
2016-09-24 16:56:42 -07:00
Alexandre Bury
fa2ad3261b
Make Backend
methods not static anymore
2016-09-24 16:51:42 -07:00
Alexandre Bury
2e06dd70cb
Apply rustfmt
2016-09-22 22:11:13 -07:00
Alexandre Bury
d29f80869d
Don't inline doc in prelude
2016-09-22 22:04:55 -07:00
Alexandre Bury
829dd77deb
Add &Backend
to Printer struct
...
Makes `::B` public but undocumented.
Backend is currently an immutable ref, may need to become
mutable to be more useful (will need to change the View trait)
2016-09-22 22:00:58 -07:00
Alexandre Bury
05a862d98b
Remove unused import in test module
2016-09-22 17:12:53 -07:00
Alexandre Bury
a5135a7aff
Better documentation for view::Finder
...
Also adds `Finder::find_id`
2016-09-21 14:57:03 -07:00
Alexandre Bury
f879305d7f
Adds SelectView::is_empty
...
Fix clippy warning
2016-09-21 11:57:38 -07:00
Alexandre Bury
a064400b6f
Add unsafe block around ncurses::stdscr
...
One more reason to avoid ncurses
2016-09-21 11:57:19 -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
7d16f70d67
Add some tests to view::position
2016-09-20 18:32:31 -07:00
Alexandre Bury
e3ac2a0482
Added some size tests to BoxView
2016-09-20 11:50:34 -07:00
Alexandre Bury
08d1c1e5b0
Use an associated type in ViewWrapper
...
This removes the need for dynamic dispatching
2016-09-19 17:20:20 -07:00
Alexandre Bury
3701c85ffd
Add clear
methods to SelectView
and ListView
2016-09-05 15:33:52 -07:00
Alexandre Bury
53402a0063
Add link wrap_impl!
doc
2016-09-01 11:56:11 -07:00
Alexandre Bury
24511ae5f1
Accept Into<String>
in EditView::set_content
2016-09-01 11:49:47 -07:00
Alexandre Bury
d51772f714
EditView: move cursor on content change
...
To the end of the content.
2016-09-01 11:42:16 -07:00
Alexandre Bury
9142c545f7
Fix crash when removing the first item in a SelectView
2016-09-01 11:28:30 -07:00
Alexandre Bury
0364f577b2
Add EditView::set_cursor
...
And fix a crash with `set_content` (it wasn't updating the cursor).
2016-09-01 11:10:12 -07:00
Alexandre Bury
77abb5729e
Add DummyView to prelude
2016-08-31 17:19:22 -07:00
Alexandre Bury
6dd81faa57
Fix offset in SelectView::remove_item
2016-08-31 17:14:37 -07:00
Alexandre Bury
484f81861a
Replace SelectView::focus
with selected_id
...
Returns None if the list is empty.
Also add `SelectView::len`
2016-08-31 17:05:58 -07:00
Alexandre Bury
0e08d7d058
Add remove_item
to SelectView
...
And made `focus` public.
2016-08-31 17:00:48 -07:00
Alexandre Bury
ce6992a8c5
Add SliderView
2016-08-13 01:03:40 -07:00
Alexandre Bury
921e4a451e
Add outset border functions to Printer
2016-08-05 10:49:16 -07:00
Alexandre Bury
e79cc61e08
Remove FullView
2016-08-04 20:03:48 -07:00
Alexandre Bury
2ee5c6f4e9
Don't run the print_box example
...
It was messing with travis?
2016-08-04 18:01:46 -07:00
Alexandre Bury
cadb585948
Fix Printer::print_box
documentation
2016-08-04 17:38:26 -07:00
Alexandre Bury
f7a3d821d1
Actually use Theme::{shadow,borders}
when drawing
...
Also add the 8 light base colors
2016-08-04 17:27:04 -07:00
Alexandre Bury
db09930fe2
Fix clippy warning
2016-08-04 09:58:13 -07:00
Alexandre Bury
9db3c87851
Add Cursive::set_theme
method
...
Allow setting a theme without having to load a toml file.
2016-08-04 00:11:16 -07:00
Alexandre Bury
1052c0b74c
Remove EditView::min_length
...
Uses `.fixed_width()` from `Boxable` or something like that.
2016-08-03 21:58:00 -07:00
Alexandre Bury
b38995b906
Refactor BoxView
...
Add `Boxable` trait.
2016-08-03 21:55:41 -07:00
Alexandre Bury
6827d2ed59
Update scrollbase on any row computation
2016-08-03 00:01:18 -07:00
Alexandre Bury
095367166b
TextArea: starts with no rows.
...
The first `layout()` will build what's required.
2016-08-02 23:33:07 -07:00
Alexandre Bury
d3d86a2f45
Fix clippy warning
2016-08-02 23:26:59 -07:00
Alexandre Bury
fab05b8b9f
Fix layout bugs in TextArea
2016-08-02 23:24:47 -07:00
Alexandre Bury
5d124e452e
TextArea: cache layout computations
2016-08-02 21:48:12 -07:00
Alexandre Bury
e4bc129f4b
Smarter TextArea row computation
...
Only re-compute damaged areas.
2016-08-02 21:22:23 -07:00
Alexandre Bury
bd78418083
Add scrollbar_padding
to ScrollBase
...
And use it in TextArea
2016-08-02 00:49:59 -07:00
Alexandre Bury
93ceb17c21
Rename scrollbar_padding
-> scrollbar_offset
in ScrollBase
2016-08-02 00:36:27 -07:00