Point button_press_event to the same function.



Hi.

I what to point all the button_press_event of my menu to the same function

Something like this
pWidget->signal_button_press_event().connect(sigc::mem_fun(*this, pFunc));

And the function:

bool MainWindow::onClickMenu(GdkEventButton *event)
{
    printf ("Button %d\n", event->button);
}

But I can determine the button (EventBox) that I have clicked.

¿Any



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