deinstapel / cursive-tabs Goto Github PK
View Code? Open in Web Editor NEWTabs for gyscos/cursive views 🖥️
License: BSD 3-Clause "New" or "Revised" License
Tabs for gyscos/cursive views 🖥️
License: BSD 3-Clause "New" or "Revised" License
Hello, I'm following the example verbatim.
cursive-tabs/examples/fullscreen.rs
Lines 1 to 60 in 52e94cb
The active tab name is not highlighted initially even though active tab is being set.
cursive-tabs/examples/fullscreen.rs
Line 34 in 52e94cb
Image to illustrate potential bug and expected behavior.
Could be the same issue as #4
Package info: cursive-tabs = "0.7.0"
Hi,
I find K: Copy
really inconvenient as I cannot use String
as K
.
Is there a way to make the current situation better?
Hi,
is it possible to define the location of the tab names? If not, consider this as a feature request.
Also: Would be nice to be able to actually have a vertical listing of tab names!
Awesome crate, please keep up the good work!
When creating a new TabPanel
, the initially visible tab is not highlighted in the panel heading.
Hi! Some time ago I commited a puppet backend to Cursive to facilitate automated tests. There are some examples in njskalski/sly-editor . Have you considered trying this way of testing? It's 100% Rust.
I am trying to update cursive-tabs
to depend on cursive_core
rather than cursive
(cursive_core
is basically cursive
without backends, so should be enough for libraries and have fewer breaking changes). Dependencies would still pull the full cursive
crate.
Currently end2end test binaries are in src/bin/
. This means that they use the same dependencies as the library itself; but (like other tests) they require the full cursive
crate and not just cursive_core
.
(There is a RFC for per-bin dependencies, but it's not looking good yet, and probably not really the right thing™ anyway.)
Moving it to tests
or examples
would make them use dev-dependencies
.
Another (probably better) solution is the puppet-backend-tests
branch, which replaces these with direct individual tests.
I'm trying to add tabs with TextArea
, and its not a named
error[E0308]: mismatched types
--> tui/src/views/tab_bar.rs:7:18
|
7 | .add_tab(TextArea::new())
| ------- ^^^^^^^^^^^^^^^ expected `NamedView<_>`, found `TextArea`
| |
| arguments to this method are incorrect
|
= note: expected struct `NamedView<_>`
found struct `TextArea`
note: method defined here
--> /home/redhawk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cursive-tabs-0.7.0/src/panel.rs:142:12
|
142 | pub fn add_tab<T: View>(&mut self, view: NamedView<T>) {
In Cargo.toml
:
cursive = { git = "https://github.com/gyscos/cursive.git" }
cursive-tabs = { git = "https://github.com/deinstapel/cursive-tabs.git" }
https://github.com/htejun/resctl-demo/tree/on-cursive-tip
fails:
$ cargo check
Checking resctl-demo v1.0.0 (/home/htejun/os/resctl-demo/resctl-demo)
error[E0277]: the trait bound `cursive_tabs::TabView<usize>: cursive::view::ViewWrapper` is not satisfied
--> resctl-demo/src/graph.rs:82:9
|
82 | siv.call_on_name("graph-tabs", |v: &mut TabView<usize>| {
| ^^^^^^^^^^^^ the trait `cursive::view::ViewWrapper` is not implemented for `cursive_tabs::TabView<usize>`
|
= note: required because of the requirements on the impl of `cursive::View` for `cursive_tabs::TabView<usize>`
...
Thank you so much.
Hi,
as far as I can see, there are no getters for the current (or any other) tab in the interface, is that right?
Why not?
Currently when selecting a tab you have to press Enter
to actually select it (or similar buttons), this proposal is a option to set it to be automatically selected as active on Left
/ Right
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.