-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag and drop #18
Comments
Maybe @mirzakhany also needs something like this . |
@oligo thanks for maintaining this |
Hi, @gedw99, I guess you are referring to the file tree component, right? For in-app DnD, this should be straightforward. I will try to add some event handler and give it a try. For the second part, as you see from the linked issue, framework support is halted, maybe we have to figure out why first. |
Thanks . In app , ans you aptly put it, dnd would be highly useful . Os based is not that important t , since the file tree is showing what files are on the OS. I use xml to represent a document , that is yet to be rendered into its final form ( pdf, email, svg, html. essentially we are binding data sources to the xml layout. so when they drop a file they are dropping it onto a gio canvas which has placeholders exposed. We then record the mapping of a placeholder to a file . later the xml file is processed along with the files to produce a finished document. the files represent the data . Be it markdown or image or sql query. This is the xml: https://github.com/ajstarks/deck/tree/master?tab=readme-ov-file#markup that’s my use case at least . |
OK, I get your point. So you want to use file entries of file tree as source and make it draggable. The other part is delegated to widgets in your app, right? |
Yes that’s pretty much it. if you want to make a basic example of drag and dropping to an xml gio canvas then we know it will work . The deck one already does this . See below.. Once the deck xml slots are mapped to the file paths it can be saved or passed to the deck gio renderer. This is the deck gio renderer. The widgets in my app as you say . |
Dropping items to the file tree itself is not yet implemented, I'll finish it some time later. |
will test on Windows...tomorrow, but should work same since its all in app. |
Added to EntryNavItem and test passed. |
Thanks @oligo will try it out today |
I’m planning to add a watcher if some sort so that if the file system changes the gui updates . Will add an issue for this though as it’s pretty different to this |
Oh wow I just noticed that the drag and drop on the tree view works. It does not move the file, but you can drag and drop visually. this means we can hook it into the File Ops in the other issue if we want. |
It would be really awesome if drag and drag worked .
The tree is great and allows you to see all your files .
drag and drop files from the tree across to a layout, so that users can easily compose their layouts from the resources they have on disk .
dag and drop a file ( from the OS) into a folder in the tree across, so that users can easily “ upload files “.
I know this is a ton of work and gio does not seem to have automatic drag and drop .
gioui/gio#111
The text was updated successfully, but these errors were encountered: