Commit Graph

201 Commits

Author SHA1 Message Date
Gergely Nagy
74266edf29 replace CbFunc with Box<FnOnce()> (#351)
Since Rust 1.35, Box<FnOnce()> compiles, we can remove the workaround.
2019-07-05 00:16:26 -07:00
Alexandre Bury
5faf8d6c48 Improve tcp_server example a bit 2019-06-18 11:44:47 -07:00
Alexandre Bury
7d81594c69 Fix compilation on stable 2019-06-17 14:59:52 -07:00
Alexandre Bury
c2b2c7b918 Add a TCP example to showcase model-view separation. 2019-06-17 14:49:56 -07:00
Alexandre Bury
23d65aa9dc Update examples and tutorials to Rust 2018 2019-05-20 15:53:22 -07:00
Alexandre Bury
5ee7e11619 Add warning to vpv if no input is given 2019-05-15 12:18:26 -07:00
Alexandre Bury
4f34e97f27 Add user-data 2019-03-03 18:06:50 -08:00
Alexandre Bury
06b02e4665 Remove "extern crate" and rustfmt 2019-02-28 16:04:14 -08:00
Alexandre Bury
88d2fb1f46 Simplifies backend input 2019-02-28 13:41:40 -08:00
Alexandre Bury
8fe9a1d54e Better documentation for Cursive 2019-02-22 15:30:22 -08:00
Alexandre Bury
d7e57fd280 Rename toggle_debug_view -> toggle_debug_console 2019-02-22 15:02:34 -08:00
Alexandre Bury
3a7e10cffe Update debug view 2019-02-22 13:55:07 -08:00
Alexandre Bury
8b3f5a8de7 Add CursiveLogger and DebugView 2019-02-22 12:38:16 -08:00
Alexandre Bury
ec8f7c93e8 Wrap each layer in a CircularFocus 2019-01-24 11:57:30 -08:00
Alexandre Bury
79e23bb70e Update dependencies 2018-11-30 16:55:47 -08:00
Alexandre Bury
193f098ee0 Add Printer::enabled 2018-11-09 14:08:43 -08:00
Alexandre Bury
b60c69ca63 Fix example and add doc tests 2018-11-09 10:54:57 -08:00
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