Does this mean we can register a callback function ? If so, how ?
At low-level, you catch a window's events with a callback that the OS automatically calls when something happens. SFML has its own callback internally, then it translates the messages to sf::Event and store them until you call GetEvent.
See below for registering your own callback.
These are random examples that could be used : Even in regular Textbox, there is a copy and paste function.
SFML is not really made for that purpose. Like I said, there are other windowing APIs much more complete.
I don't really see why it shouldn't be implemented and in some cases it might be usefull :
-It's only one Event so it will not messy the API
-It is very easy to implement.
-It can even be usefull for a Textbox !
It's easy for me, but then it's so complicated for users.
Didn't really get that, but I guess that by searching, I'll find out...
Every window has an event callback attached to it, to which it can send its events. It's easy to setup (one call). SFML windows already have an event callback, which is attached by SFML to catch the windows events and translate them to sf::Event. But you can install your own callback between the window and the SFML callback, that's what SFML does when you pass an external window (a window that SFML didn't create): it still has its original event callback, plus the SFML one. If you're interested I can show you how to do it.