Replies: 3 comments 2 replies
-
Good idea - one big question is how to activate for the "action". Other gui libs would probably use double-click, but we'll have to figure something else out. |
Beta Was this translation helpful? Give feedback.
-
Sounds like a tree in web and I think we can base many of the behaviours and key binds on that.
This will probably be something a user of dvui would add on top of a tree view widget |
Beta Was this translation helpful? Give feedback.
-
Making a list (without a tree) with labelClicks for example isn't that hard. It gets complicated when you want to match keyboard scrolling (up down keys) with scrolling by mouse. The scroll jumps for up and down keys are now hardcoded to https://github.com/david-vanderson/dvui/blob/main/src/widgets/ScrollContainerWidget.zig#L291 You can match the scroll jumps probably to set the scroll jump size to the same height as the widgets in the list. But you don't want to scroll at every down or up keypress. The TUI filemanager 'nnn' has a nice keyboard/mouse scrolling behavior in my opinion. It starts to scroll if the cursor is 3 lines above the end of the view. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to have a browser widget, which displays a list of items, which the user can click on for a action to happen. I think this should be doable in dvui.
The items to list I think of are string representations of relative file paths which can be just a parent folder name or a parent folder name with one or more child folders.
It would be nice if it was possible to let the user toggle between a 'list view' and a 'tree view'.
List view:
Flintstones/Fred
Flintstones/Wilma
Tree view:
- Fred
- Wilma
A example of a tree view in fltk is here:
https://www.fltk.org/doc-1.4/classFl__Tree.html#details
Beta Was this translation helpful? Give feedback.
All reactions