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
77433e80ee
fix: add Panel::wrap_layout
...
Fixes #119
2017-03-15 16:35:20 -07:00
Alexandre Bury
0bbc10706e
EditVIew: Add mutable and non-mutable callback methods
...
mutable callbacks disable recursive calls
2017-03-08 16:29:24 -08:00
Alexandre Bury
cbe237624f
Update toml to 0.3
2017-03-06 22:49:56 -08:00
Alexandre Bury
4f82e87d0d
Merge pull request #115 from hacksaar/master
...
use Iterator::sum() for summing instead of fold
2017-03-06 14:58:17 -08:00
Alexandre Bury
87676295a0
fix: Check for insufficient space in Panel::required_size
2017-03-06 14:53:10 -08:00
Constantin Berhard
36d5aa016a
use Iterator::sum() for summing instead of fold
2017-03-06 22:46:16 +01:00
Alexandre Bury
5f5fb4e502
Add comments
2017-03-06 10:38:18 -08:00
Alexandre Bury
30cac851e7
Fix utils::prefix
...
And add a few tests
2017-03-06 10:34:58 -08:00
Constantin Berhard
dc7754d38f
fix #113
2017-03-06 15:32:03 +01:00
Alexandre Bury
e0b279d9df
Fix clippy warnings
2017-03-05 15:18:15 -08: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
7d9cb03ffb
More checks against small viewports
...
Prevents panics when the terminal is resized.
2017-03-05 11:35:20 -08:00
Ilkka Halila
ea053640fe
Use new Attributes and ColorPairs
...
Pancurses now has an Attribute and ColorPair type, making for a more strongly typed way of handling them when compared to using chtypes.
Also window now has an .attrget() function so pan::Concrete does not need to track the current color any longer.
2017-03-05 13:53:50 +02:00
Alexandre Bury
34c7462877
fix: protect scroll operations when non-scrollable
...
Fixes #109
2017-02-26 14:53:50 -08:00
Robin Stumm
99fa86bec9
return length and width from utils::prefix() (renamed from utils::prefix_length()) as per df835d1
2017-02-01 20:47:33 +01:00
Alexandre Bury
df835d1a10
utils::prefix_length: move current_width
out of the scan loop
...
To prepare returning both length and width.
2017-01-31 16:31:34 -08:00
Alexandre Bury
8b88bf9ba2
Add Menubar::is_empty(&self)
...
And fix another clippy warning
2017-01-27 14:51:46 -08:00
Alexandre Bury
afc681bcf4
Add Canvas::state_mut(&mut self)
...
And missing Canvas::needs_relayout closure.
2017-01-24 10:48:00 -08:00
Alexandre Bury
d7eaa5a086
Rename View::get_min_size
-> required_size
2017-01-23 22:53:03 -08:00
Alexandre Bury
451d27b58e
Fix Canvas doc comment
2017-01-23 22:03:39 -08:00
Alexandre Bury
26e6f4ff97
Add Canvas view
2017-01-23 22:01:25 -08:00
Alexandre Bury
c970712c3b
Add TextView::append_content
...
Also don't strip the newline anymore when setting content.
Instead, just ignore trailing newline when computing rows.
2017-01-23 20:22:43 -08:00
Alexandre Bury
f504ad8f0e
Add fullscreen layers to StackView
...
Fixes #87
2017-01-23 18:54:52 -08:00
Alexandre Bury
053544d192
Fix inverted outset color
...
Update the `theme` screenshot
2017-01-23 17:53:53 -08:00
Alexandre Bury
fa82690c10
Fix docs for Cursive::menubar()
...
... again
2017-01-23 16:54:27 -08:00
Alexandre Bury
0977daa12d
Unify method names on Menubar and MenuTree
2017-01-23 16:51:48 -08:00
Alexandre Bury
24b342ced8
Fix doc for Cursive::menubar()
2017-01-23 15:58:38 -08:00
Alexandre Bury
ed841825f2
Add methods to edit menubar and menutrees
...
Fixes #101
2017-01-23 15:50:56 -08:00
Alexandre Bury
0849ae6efa
Add comments
2017-01-21 15:06:31 -08:00
Alexandre Bury
3ecae579e8
Adjust the scroll after setting the scroll strategy
2017-01-21 11:46:56 -08:00
Alexandre Bury
924c74afbe
Add ScrollStrategy to TextView
2017-01-21 11:44:40 -08:00
Alexandre Bury
dccce56f6e
Fix off-by-1 errors on termion
...
Termion's Goto is 1-based, Cursive's print_at is 0-based
2017-01-19 13:44:49 -08:00
Alexandre Bury
06ce7b570f
Fix clippy warnings
2017-01-19 11:12:12 -08:00
Alexandre Bury
97287a0b0b
Remove unused imports
2017-01-10 17:48:47 -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
Alexandre Bury
ddff15b6cf
Merge pull request #96 from Ameobea/termion-clearing
...
Fixed issue with resetting background color for Termion backend
2017-01-10 17:45:39 -08:00
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