signals with parameters



Hi,

I've a window class which creates some HScale widgets based on a
saved file. So I create them dynamic with new and store the pointers in
a std::vector. This works great, but I could only connect all HScale
widgets to one callback function:

      hscale->signal_value_changed ().connect (sigc::mem_fun (*this,
          &Application::on_target_hscale_changed));

In this callback I like to get the correct HScale widget pointer whose
value was changed. I found this in docs:

http://libsigc.sourceforge.net/libsigc2/docs/manual/html/ch02s03.html

This reads like the stuff I need, but how could I use this with HScale?
Need I to derivate HScale and add this new signal with parameters? How
how could I do this?

regards
Andreas



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]