gtk--: connected methods with args



Is it possible to connect to a method that needs arguments, like: 

#define FOO 0
#define BAR 1
Gtk_Button *foo = new Gtk_Button("Foo");
Gtk_Button *bar = new Gtk_Button("Bar");
connect_to_method(foo->pressed, this, &button_pressed(FOO));
connect_to_method(bar->pressed, this, &button_pressed(BAR));

void button_pressed(int t){ 
  if (t == FOO){
	...
  } else {
    if (t == BAR) {
	...
    }
  }
}

If so how do I do it (the above doesnt obviosly)?

 /mill

-- 
#############################################################
# S-mail: Olof Oberg     #  mill@pedgr571.sn.umu.se         #
#         Pedagoggr. 7A  #  mill@ludd.luth.se               #
#         S-907 30 Umea  #  tdv94oog@cs.umu.se              #
# Phone:  090-197395     #  http://pedgr571.sn.umu.se/~mill #
#############################################################




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