Drag and drop
GavinWraith (26) 1563 posts |
One of the attractive features of RISC OS is the use of drag-and-drop. I have been disappointed by the GUIs available for Linux because they do not seem to offer the user much in the way of letting user-applications respond to graphical user-actions. This is presumably because GUIs in Linux are afterthoughts, not a fundamental part of the OS. Where in RISC OS you can have an application respond to Wimp messages, I presume that with Linux your application has to be linked to libraries that are part of the GUI. For example, does anyone know of a Linux text-editor that can do what the humble !Edit does when you SHIFT-drag a filer object into a text window? Drag-and-drop is used for moving and copying files in most Linux file-managers that I have seen, but do there exist applications that can pass on the drag-and-drop data to other user applications, for use in IO-operations, for example? |
Rick Murray (539) 13850 posts |
I believe that the use of drag and drop actions in other systems were sort of “added on after” and “in specific circumstances” than being a part of the original system design.
For those who don’t know, that inserts the path/name of the dragged file rather than its contents. Hate to break it to you, Gavin, but that’s not Edit exactly. It is the text editor handling part of RISC_OSLib. …Sources.Lib.RISC_OSLib.rlib.c.txtedit, function txtedit_obeyeventcode, looks like it passes actions to be handled by stuffing special key codes into the handler? Maybe I misread that. Anyway, it’s there at the point of inserting the file that it determines whether to insert the filename or the file contents: filetype = xferrecv_checkinsert(&filename); if (filetype != -1) { if (akbd_pollsh()) { /* Shift held down, insert the filename instead */ txt_insertstring(s->t, filename); txt_movedot(s->t, strlen(filename)); txt_insertstring(s->t, "\n"); /* add a \n too */ txt_movedot(s->t, 1); } else { int size = txt_size(s->t); /* No shift, xferrecv the file contents */ txtedit_doinsertfile(s, filename, xferrecv_file_is_safe()); xferrecv_insertfileok(); txt_movedot(s->t, txt_size(t) - size); /* move past insertion */ }; } Of course, you could argue that it is still Edit, given as how most of Edit is in the library rather than the application… |
Stuart Painting (5389) 714 posts |
That’s true of macOS as well. I’m far more likely to copy-and-paste on macOS so as to avoid the file getting moved rather than copied. There’s one exception: I always drag-and-drop to a USB stick as it’s much faster than copy-and-paste when multiple files are involved (e.g. 30 minutes instead of 50 minutes to copy files totalling 7GB). |