Re: signal connect on class member objects



Rob Benton wrote:

I want to create a class that is a Gtk::EventBox with a Gtk::DrawingArea
inside.  But I also want to connect extra methods of this class to the
drawingarea's realize and expose_event signals.  Is this possible or do
I need to create a derived class of Gtk::DrawingArea and then use that
as a member object?
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org <mailto:gtkmm-list gnome org>
http://mail.gnome.org/mailman/listinfo/gtkmm-list

as far as i know your drawing area will look pretty boring if you don't overide at least on_realize and on_expose_event ...; so i would suggest to derive your own drawing area (maybe you should take a look at http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch14.html) and then put an instance of that class in your specal eventbox.

what i don't understand: for what reason do you want to call on_realize() manually (it is called atomatically for you ...) ?

antonio



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