From 0798d951c3cba8acb8f75740242b3b2d9fc848be Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 30 Mar 2000 19:11:15 +0000 Subject: The Linux version now allows you to select multiple pieces using the mouse if you hold the CTRL key down git-svn-id: http://svn.leocad.org/trunk@59 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- linux/main.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'linux/main.cpp') diff --git a/linux/main.cpp b/linux/main.cpp index 5951d90..610f8a4 100644 --- a/linux/main.cpp +++ b/linux/main.cpp @@ -90,9 +90,11 @@ static gint button_press_event (GtkWidget *widget, GdkEventButton *event) y = widget->allocation.height - (int)event->y - 1; if (event->button == 1) - project->OnLeftButtonDown(x, y); + project->OnLeftButtonDown(x, y, (event->state & GDK_CONTROL_MASK) != 0, + (event->state & GDK_SHIFT_MASK) != 0); if (event->button == 3) - project->OnRightButtonDown(x, y); + project->OnRightButtonDown(x, y, (event->state & GDK_CONTROL_MASK) != 0, + (event->state & GDK_SHIFT_MASK) != 0); gtk_window_set_focus(GTK_WINDOW(main_window), drawing_area); @@ -106,9 +108,11 @@ static gint button_release_event (GtkWidget *widget, GdkEventButton *event) y = widget->allocation.height - (int)event->y - 1; if (event->button == 1) - project->OnLeftButtonUp(x, y); + project->OnLeftButtonUp(x, y, (event->state & GDK_CONTROL_MASK) != 0, + (event->state & GDK_SHIFT_MASK) != 0); if (event->button == 3) - project->OnRightButtonUp(x, y); + project->OnRightButtonUp(x, y, (event->state & GDK_CONTROL_MASK) != 0, + (event->state & GDK_SHIFT_MASK) != 0); return TRUE; } @@ -130,7 +134,8 @@ static gint motion_notify_event (GtkWidget *widget, GdkEventMotion *event) y = widget->allocation.height - (int)event->y - 1; // if (state) - project->OnMouseMove(x, y); + project->OnMouseMove(x, y, (event->state & GDK_CONTROL_MASK) != 0, + (event->state & GDK_SHIFT_MASK) != 0); return TRUE; } -- cgit v1.2.3