summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorleo2000-03-30 19:11:15 +0000
committerleo2000-03-30 19:11:15 +0000
commit0798d951c3cba8acb8f75740242b3b2d9fc848be (patch)
tree10b089721bb5fb567e459aa19e0e4bc39abf576e /linux
parent2cfefd03c4a6127434df30efaf757c8000b9eded (diff)
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
Diffstat (limited to 'linux')
-rw-r--r--linux/main.cpp15
-rw-r--r--linux/system.cpp4
-rw-r--r--linux/system.h12
3 files changed, 13 insertions, 18 deletions
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;
}
diff --git a/linux/system.cpp b/linux/system.cpp
index 8849b5c..fb38be1 100644
--- a/linux/system.cpp
+++ b/linux/system.cpp
@@ -136,7 +136,9 @@ void SystemUpdateAction(int new_action, int old_action)
case LC_ACTION_SELECT: button = tool_toolbar.select;
{
x = 0; y = 2;
- if (IsKeyDown(KEY_CONTROL))
+ // TODO: FIX ME !!!
+ if (0)
+ // if (IsKeyDown(KEY_CONTROL))
xpm = cr_selm;
else
xpm = cr_sel;
diff --git a/linux/system.h b/linux/system.h
index 31c5251..3834453 100644
--- a/linux/system.h
+++ b/linux/system.h
@@ -91,16 +91,4 @@ inline long SystemGetTicks()
void SystemSwapBuffers();
-inline bool IsKeyDown(int key)
-{
- return false;//(GetKeyState(key) < 0);
-}
-
#endif // _SYSTEM_H_
-
-
-
-
-
-
-