cwidget
0.5.17
|
An event based on sigc++ slots. More...
#include <toplevel.h>
Public Member Functions | |
slot_event (const sigc::slot0< void > &_the_slot) | |
void | dispatch () |
An event based on sigc++ slots.
This is important because it can avoid some timing issues that occur when an object is destroyed before its callback triggers. However, you cannot construct one of these threadsafely unless you are EXTREMELY careful, because it involves a slot copy; as with other sigc++ stuff, I recommend that you only create these in the 'main thread'. (of course, passing around pointers to the resulting object is just fine, as long as the final invocation is also in the main thread)