Re: [gtk-list] gtk--: connected methods with args



Olof Oberg <mill@pedgr571.sn.umu.se> writes:
> 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));

connect_to_method(foo->pressed, this, &button_pressed, FOO);

--
-- Tero Pulkkinen -- terop@modeemi.cs.tut.fi --



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