Re: Button 3 and clicked signal...
- From: Charlie Schmidt <ishamael muhri net>
- To: "James K. Wiggs" <wiggs novum-millennium org>, "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: Button 3 and clicked signal...
- Date: 16 Oct 2000 18:41:47 EDT
-
use the 'button_press_event' or 'button_release_event'?
"button-press-event"
gboolean user_function (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
"button-release-event"
gboolean user_function (GtkWidget *widget,
GdkEventButton *event,
gpointer user_data);
then just use event->type, which will be GDK_BUTTON_PRESS | GDK_2BUTTON_PRESS |
GDK_3BUTTON_PRESS | GDK_BUTTON_RELEASE
then you can just do whatever is appropriate for which ever button was pressed
[Mon, 16 Oct 2000 15:29:17 -0700 (PDT)] <James K. Wiggs>
Folks,
I'm trying to set up buttons to behave differently depending upon
which mouse button was pressed; if button 1 is pressed, the current
contents of the window are replaced, and if button 3 is pressed, a new
window is created with the desired contents. I have attached a callback
to the clicked signal, and inside the callback, I grab the button event
with gtk_get_current_event(). From this, I determine which button
was pressed, then free the event with gdk_event_free(). The problem
is that clicking with button 3 (i.e. the right mouse button) does not
seem to generate a "clicked" signal. What's up? Do I have to do
some extra work to cause a right mouse click to generate a signal?
thanks,
Jim Wiggs
wiggs wiggs net
--
Charlie Schmidt - ishamael muhri net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]