Commit Graph

554 Commits

Author SHA1 Message Date
Alexandre Bury
30cac851e7 Fix utils::prefix
And add a few tests
2017-03-06 10:34:58 -08:00
Alexandre Bury
b18ca17b73 Merge pull request #114 from hacksaar/master
fix utils::prefix bug: #113
2017-03-06 10:27:47 -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
Alexandre Bury
8dc420c3ed Merge pull request #110 from ihalila/pancurses_0.8
Correct colors on pancurses+Windows and use strongly typed attributes
2017-03-05 10:20:39 -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
Ilkka Halila
f6f26bf7af Increment pancurses dependency to version 0.8 2017-03-05 13:49:20 +02:00
Alexandre Bury
ce3400ec0c Add gitter badge 2017-02-27 14:29:14 -08:00
Alexandre Bury
30f13fc260 Edit refcell_view example to use find_id 2017-02-26 16:01:23 -08:00
Alexandre Bury
23b0f9c168 docs: add refcell_view example 2017-02-26 15:53:12 -08:00
Alexandre Bury
cb3adc5baf feat: find_id can now find views declared with with_id_mut 2017-02-26 15:52:42 -08:00
Alexandre Bury
34c7462877 fix: protect scroll operations when non-scrollable
Fixes #109
2017-02-26 14:53:50 -08:00
Alexandre Bury
e91021a633 Bump version to 0.4.1 2017-02-08 16:17:18 -08:00
Alexandre Bury
b50d2f077f Make RefCellView re-entrant safe
Don't crash if the view is already borrowed.
2017-02-08 15:33:43 -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
1de7dcd819 Remove useless entries from Cargo.toml 2017-02-08 12:15:43 -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
57c1c1ad61 Merge pull request #107 from dermetfan/prefix
return length and width from utils::prefix(_length)
2017-02-01 11:56:04 -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
412f3304f3 Merge pull request #104 from hyst329/master
Fixes issue #103
2017-02-01 10:13:06 -08:00
hyst329
35c0cb1050 Added *-backend features 2017-02-01 20:59:17 +03: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
e0e96ab875 Merge pull request #105 from dermetfan/nix-shell
add shell.nix file for Nix users
2017-01-31 11:15:17 -08:00
Robin Stumm
6594e393b8 add shell.nix file for Nix users 2017-01-31 19:38:38 +01:00
hyst329
4755cc8aee Fixed library name capitalising 2017-01-30 18:19:03 +03:00
hyst329
ae33abec18 Fixed build on Windows 2017-01-30 18:17:05 +03:00
Alexandre Bury
8b88bf9ba2 Add Menubar::is_empty(&self)
And fix another clippy warning
2017-01-27 14:51:46 -08:00
Alexandre Bury
1b5cb4a89a Fix travis badge in Cargo.toml 2017-01-24 10:49:02 -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
146a532df0 Bump version to 0.4.0 2017-01-23 22:55:06 -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
b8621df74d Update lorem screenshot 2017-01-23 18:58:48 -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
8ae34b05dd Add Cargo categories & travis badge 2017-01-21 13:30:15 -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