gtkmm tutorial question

In the gtkmm tutorial on single item containers (Scrolled window) there is an example of a table with multiple toggle buttons. Unfortunetly the example doesn’t show how you can identify if one of the toggle buttons have been clicked, just the close button. You can setup the callback for an array of buttons. My issue is how do you determine which toggle button it was that was clicked. It can be done in Gtk+ but it eludes me how to get access to that kind of info in Gtkmm.  Getting the signal connection and callback parmeters correct seems to be the trick.


For each button:

buttons[x]->signal_clicked().connect(sigc::mem_fun(*this, &ExampleWindow::on_button_clicked));



void ExampleWindow::on_button_clicked ()




This will connect the buttons but it doesn’t pass enough info to figure out which button got clicked. Any ideas would be appreciated.




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