Commit Graph

184 Commits

Author SHA1 Message Date
Alexandre Bury
3d81ad92ec SelectView: make autojump opt-in 2018-09-27 16:01:37 -07:00
Alexandre Bury
ebf7e2b2ca Fix warning 2018-09-14 12:50:46 -07:00
Alexandre Bury
92f919978c Rustfmt 2018-08-22 13:33:29 -07:00
Alexandre Bury
687833f579 Remove unused import 2018-07-25 21:43:04 -07:00
Alexandre Bury
840fd627b7 Remove internal scrolling from SelectView 2018-07-24 19:38:24 -07:00
Alexandre Bury
49e1d1d15e Remove internal scrolling from list_view 2018-07-24 19:06:07 -07:00
Alexandre Bury
0046eba66d SelectVIew::selection now returns Option<Rc<T>> 2018-07-22 20:25:13 -07:00
Alexandre Bury
f5535f2db7 Update theme example to use Cursive::load_toml 2018-07-22 20:20:31 -07:00
Alexandre Bury
a47537ec2c Add Scrollable trait 2018-06-26 17:43:16 -07:00
Alexandre Bury
acf075369c Smoother progress bars 2018-06-26 13:17:57 -07:00
Alexandre Bury
9043b177e9 Fix linear example 2018-06-23 19:00:08 -07:00
Alexandre Bury
e3887847fd Remove ScrollBase from TextView
Wrap the `TextView` in a `ScrollView` to achieve scrolling.
2018-06-22 14:57:55 -07:00
Alexandre Bury
5be79740ad Add comments to some examples 2018-06-20 10:28:44 -07:00
Alexandre Bury
14fe6f3b36 Cargo fmt 2018-06-16 13:23:09 -07:00
Alexandre Bury
83bcf4fb72 Merge branch 'master' into callback_preemption 2018-06-16 11:03:39 -07:00
Alexandre Bury
5e1956b737 Merge branch 'master' into scroll 2018-06-15 23:21:10 -07:00
Alexandre Bury
8acc08f340 Rustfmt 2018-06-10 23:29:19 -07:00
Alexandre Bury
8edc0e20c9 Cargo fmt 2018-05-21 19:21:27 -07:00
Alexandre Bury
3bc07661d0 Add scroll example 2018-05-21 17:56:20 -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
4a3bbbb998 lorem example: remove unnecessary full_screen() 2018-05-07 23:18:22 -07:00
Alexandre Bury
a8326aef28 Fix key_codes example 2018-04-16 22:54:54 -07:00
Alexandre Bury
f0b3287d73 Merge branch 'master' into scroll 2018-04-16 22:42:42 -07:00
Alexandre Bury
ff9f669d73 Fix tests & examples 2018-04-10 12:51:40 -07:00
Alexandre Bury
b1e9afe0ff Add vpv example 2018-04-10 11:46:02 -07:00
Alexandre Bury
126530b9a9 Cursive::new now takes the backend as argument 2018-04-01 16:39:03 -07:00
Alexandre Bury
1ad515e5f0 rustfmt 2018-03-22 11:04:58 -07:00
Alexandre Bury
9bc723ab4a Do not accept any return value for callbacks
It got added so we could keep using `s.pop_layer()` in single-line callbacks.
It was confusing, and the return value was ignored anyway.
2018-03-16 15:50:56 -07:00
Alexandre Bury
8ecd4fdb62 Revert colors in mines example 2018-03-14 15:48:08 -07:00
Alexandre Bury
2cae042a85 Add title to lorem example 2018-02-20 11:09:45 -08:00
Alexandre Bury
62260a025e Rustfmt 2018-02-16 17:21:24 -08:00
Alexandre Bury
daac2d67b4 Add Vec2::saturating_add(XY<isize>)
And uses it to fix crash in position example
2018-02-07 16:44:22 -08:00
SEGFAULT
9e591ef635 Moving Windows in StackView (#200)
* Inital draft of reposition code.

* throwing it all in git so I can show @gycos the mess I made

* Cleaning up the example and removing that garbage getter function from StackView. More thought needs to be applied to that API.

* modified stackview to locally draw background, currently every frame. Adjusted surrounding elements to mirror this change.

* fixed dirty flag on stackView to use a cell. Also added dirty events on window resize.

* Final code cleanup.

* Fixed all highlighted issues in PR #200
2018-02-07 16:25:00 -08:00
Alexandre Bury
5dfdeab6ae Fix clippy warnings 2018-01-22 14:47:56 -08:00
Alexandre Bury
da8310b076 Rustfmt 2018-01-22 14:37:27 -08:00
Alexandre Bury
06086fdeb0 Dialog::get_content now returns &AnyView 2018-01-22 13:45:00 -08:00
Alexandre Bury
98aff39904 Move View::as_any to separate trait AnyView 2018-01-22 11:50:25 -08:00
Alexandre Bury
1551fbb543 Add View::as_any and View::as_any_mut 2018-01-22 09:20:45 -08:00
Alexandre Bury
431285135f Make Palette directly an EnumMap
Removes the "colors" intermediate member.
2018-01-21 11:17:22 -08:00
Alexandre Bury
0097789d46 Add examples descriptions 2018-01-18 10:32:08 -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
868e59a4fa Add comments to examples 2018-01-15 18:55:27 -08:00
Alexandre Bury
39405ba1ec Refactor spans and markup
We now use mostly indexed spans into a source string.
Indexed Spans can still be resolved to a string slice when needed.
2018-01-15 13:53:27 -08:00
Alexandre Bury
5dcce6a965 Fix example without markdown feature 2018-01-11 00:03:42 +01:00
Alexandre Bury
890b3f13e1 TextView: print styled spans of text 2018-01-10 23:58:29 +01:00
Alexandre Bury
f8588e74c1 Rustfmt 2018-01-09 15:17:49 +01:00
Alexandre Bury
d384cbdaf1 Allow menu leaves and delimiter in menubar 2018-01-09 14:37:40 +01:00
Alexandre Bury
e4cd68a4eb Rustfmt 2017-12-30 23:03:42 +01:00
Alexandre Bury
799ec812e4 Add TextContent and TextContentRef
To manage the model separately from the view.
2017-12-30 23:00:48 +01:00
Alexandre Bury
fd259bf32c Mines example: add help message 2017-12-16 14:41:15 +01:00