Re: [gtkmm] TreeView: number of clicked column
- From: Ole Laursen <olau hardworking dk>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] TreeView: number of clicked column
- Date: 03 Apr 2003 18:10:23 +0200
"kick van bee" <kickvb linuxmail org> writes:
> A good way to do that is to create an object inheriting from
> Gtk::TreeViewColumn and that will keep the column number and connect
> to signal_clicked(). Then it can catch the click signal and pass it
> with the column number to my general function.
>
> Is there another quicker way to to that?
You can do funky stuff with SigC::bind and pointers. Perhaps it can
help here. For example:
void PreferencesWindow::on_checkbutton_changed(Gtk::CheckButton *checkbutton,
Glib::ustring key)
{
// process checkbutton, using key
}
PreferencesWindow::PreferencesWindow()
{
// ...
checkbutton->signal_toggled()
.connect(SigC::bind(SigC::slot(*this, &PreferencesWindow::on_checkbutton_changed),
checkbutton, key));
// ...
}
--
Ole Laursen
http://www.cs.auc.dk/~olau/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]