Copy&Paste functionality

Issue #432 resolved
Martin Preisler
created an issue

Sumwars developers (and I imagine many others) need to paste values (IP addresses, XML code, etc..) into their applications. I think we can make a contrib module that would subscribe to GlobalEventSet (to get an idea when Ctrl+C, Ctrl+V is pressed). When copying is requested, we would simply get the focused widget (widget with keyboard input focus), then we would check if that widget is a supported copyable widget (EditBox and MultiLineEditBox basically, I don't think we need to support copying from StaticText). Depending on the widget type we would get currently selected text and push it into the clipboard (this will require a lot of ifdefs as there is no easy multiplatform way to do this, code for WinAPI and X11 should be fairly straightforward though).

Same for pasting...

Reproducibility: N/A

Comments (1)

  1. Martin Preisler reporter

    Implemented internal CEGUI clipboard with optional NativeClipboardProvider interface that users can use to sync CEGUI clipboard with system Clipboard.

    Implementations for common platforms may happen in the future.

  2. Log in to comment