[SDL] Copy & Paste support
Bob Pendleton
bob at pendleton.com
Mon Jan 26 11:45:22 PST 2004
On Mon, 2004-01-26 at 11:34, Gabriel Gambetta wrote:
http://www.libsdl.org/projects/scrap/
Is an example of how to do what you are asking. SDL lets you get all the
window manager events, even the ones you don't want. By using
SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE); to enable them. After that,
you just handle the normal Windows events to do what you want. Take a
look at scrap for a working example.
Bob Pendleton
> Hello everyone,
>
> I have, as many of you, a custom GUI built on top of SDL. I have
> edit boxes, among other things.
>
> Now, I want to implement copy-paste, at least in the Win32 build.
> Not only within my app but copying somewhere and pasting in my
> edit box.
>
> I can think of an easy way of doing it, and that's listening to
> CTRL-V or SHIFT-INS and doing the appropriate actions then. However,
> this is somewhat fragile and somewhat ugly from a design standpoint,
> because I want to intercept Paste events, not CTRL-V events.
>
> Is there any other way of implementing this?
>
> Thanks,
> --Gabriel
>
> Ing. Gabriel Gambetta
> ARTech - GeneXus Development Team
> ggambett at artech.com.uy
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
--
+---------------------------------------+
+ Bob Pendleton: writer and programmer. +
+ email: Bob at Pendleton.com +
+ web: www.GameProgrammer.com +
+---------------------------------------+
More information about the SDL
mailing list