Re: begginer with C++



Carlos Garces wrote:

Thanks!
It work, I have compliled my 1º C++ program.

In the code that i use as reference they used signal_activate(). I
think that i can use it in a EventBox ¿It's true?

Un saludo
Carlos Garcés


2006/2/25, Jonathon Jongsma
It should return a bool.  The previous suggestions got it backwards
(except Jason, who got the return value correct the first time but
then changed his mind :) ).  The signature of
signal_button_press_event() is as follows:
Glib::SignalProxy1<bool,GdkEventButton*>
Gtk::Widget::signal_button_press_event()

If you look at the template arguments, they tell you what your
signal-handler function must look like.  The first argument specifies
the return value, and the remaining arguments specify the arguments
that are passed to the function.  So it would look like this:
bool MainWindow::onAbout(GdkEventButton* ev);

(note that your original function took an argument of GdkEventKey*,
but it should be GdkEventButton*)

Jonner

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

I can't ever get those return values straight... 8-)

Jason



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