Skip to content
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

Add copy / paste #98

Closed
futurepaul opened this issue Aug 4, 2019 · 3 comments · Fixed by #177
Closed

Add copy / paste #98

futurepaul opened this issue Aug 4, 2019 · 3 comments · Fixed by #177
Labels
shell concerns the shell abstraction

Comments

@futurepaul
Copy link
Collaborator

As we work toward the "longer term future" as described in #16, a pasteboard (the Mac word) / clipboard (the Windows word) would very nice to have!

One possibility is to rely on the Clipboard crate. In fact, it seems like it's not totally necessary for this functionality to be inside druid-shell or even druid? To my understanding, the winit project declared clipboard functionality out of scope for this reason.

In the longer term, I would expect a clipboard that supports data types beyond text, or a non-global pasteboard, will be important for apps like Runebender. But maybe that's running before we can walk.

@cmyr
Copy link
Member

cmyr commented Aug 9, 2019

I'm going to hijack this issue to track copy/paste more generally; we're going to need to copy and paste paths for runebender, and if we're doing that within the app we should take the time to get it working with the rest of the system. For paths this means converting them to postscript.

Not sure about what the API for this will look like, but at the very least we should try to support text, rich text, images (at least png+jpg), and paths.

@cmyr cmyr changed the title Add basic copy / paste for text Add copy / paste Aug 9, 2019
@cmyr cmyr added this to the Runebender support #1 milestone Aug 9, 2019
@cmyr cmyr added the shell concerns the shell abstraction label Aug 9, 2019
@raphlinus
Copy link
Contributor

raphlinus commented Aug 9, 2019

I don't have strong feelings whether support is in druid-shell proper or not. It seems like there's benefit to having it hook the event loop. But yes, a valuable feature, and also valuable to support types beyond plain text (including vector graphics), as they're directly useful for Runebender.

As we've discussed on Zulip, it's unclear whether EPS or PDF are a better type for vector paths. The former is deprecated on macOS but possibly more widely implemented in other tools that we care about interop with.

@cmyr
Copy link
Member

cmyr commented Aug 9, 2019

I think this will require druid-shell support, because the exact mechanics of the pasteboard (such as how the type of data is communicated) will be dependent on the platform.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shell concerns the shell abstraction
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants