Re: different callbacks for left and right button using "button_press_event"
- From: Paul Davis <pbd Op Net>
- To: "Ignacio" <inodal teleline es>
- Cc: "GTK-List" <gtk-list gnome org>
- Subject: Re: different callbacks for left and right button using "button_press_event"
- Date: Sat, 20 Oct 2001 10:37:54 -0400
>I'm using C++ and GTK+. Please don't tell me to use gtk--. It's to late ;)
>(You can see part of my classes specifications at the end of this mail)
I'll still tell you to use gtkmm. Its not too late. Its a much better idea.
>void ParameterButton::CB_Button(GtkWidget* widget, GdkEventButton* event,
>gpointer cd)
>{
> ParameterButton * pb = (ParameterButton *) cd;
> switch (event->button) {
> case 1:
> g_print("CB_Button, left button\n");
> if(pb->_callback != NULL) {
> void (*pf) (gpointer) = (void (*) (gpointer)) pb->_callback;
> pf(pb->_calldata);
without knowing what the thing you set pb->_callback to is, there is no
way of knowing whether this is a legal statement. it doesn't seem
impossible from your design that you've attached a member function to
pb->_callback, for example. this cannot work. but like i said, i don't
know what you're trying to call.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]