Re: [gtkmm] Gtk::DrawingArea help required
- From: "Timothy M. Shead" <tshead k-3d com>
- To: ej <e j virgin net>
- Cc: gtkmm-list gnome org
- Subject: Re: [gtkmm] Gtk::DrawingArea help required
- Date: Wed, 22 Sep 2004 14:12:22 -0700
ej wrote:
The button signal handler works fine when I comment out the expose event
handler connect line, but
with that line the program fails to compile with the following :
ejames sonata:/data/My_NEAT/StockDB/helloworld> g++ -o picture main.cpp
Picture.cpp `pkg-config gtkmm-2.0 --cflags --libs`
Picture.cpp: In constructor `Picture::Picture()':
Picture.cpp:24: error: no matching function for call to `
Glib::SignalProxy1<bool, GdkEventExpose*>::connect(SigC::Slot0<void>)'
/opt/gnome/include/gtkmm-2.0/glibmm/signalproxy.h:136: error: candidates
are:
SigC::Connection Glib::SignalProxy1<R, P1>::connect(const SigC::Slot1<R,
P1>&, bool) [with R = bool, P1 = GdkEventExpose*]
The signature of event handlers is dictated by the signal; in this case,
you have to provide a function that takes GdkEventExpose* and returns bool:
bool Picture::on_expose_event(GdkEventExpose*)
{
std::cout << "expose event generated" << std::endl;
}
Cheers,
Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]