// Code from construct setting up image refXml->get_widget("imgMain", imgMain_); if (!imgMain_) throw std::runtime_error("Couldn't find main image in calc.glade"); imgMain_->add_events(Gdk::POINTER_MOTION_MASK); imgMain_->signal_motion_notify_event().connect( sigc::mem_fun(*this, &mainWin::on_area_motion_notify_event)); //motion event function bool mainWin:: on_area_motion_notify_event(GdkEventMotion* event) { std::cout << "Motion Event" << std::endl; }