Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
982fd09c
Commit
982fd09c
authored
Jan 24, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Click sensitivity for MB1 and MB2 added
parent
b0b73339
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
1 deletion
+54
-1
xtt/lib/flow/gtk/flow_draw_gtk.cpp
xtt/lib/flow/gtk/flow_draw_gtk.cpp
+54
-1
No files found.
xtt/lib/flow/gtk/flow_draw_gtk.cpp
View file @
982fd09c
/*
* Proview $Id: flow_draw_gtk.cpp,v 1.
5 2007-01-12 07:58:06
claes Exp $
* Proview $Id: flow_draw_gtk.cpp,v 1.
6 2007-01-24 12:41:58
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -501,6 +501,50 @@ int FlowDrawGtk::event_handler( FlowCtx *ctx, GdkEvent event)
case
GDK_BUTTON_PRESS
:
switch
(
event
.
button
.
button
)
{
case
1
:
ctx
->
event_handler
(
flow_eEvent_MB1Down
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
if
(
click_sensitivity
&
flow_mSensitivity_MB1Click
&&
!
(
click_sensitivity
&
flow_mSensitivity_MB1DoubleClick
)
&&
!
(
click_sensitivity
&
flow_mSensitivity_MB1Press
))
{
memcpy
(
&
last_event
,
&
event
,
sizeof
(
event
));
button_pressed
=
0
;
button_clicked
=
1
;
last_press_x
=
(
int
)
event
.
button
.
x
;
last_press_y
=
(
int
)
event
.
button
.
y
;
return
1
;
}
else
if
(
!
(
click_sensitivity
&
flow_mSensitivity_MB1Click
)
&&
!
(
click_sensitivity
&
flow_mSensitivity_MB1DoubleClick
)
&&
click_sensitivity
&
flow_mSensitivity_MB1Press
)
{
memcpy
(
&
last_event
,
&
event
,
sizeof
(
event
));
button_pressed
=
1
;
button_clicked
=
0
;
last_press_x
=
(
int
)
event
.
button
.
x
;
last_press_y
=
(
int
)
event
.
button
.
y
;
}
break
;
case
2
:
ctx
->
event_handler
(
flow_eEvent_MB2Down
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
if
(
click_sensitivity
&
flow_mSensitivity_MB2Click
&&
!
(
click_sensitivity
&
flow_mSensitivity_MB2DoubleClick
)
&&
!
(
click_sensitivity
&
flow_mSensitivity_MB2Press
))
{
memcpy
(
&
last_event
,
&
event
,
sizeof
(
event
));
button_pressed
=
0
;
button_clicked
=
1
;
last_press_x
=
(
int
)
event
.
button
.
x
;
last_press_y
=
(
int
)
event
.
button
.
y
;
return
1
;
}
else
if
(
!
(
click_sensitivity
&
flow_mSensitivity_MB2Click
)
&&
!
(
click_sensitivity
&
flow_mSensitivity_MB2DoubleClick
)
&&
click_sensitivity
&
flow_mSensitivity_MB2Press
)
{
memcpy
(
&
last_event
,
&
event
,
sizeof
(
event
));
button_pressed
=
1
;
button_clicked
=
0
;
last_press_x
=
(
int
)
event
.
button
.
x
;
last_press_y
=
(
int
)
event
.
button
.
y
;
}
break
;
case
3
:
// Button 3
ctx
->
event_handler
(
flow_eEvent_MB3Down
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
if
(
click_sensitivity
&
flow_mSensitivity_MB3Press
&&
...
...
@@ -554,6 +598,7 @@ int FlowDrawGtk::event_handler( FlowCtx *ctx, GdkEvent event)
sts
=
ctx
->
event_handler
(
flow_eEvent_MB1PressShiftCtrl
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
else
ctx
->
event_handler
(
flow_eEvent_MB1Press
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
click_sensitivity
=
0
;
break
;
case
2
:
// Button2
button2_pressed
=
1
;
...
...
@@ -568,6 +613,7 @@ int FlowDrawGtk::event_handler( FlowCtx *ctx, GdkEvent event)
sts
=
ctx
->
event_handler
(
flow_eEvent_MB2PressShiftCtrl
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
else
sts
=
ctx
->
event_handler
(
flow_eEvent_MB2Press
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
click_sensitivity
=
0
;
break
;
case
3
:
// Button3
button3_pressed
=
1
;
...
...
@@ -584,6 +630,7 @@ int FlowDrawGtk::event_handler( FlowCtx *ctx, GdkEvent event)
else
#endif
sts
=
ctx
->
event_handler
(
flow_eEvent_MB3Press
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
click_sensitivity
=
0
;
break
;
}
}
...
...
@@ -611,6 +658,7 @@ int FlowDrawGtk::event_handler( FlowCtx *ctx, GdkEvent event)
sts
=
ctx
->
event_handler
(
flow_eEvent_MB1ClickShiftCtrl
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
else
sts
=
ctx
->
event_handler
(
flow_eEvent_MB1Click
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
click_sensitivity
=
0
;
break
;
case
2
:
// Button2
if
(
(
event
.
button
.
state
&
GDK_SHIFT_MASK
)
&&
...
...
@@ -624,6 +672,7 @@ int FlowDrawGtk::event_handler( FlowCtx *ctx, GdkEvent event)
sts
=
ctx
->
event_handler
(
flow_eEvent_MB2ClickShiftCtrl
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
else
sts
=
ctx
->
event_handler
(
flow_eEvent_MB2Click
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
click_sensitivity
=
0
;
break
;
case
3
:
// Button3
#if 0
...
...
@@ -639,6 +688,7 @@ int FlowDrawGtk::event_handler( FlowCtx *ctx, GdkEvent event)
else
#endif
sts
=
ctx
->
event_handler
(
flow_eEvent_MB3Click
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
click_sensitivity
=
0
;
break
;
}
}
...
...
@@ -677,6 +727,7 @@ int FlowDrawGtk::event_handler( FlowCtx *ctx, GdkEvent event)
sts
=
ctx
->
event_handler
(
flow_eEvent_MB1DoubleClickShiftCtrl
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
else
sts
=
ctx
->
event_handler
(
flow_eEvent_MB1DoubleClick
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
click_sensitivity
=
0
;
break
;
case
2
:
// Button2
if
(
(
event
.
button
.
state
&
GDK_SHIFT_MASK
)
&&
...
...
@@ -690,6 +741,7 @@ int FlowDrawGtk::event_handler( FlowCtx *ctx, GdkEvent event)
sts
=
ctx
->
event_handler
(
flow_eEvent_MB2DoubleClickShiftCtrl
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
else
sts
=
ctx
->
event_handler
(
flow_eEvent_MB2DoubleClick
,
(
int
)
event
.
button
.
x
,
(
int
)
event
.
button
.
y
,
0
,
0
);
click_sensitivity
=
0
;
break
;
case
3
:
// Button3
#if 0
...
...
@@ -705,6 +757,7 @@ int FlowDrawGtk::event_handler( FlowCtx *ctx, GdkEvent event)
else
sts = ctx->event_handler( flow_eEvent_MB3DoubleClick, (int)event.button.x, (int)event.button.y, 0, 0);
#endif
click_sensitivity
=
0
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment