Commit Graph

233 Commits

Author SHA1 Message Date
Timon
2065e1012c
Disable default enabled features (#577)
When running crossterm-backend with this command, on linux, I will get an error that ncurses is not installed. By adding this, it works fine.
2021-05-05 07:58:13 -07:00
Alexandre Bury
7fd86b69ec Add more control to focus changes.
- Add `Event::FocusLost`
- View groups: send a "focus lost" event to the focused child when the
    focus is changing.
- Change return type of `View::take_focus` from `bool` to
    `Result<EventResult, CannotFocus>`.
- Change return type of `View::focus_view` from
    `Result<(), ViewNotFound>` to `Result<EventResult, ViewNotFound>`.
- Add `views::FocusTracker` to run callbacks on focus gain/loss.
2021-03-20 08:54:46 -07:00
Alexandre Bury
7cf597f9bb Replace usages of Rect::from 2021-03-02 18:25:32 -08:00
Alexandre Bury
8e34bc132a Add ThemedView 2021-02-10 09:31:12 -08:00
Alexandre Bury
e2f5806deb Add public re-exports of crates used in public api 2021-02-09 09:54:15 -08:00
Alexandre Bury
6543287704 Add enabled state to menu items 2021-02-05 13:05:14 -08:00
Alexandre Bury
71a600cb9b Update dependencies 2021-01-08 11:56:22 -08:00
Alexandre Bury
8003fc1773 Re-organize imports 2020-12-05 23:45:29 -08:00
Alexandre Bury
0a66978d7f Move event handling outside of scroll::Core 2020-12-05 23:05:47 -08:00
Alexandre Bury
31b8e1f515 Reformat & fix clippy 2020-12-01 12:23:29 -08:00
Tianyi Shi
c7c5f7955f
add new example: stopwatch (#503)
Co-authored-by: Mckol <mckol363@gmail.com>
2020-10-08 19:41:57 -07:00
Tianyi Shi
3ab4f9b0f7
new example: autocomplete search box (#502)
new example: autocomplete search box
2020-09-21 21:31:19 -07:00
Mckol
7b579a7d54
Improved the select example. (#501)
Now the `OnEventView.on_pre_event_inner()` calls return
`Some(EventResult::Consumed(Some(Callback)))` instead of
`Some(EventResult::Consumed(None))`.
This follows the guidelines from documentation of methods returning a
`Callback`, which say that it should be ran on the `Cursive`.
While in this example this doesn't make a difference, the previous
version created confusion for new users who might not realize you can
pass the `Callback`s to the `Cursive` this way.
2020-09-21 14:16:16 -07:00
Alexandre Bury
9e804fd105 Add pause example 2020-08-05 17:19:37 -07:00
Alexandre Bury
2cd6d7a80c Make backends pausable 2020-08-04 23:24:11 -07:00
Alexandre Bury
56008db796 Enable multi-rows views in ListView 2020-07-07 00:11:52 -07:00
Alexandre Bury
f2b1fac679 Fix bad initial focus 2020-07-02 23:59:55 -07:00
Alexandre Bury
bd6386fd74 Add FixedLayout 2020-07-02 23:59:55 -07:00
Alexandre Bury
d5205769f6 Start development of 0.15.1-alpha.0 2020-05-26 12:11:45 -07:00
Alexandre Bury
d9161f12fc Fix select_test example 2020-05-26 11:26:39 -07:00
mara
fc5060a8e0
Fix the theme example (#452)
- Remove the inline feature detection, it doesn't work for features of
  dependencies. Instead use `required-features` in `Cargo.toml` for the
  specific binary.

- The asset moved one level up relatively to `../../assets/style.toml`
2020-05-08 11:44:18 -07:00
Alexandre Bury
f9a58e7936 Attempt to fix appveyor build 2020-04-23 19:24:27 -07:00
Alexandre Bury
b7764541e5 Move examples to its own member 2020-04-23 17:17:30 -07:00
Alexandre Bury
4154f99b44 Split non-backend code into cursive-core 2020-04-23 13:46:00 -07:00
Alexandre Bury
d499bab941 Remove From implementations for Margins 2020-01-10 10:51:48 -08:00
Alexandre Bury
4c00dd3b72 Directly use crate::Vec2 2020-01-06 15:51:38 -08:00
Alexandre Bury
cd26e40fcb Rename id to name: phase 3 2020-01-06 15:41:51 -08:00
Alexandre Bury
6824cc4299 Rename id to name: phase 2 2020-01-06 15:39:30 -08:00
Alexandre Bury
9aee7d374c Rename some types
BoxView => ResizedView
SizedView => LastSizeView
ViewBox => BoxedView
Boxable => Resizable
Boxable::box => Resizable::resize

Old names are still re-exported, but deprecated.
2020-01-06 11:55:16 -08:00
Alexandre Bury
86c800554b Make toml an optional feature 2019-09-09 14:45:07 -07:00
Alexandre Bury
b7d71e8381 Rustfmt
Moves to "Tall" fn_args_layout
2019-07-30 16:08:40 -07:00
Andrzej J. Skalski
4a1fc3e49d Test backend (#310) 2019-07-30 11:57:01 -07:00
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