On 2020-07-24 23:14, josef Reidinger wrote:
4. drag and drop in ncurses it should be possible as mouse support mouse down and also mouse up. See doc at https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/mouse.html
Drag'n'drop is something that always just caused a lot of pain for me. There are useful applications for it, but anything in text mode is not among that. Back in the mid-90s when everybody as starting to use MS Excel for everything, drag'n'drop was en vogue. Remember OLE to embed other MS Office document snippets? A spreadsheet in a Word doc, a piece of graphics in an Excel spreadsheet? That stuff never worked well, much less as the user intended. Agreed, mouse support in general would be nice to navigate in an NCurses dialog. But drag'n'drop always was more of a nuissance than something useful: Stuff would unintentionally move from one place to another, and you'd spend more time restoring the mess you just created with a lot of "undo" steps. And "undo" is something we don't have, and something that would be really hard to implement in any useful generic way.
BTW there is also quite nice quick intro to curses at https://www.2n.pl/blog/basics-of-curses-library-in-ruby-make-awesome-termina...
Do you really want to program on that level? Remember, NCurses by itself does not have the notion of self-sufficient widgets. It only has very low-level windows; all it does is handle repainting. Anything beyond that you have to do on the application side, starting with simple key handling and scrolling. There isn't even anything like a simple input field. It's one thing to do something on the level of "tput" to make the output of scripts on stdout nicer; it's something completely different to have wizards and input forms, let alone more sophisticated stuff like trees or scrollable multi-column tables. Believe me, you don't want to go there as a normal application developer, much less as a YaST developer. This stuff is something that our UI layer abstracts from us. Try experimenting with that low-level stuff; it will be a healthy and most educational thing to do. You will learn to value the abstractions of our UI. ;-) Kind regards -- Stefan Hundhammer <shundhammer@suse.de> YaST Developer SUSE Linux GmbH GF: Felix Imendörffer, Jane Smithard, Graham Norton; HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org