Commit Graph

64 Commits

Author SHA1 Message Date
Alexandre Bury
e4cd68a4eb Rustfmt 2017-12-30 23:03:42 +01:00
Alexandre Bury
93982517ae Fix clippy warnings 2017-10-13 11:24:17 -07:00
Alexandre Bury
a4ca7bbf1e Rustfmt 2017-10-12 16:43:59 -07:00
Alexandre Bury
05bac7a192 More safe subtractions all around. 2017-08-14 16:32:39 -07:00
Alexandre Bury
dea07d29cf Give the background color to the clear method. 2017-06-12 23:29:26 -07:00
Alexandre Bury
9f5ce65e34 Fix doc comment 2017-06-12 18:03:52 -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
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
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
053544d192 Fix inverted outset color
Update the `theme` screenshot
2017-01-23 17:53:53 -08:00
Alexandre Bury
bfb422067a Doc fixes 2016-10-14 18:18:19 -07:00
nabijaczleweli
c69db62844
Fix backend tests 2016-10-10 23:08:07 +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
Alexandre Bury
651c7d619b Remove debug artifacts
And bring back the shadows!
2016-10-09 17:43:24 -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
44dbd5826e Make Backend::clear take &self 2016-10-09 15:47:06 -07:00
Alexandre Bury
3b3f403f7a Apply rustfmt 2016-10-02 15:22:29 -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
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
921e4a451e Add outset border functions to Printer 2016-08-05 10:49:16 -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
fb10e58188 Move LinesIterator to utils module 2016-07-28 23:05:33 -07:00
Alexandre Bury
6e021867ab ProgressBar now shows a percentage status
The label can be customized though `ProgressBar::with_label`.
2016-07-25 23:54:33 -07:00
Alexandre Bury
a1d0231e2c Make Menubar a proper View 2016-07-19 20:44:50 -07:00
Alexandre Bury
4120203844 More fixes for insufficient space. 2016-07-17 01:20:41 -07:00
Alexandre Bury
5b25893496 Rustfmt 2016-07-16 13:52:28 -07:00
Alexandre Bury
2b54d6df28 Make View::draw take a &self (instead of a &mut self)
TrackedView, the only user of the mutability, now uses internal
mutability with a Cell.
2016-07-15 23:44:38 -07:00
Alexandre Bury
1b34934df7 Fix printer::Printer imports 2016-07-13 23:25:54 -07:00
Alexandre Bury
03c400ad44 Fix linear layout in constrained space 2016-07-13 01:19:05 -07:00
Alexandre Bury
7f530e34b7 Add XY generic struct 2016-07-12 21:03:17 -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
b7a270f258 Split width and height in BoxView
They are now both optional
2016-07-11 19:24:50 -07:00
Alexandre Bury
4b095a0652 Apply rustfmt 2016-07-09 19:05:51 -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
1863e48b07 Add MenuPopup view 2016-07-02 01:01:09 -07:00
Alexandre Bury
985009e51c More ncurses isolation
Also some renaming in the theme module
2016-06-30 23:38:01 -07:00
Alexandre Bury
ba26ab965b Don't run example on cargo test
Apparently it fails on travis (??)
2016-06-29 17:46:39 -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
34f235daf0 Use UTF-8 drawing characters for printer methods
Instead of ncurses chtype.
2016-06-26 15:03:12 -07:00
Alexandre Bury
8d24df5f59 Experiment: use direct utf-8 VLINE char 2016-06-25 15:52:19 -07:00
Alexandre Bury
07c3c99e54 Update for new ncurses version 2016-03-15 15:39:08 -07:00
Alexandre Bury
e5cb687990 Refactor themes and colors
And adds a theme example.
TODO: Shadow & Borders support
2015-06-05 18:26:40 -07:00
Alexandre Bury
cb523e88ae Fix doc-tests 2015-06-04 11:40:35 -07:00
Alexandre Bury
969650ab1a Add basic ListView
Show a selection among a list of items.
Maybe should be called SelectView?
TODO:
* Scrolling
* Error handling with empty list
* Action on Enter on an item
2015-05-30 21:05:34 -07:00