The future of Widgets #1893
Replies: 3 comments 40 replies
-
I'm up for this, the sooner the better. Since I either need to: |
Beta Was this translation helpful? Give feedback.
-
i'm all for more widgets, and they're one area that i really hope will bring more developers to Notcurses. @MasFlam put together a lovely tabbed interface widget. i'd prefer to keep them in-library if possible. even if they have some kind of new dependency, i'm happy to write the necessary CMake code to allow that dep to be optional, leaving out said widget if it's not there. of course, if someone wants to release them as their own library, that's absolutely fine (and might be better, since that way you can depend on the widget library and know you'll have it, as opposed to deping on libnotcurses-core by itself and not being certain). my only requirement would be that they ought work like the other widgets, unless it's absolutely impossible:
|
Beta Was this translation helpful? Give feedback.
-
Speaking of Widgets, Here are a few examples why I think this is the case, and I'd be happy to hear what you think.
Surely enough, most of that could be handled with a few functions taking a VT context struct as an argument, but on the other hand, isn't that what makes widgets stand out from a regular ncplane? For now, I have no clue about widgets in general, and I can only imagine that widgets are the solution to the points I've risen here. I keep refactoring putvt() so it is clean-ish and maintainable, and supporting input-only operation. |
Beta Was this translation helpful? Give feedback.
-
So me and @chromafunk been talking, and although he did not commit to any of that just yet, I'm curious whether we have any "rules" about which widgets are welcomed in notcurses and which are not.
The braille-based graph plotter that @chromafunk has found implemented in Python, could be a perfect widget for notcurses - even better, utilizing nc's internal possibilities it could be much faster and not limited to Braille symbols.
Personally I am interested in some clever ways of representing scientific data for my other project. Widgets with graphs, heat maps, multi-layer vertical progress bar arrays, pie charts or whatever.
I trust you've got nothing against features like that. Perhaps it's a high time to organize widgets somehow. Right now they sit mixed up with "core" features of notcurses, and when notcurses gets its well deserved recognition, I suspect the widget collection will explode.
I suspect there will be a demand for organizing widgets both within the code, and from the user's perspective. A basic set of rules how to contribute a widget, and perhaps a naming convention surely won't hurt.
Or maybe the higher level widgets are not to be a part of notcurses directly, that is something that should be decided at some point as well.
Beta Was this translation helpful? Give feedback.
All reactions