#include "MouseEvents.h"Include dependency graph for MouseEvents.c:

Go to the source code of this file.
Defines | |
| #define | CTRL_KEY 1000 |
| #define | SHIFT_KEY 2000 |
| #define | PRESSED_LEFT 0 |
| #define | RELEASED_LEFT -5 |
| #define | CLCK_LEFT 3 |
| #define | DBL_CLCK_LEFT 10 |
| #define | PRESSED_MIDDLE 1 |
| #define | RELEASED_MIDDLE -4 |
| #define | CLCK_MIDDLE 4 |
| #define | DBL_CLCK_MIDDLE 11 |
| #define | PRESSED_RIGHT 2 |
| #define | RELEASED_RIGHT -3 |
| #define | CLCK_RIGHT 5 |
| #define | DBL_CLCK_RIGHT 12 |
| #define | TimerIdLeft 10 |
| #define | TimerIdMiddle 20 |
| #define | TimerIdRight 30 |
Functions | |
| static void CALLBACK | reset_left_click_counter (HWND hwnd, UINT msg, UINT_PTR id, DWORD data) |
| static void CALLBACK | reset_middle_click_counter (HWND hwnd, UINT msg, UINT_PTR id, DWORD data) |
| static void CALLBACK | reset_right_click_counter (HWND hwnd, UINT msg, UINT_PTR id, DWORD data) |
| static void | KillTimerLeft (HWND hwnd) |
| static void | KillTimerMiddle (HWND hwnd) |
| static void | KillTimerRight (HWND hwnd) |
| void | ON_EVENT_GRAPH_WM_MOUSEMOVE (HWND hwnd, int x, int y, UINT keyFlags) |
| void | ON_EVENT_GRAPH_WM_LBUTTONDOWN (HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) |
| void | ON_EVENT_GRAPH_WM_LBUTTONUP (HWND hwnd, int x, int y, UINT keyFlags) |
| void | ON_EVENT_GRAPH_WM_LBUTTONDBLCLK (HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) |
| void | ON_EVENT_GRAPH_WM_MBUTTONDOWN (HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) |
| void | ON_EVENT_GRAPH_WM_MBUTTONUP (HWND hwnd, int x, int y, UINT keyFlags) |
| void | ON_EVENT_GRAPH_WM_MBUTTONDBLCLK (HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) |
| void | ON_EVENT_GRAPH_WM_RBUTTONDOWN (HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) |
| void | ON_EVENT_GRAPH_WM_RBUTTONUP (HWND hwnd, int x, int y, UINT keyFlags) |
| void | ON_EVENT_GRAPH_WM_RBUTTONDBLCLK (HWND hwnd, BOOL fDoubleClick, int x, int y, UINT keyFlags) |
Variables | |
| static int | MOUSEX = 0 |
| static int | MOUSEY = 0 |
| static BOOL | wait_dclick_left = FALSE |
| static BOOL | dclick_left = FALSE |
| static BOOL | lose_up_left = FALSE |
| static BOOL | wait_dclick_middle = FALSE |
| static BOOL | dclick_middle = FALSE |
| static BOOL | lose_up_middle = FALSE |
| static BOOL | wait_dclick_right = FALSE |
| static BOOL | dclick_right = FALSE |
| static BOOL | lose_up_right = FALSE |
| #define CLCK_LEFT 3 |
| #define CLCK_MIDDLE 4 |
| #define CLCK_RIGHT 5 |
| #define CTRL_KEY 1000 |
Definition at line 7 of file MouseEvents.c.
| #define DBL_CLCK_LEFT 10 |
Definition at line 13 of file MouseEvents.c.
Referenced by ON_EVENT_GRAPH_WM_LBUTTONDBLCLK(), and reset_left_click_counter().
| #define DBL_CLCK_MIDDLE 11 |
Definition at line 18 of file MouseEvents.c.
Referenced by ON_EVENT_GRAPH_WM_MBUTTONDBLCLK(), and reset_middle_click_counter().
| #define DBL_CLCK_RIGHT 12 |
Definition at line 23 of file MouseEvents.c.
Referenced by ON_EVENT_GRAPH_WM_RBUTTONDBLCLK(), and reset_right_click_counter().
| #define PRESSED_LEFT 0 |
Definition at line 10 of file MouseEvents.c.
Referenced by ON_EVENT_GRAPH_WM_MOUSEMOVE(), and reset_left_click_counter().
| #define PRESSED_MIDDLE 1 |
Definition at line 15 of file MouseEvents.c.
Referenced by ON_EVENT_GRAPH_WM_MOUSEMOVE(), and reset_middle_click_counter().
| #define PRESSED_RIGHT 2 |
Definition at line 20 of file MouseEvents.c.
Referenced by ON_EVENT_GRAPH_WM_MOUSEMOVE(), and reset_right_click_counter().
| #define RELEASED_LEFT -5 |
| #define RELEASED_MIDDLE -4 |
| #define RELEASED_RIGHT -3 |
| #define SHIFT_KEY 2000 |
Definition at line 8 of file MouseEvents.c.
| #define TimerIdLeft 10 |
Definition at line 28 of file MouseEvents.c.
Referenced by KillTimerLeft(), ON_EVENT_GRAPH_WM_LBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_LBUTTONDOWN(), ON_EVENT_GRAPH_WM_MOUSEMOVE(), and reset_left_click_counter().
| #define TimerIdMiddle 20 |
Definition at line 29 of file MouseEvents.c.
Referenced by KillTimerMiddle(), ON_EVENT_GRAPH_WM_MBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_MBUTTONDOWN(), ON_EVENT_GRAPH_WM_MOUSEMOVE(), and reset_middle_click_counter().
| #define TimerIdRight 30 |
Definition at line 30 of file MouseEvents.c.
Referenced by KillTimerRight(), ON_EVENT_GRAPH_WM_MOUSEMOVE(), ON_EVENT_GRAPH_WM_RBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_RBUTTONDOWN(), and reset_right_click_counter().
| static void KillTimerLeft | ( | HWND | hwnd | ) | [static] |
Definition at line 629 of file MouseEvents.c.
References dclick_left, FALSE, lose_up_left, TimerIdLeft, and wait_dclick_left.
Referenced by ON_EVENT_GRAPH_WM_MBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_MBUTTONDOWN(), ON_EVENT_GRAPH_WM_MBUTTONUP(), ON_EVENT_GRAPH_WM_MOUSEMOVE(), ON_EVENT_GRAPH_WM_RBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_RBUTTONDOWN(), ON_EVENT_GRAPH_WM_RBUTTONUP(), reset_middle_click_counter(), and reset_right_click_counter().
00630 { 00631 wait_dclick_left = FALSE; 00632 dclick_left = FALSE; 00633 lose_up_left=FALSE; 00634 KillTimer(hwnd,TimerIdLeft); 00635 }
Here is the caller graph for this function:

| static void KillTimerMiddle | ( | HWND | hwnd | ) | [static] |
Definition at line 637 of file MouseEvents.c.
References dclick_middle, FALSE, lose_up_middle, TimerIdMiddle, and wait_dclick_middle.
Referenced by ON_EVENT_GRAPH_WM_LBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_LBUTTONDOWN(), ON_EVENT_GRAPH_WM_LBUTTONUP(), ON_EVENT_GRAPH_WM_MOUSEMOVE(), ON_EVENT_GRAPH_WM_RBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_RBUTTONUP(), reset_left_click_counter(), and reset_right_click_counter().
00638 { 00639 wait_dclick_middle = FALSE; 00640 dclick_middle = FALSE; 00641 lose_up_middle=FALSE; 00642 KillTimer(hwnd,TimerIdMiddle); 00643 }
Here is the caller graph for this function:

| static void KillTimerRight | ( | HWND | hwnd | ) | [static] |
Definition at line 645 of file MouseEvents.c.
References dclick_right, FALSE, lose_up_right, TimerIdRight, and wait_dclick_right.
Referenced by ON_EVENT_GRAPH_WM_LBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_LBUTTONDOWN(), ON_EVENT_GRAPH_WM_LBUTTONUP(), ON_EVENT_GRAPH_WM_MBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_MBUTTONDOWN(), ON_EVENT_GRAPH_WM_MBUTTONUP(), ON_EVENT_GRAPH_WM_MOUSEMOVE(), ON_EVENT_GRAPH_WM_RBUTTONDOWN(), reset_left_click_counter(), and reset_middle_click_counter().
00646 { 00647 wait_dclick_right = FALSE; 00648 dclick_right = FALSE; 00649 lose_up_right=FALSE; 00650 KillTimer(hwnd,TimerIdRight); 00651 }
Here is the caller graph for this function:

Definition at line 206 of file MouseEvents.c.
References CTRL_KEY, BCG::CurWindow, DBL_CLCK_LEFT, dclick_left, FALSE, KillTimerMiddle(), KillTimerRight(), lose_up_left, MOUSEX, MOUSEY, PushClickQueue(), SHIFT_KEY, TimerIdLeft, TRUE, and wait_dclick_left.
Referenced by GetEventKeyboardAndMouse().
00207 { 00208 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00209 int horzsinPos=ScilabGC->horzsi.nPos; 00210 int vertsinPos=ScilabGC->vertsi.nPos; 00211 00212 KillTimerMiddle(hwnd); 00213 KillTimerRight(hwnd); 00214 00215 MOUSEX= x; 00216 MOUSEY= y; 00217 00218 wait_dclick_left=FALSE; 00219 dclick_left = TRUE; 00220 KillTimer(hwnd,TimerIdLeft); 00221 lose_up_left=TRUE; 00222 00223 if (GetKeyState(VK_CONTROL)<0) 00224 { 00225 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CTRL_KEY+DBL_CLCK_LEFT, 0, 0); 00226 } 00227 else 00228 if (GetKeyState(VK_SHIFT)<0) 00229 { 00230 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, SHIFT_KEY+DBL_CLCK_LEFT, 0, 0); 00231 } 00232 else 00233 { 00234 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, DBL_CLCK_LEFT, 0, 0); 00235 } 00236 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 142 of file MouseEvents.c.
References dclick_left, FALSE, KillTimerMiddle(), KillTimerRight(), lose_up_left, MOUSEX, MOUSEY, reset_left_click_counter(), TimerIdLeft, TRUE, and wait_dclick_left.
Referenced by GetEventKeyboardAndMouse().
00143 { 00144 KillTimerMiddle(hwnd); 00145 KillTimerRight(hwnd); 00146 00147 MOUSEX= x; 00148 MOUSEY= y; 00149 00150 if (wait_dclick_left) 00151 { 00152 wait_dclick_left = FALSE; 00153 dclick_left = TRUE; 00154 lose_up_left = FALSE; 00155 KillTimer(hwnd,TimerIdLeft); 00156 return; 00157 } 00158 00159 SetTimer(hwnd,TimerIdLeft,GetDoubleClickTime(),reset_left_click_counter); 00160 wait_dclick_left = TRUE; 00161 lose_up_left = FALSE; 00162 dclick_left = FALSE; 00163 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 165 of file MouseEvents.c.
References CTRL_KEY, BCG::CurWindow, dclick_left, FALSE, KillTimerMiddle(), KillTimerRight(), lose_up_left, MOUSEX, MOUSEY, PushClickQueue(), RELEASED_LEFT, SHIFT_KEY, TRUE, and wait_dclick_left.
Referenced by GetEventKeyboardAndMouse().
00166 { 00167 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00168 int horzsinPos=ScilabGC->horzsi.nPos; 00169 int vertsinPos=ScilabGC->vertsi.nPos; 00170 00171 KillTimerMiddle(hwnd); 00172 KillTimerRight(hwnd); 00173 00174 MOUSEX= x; 00175 MOUSEY= y; 00176 00177 if (wait_dclick_left) 00178 { 00179 lose_up_left=TRUE; 00180 return; 00181 } 00182 00183 if (!dclick_left) 00184 { 00185 if (GetKeyState(VK_CONTROL)<0) 00186 { 00187 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, RELEASED_LEFT+CTRL_KEY, 0, -1); 00188 } 00189 else 00190 if (GetKeyState(VK_SHIFT)<0) 00191 { 00192 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, RELEASED_LEFT+SHIFT_KEY, 0, -1); 00193 } 00194 else 00195 { 00196 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, RELEASED_LEFT, 0, -1); 00197 } 00198 } 00199 else 00200 if (lose_up_left) 00201 { 00202 lose_up_left=FALSE; 00203 } 00204 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 303 of file MouseEvents.c.
References CTRL_KEY, BCG::CurWindow, DBL_CLCK_MIDDLE, dclick_middle, FALSE, KillTimerLeft(), KillTimerRight(), lose_up_middle, MOUSEX, MOUSEY, PushClickQueue(), SHIFT_KEY, TimerIdMiddle, TRUE, and wait_dclick_middle.
Referenced by GetEventKeyboardAndMouse().
00304 { 00305 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00306 int horzsinPos=ScilabGC->horzsi.nPos; 00307 int vertsinPos=ScilabGC->vertsi.nPos; 00308 00309 MOUSEX= x; 00310 MOUSEY= y; 00311 00312 KillTimerLeft(hwnd); 00313 KillTimerRight(hwnd); 00314 00315 wait_dclick_middle=FALSE; 00316 dclick_middle = TRUE; 00317 KillTimer(hwnd,TimerIdMiddle); 00318 lose_up_middle=TRUE; 00319 00320 if (GetKeyState(VK_CONTROL)<0) 00321 { 00322 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CTRL_KEY+DBL_CLCK_MIDDLE, 0, 0); 00323 } 00324 else 00325 if (GetKeyState(VK_SHIFT)<0) 00326 { 00327 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, SHIFT_KEY+DBL_CLCK_MIDDLE, 0, 0); 00328 } 00329 else 00330 { 00331 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, DBL_CLCK_MIDDLE, 0, 0); 00332 } 00333 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 239 of file MouseEvents.c.
References dclick_middle, FALSE, KillTimerLeft(), KillTimerRight(), lose_up_middle, MOUSEX, MOUSEY, reset_middle_click_counter(), TimerIdMiddle, TRUE, and wait_dclick_middle.
Referenced by GetEventKeyboardAndMouse().
00240 { 00241 MOUSEX= x; 00242 MOUSEY= y; 00243 00244 KillTimerLeft(hwnd); 00245 KillTimerRight(hwnd); 00246 00247 if (wait_dclick_middle) 00248 { 00249 wait_dclick_middle = FALSE; 00250 dclick_middle = TRUE; 00251 lose_up_middle = FALSE; 00252 KillTimer(hwnd,TimerIdMiddle); 00253 return; 00254 } 00255 00256 SetTimer(hwnd,TimerIdMiddle,GetDoubleClickTime(),reset_middle_click_counter); 00257 wait_dclick_middle = TRUE; 00258 lose_up_middle = FALSE; 00259 dclick_middle = FALSE; 00260 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 262 of file MouseEvents.c.
References CTRL_KEY, BCG::CurWindow, dclick_middle, FALSE, KillTimerLeft(), KillTimerRight(), lose_up_middle, MOUSEX, MOUSEY, PushClickQueue(), RELEASED_MIDDLE, SHIFT_KEY, TRUE, and wait_dclick_middle.
Referenced by GetEventKeyboardAndMouse().
00263 { 00264 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00265 int horzsinPos=ScilabGC->horzsi.nPos; 00266 int vertsinPos=ScilabGC->vertsi.nPos; 00267 00268 KillTimerLeft(hwnd); 00269 KillTimerRight(hwnd); 00270 00271 MOUSEX= x; 00272 MOUSEY= y; 00273 00274 if (wait_dclick_middle) 00275 { 00276 lose_up_middle=TRUE; 00277 return; 00278 } 00279 00280 if (!dclick_middle) 00281 { 00282 if (GetKeyState(VK_CONTROL)<0) 00283 { 00284 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, RELEASED_MIDDLE+CTRL_KEY, 0, -1); 00285 } 00286 else 00287 if (GetKeyState(VK_SHIFT)<0) 00288 { 00289 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, RELEASED_MIDDLE+SHIFT_KEY, 0, -1); 00290 } 00291 else 00292 { 00293 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, RELEASED_MIDDLE, 0, -1); 00294 } 00295 } 00296 else 00297 if (lose_up_middle) 00298 { 00299 lose_up_middle=FALSE; 00300 } 00301 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 52 of file MouseEvents.c.
References CTRL_KEY, BCG::CurWindow, FALSE, KillTimerLeft(), KillTimerMiddle(), KillTimerRight(), MOUSEX, MOUSEY, PRESSED_LEFT, PRESSED_MIDDLE, PRESSED_RIGHT, PushClickQueue(), SHIFT_KEY, TimerIdLeft, TimerIdMiddle, TimerIdRight, wait_dclick_left, wait_dclick_middle, and wait_dclick_right.
Referenced by GetEventKeyboardAndMouse().
00053 { 00054 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00055 00056 int horzsinPos=ScilabGC->horzsi.nPos; 00057 int vertsinPos=ScilabGC->vertsi.nPos; 00058 00059 if ( wait_dclick_left || wait_dclick_middle || wait_dclick_right ) 00060 { 00061 if (wait_dclick_left) 00062 { 00063 KillTimerMiddle(hwnd); 00064 KillTimerRight(hwnd); 00065 00066 wait_dclick_left=FALSE; 00067 KillTimer(hwnd,TimerIdLeft); 00068 00069 if (GetKeyState(VK_CONTROL)<0) 00070 { 00071 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, CTRL_KEY+PRESSED_LEFT, 0, 0); 00072 } 00073 else 00074 if (GetKeyState(VK_SHIFT)<0) 00075 { 00076 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, SHIFT_KEY+PRESSED_LEFT, 0, 0); 00077 } 00078 else 00079 { 00080 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos,PRESSED_LEFT, 0, 0); 00081 } 00082 return ; 00083 } 00084 00085 if (wait_dclick_middle) 00086 { 00087 KillTimerLeft(hwnd); 00088 KillTimerRight(hwnd); 00089 00090 wait_dclick_middle=FALSE; 00091 KillTimer(hwnd,TimerIdMiddle); 00092 00093 if (GetKeyState(VK_CONTROL)<0) 00094 { 00095 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, CTRL_KEY+PRESSED_MIDDLE, 0, 0); 00096 } 00097 else 00098 if (GetKeyState(VK_SHIFT)<0) 00099 { 00100 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, SHIFT_KEY+PRESSED_MIDDLE, 0, 0); 00101 } 00102 else 00103 { 00104 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos,PRESSED_MIDDLE, 0, 0); 00105 } 00106 return ; 00107 } 00108 00109 if (wait_dclick_right) 00110 { 00111 KillTimerLeft(hwnd); 00112 KillTimerMiddle(hwnd); 00113 00114 wait_dclick_right=FALSE; 00115 KillTimer(hwnd,TimerIdRight); 00116 00117 if (GetKeyState(VK_CONTROL)<0) 00118 { 00119 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, CTRL_KEY+PRESSED_RIGHT, 0, 0); 00120 } 00121 else 00122 if (GetKeyState(VK_SHIFT)<0) 00123 { 00124 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, SHIFT_KEY+PRESSED_RIGHT, 0, 0); 00125 } 00126 else 00127 { 00128 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos,PRESSED_RIGHT, 0, 0); 00129 } 00130 return ; 00131 } 00132 } 00133 else 00134 { 00135 PushClickQueue (ScilabGC->CurWindow,(int) MOUSEX +horzsinPos,MOUSEY +vertsinPos, -1, 1, 0); 00136 MOUSEX= x; 00137 MOUSEY= y; 00138 } 00139 00140 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 399 of file MouseEvents.c.
References CTRL_KEY, BCG::CurWindow, DBL_CLCK_RIGHT, dclick_right, FALSE, KillTimerLeft(), KillTimerMiddle(), lose_up_right, MOUSEX, MOUSEY, PushClickQueue(), SHIFT_KEY, TimerIdRight, TRUE, and wait_dclick_right.
Referenced by GetEventKeyboardAndMouse().
00400 { 00401 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00402 int horzsinPos=ScilabGC->horzsi.nPos; 00403 int vertsinPos=ScilabGC->vertsi.nPos; 00404 00405 MOUSEX= x; 00406 MOUSEY= y; 00407 00408 KillTimerLeft(hwnd); 00409 KillTimerMiddle(hwnd); 00410 00411 wait_dclick_right=FALSE; 00412 dclick_right = TRUE; 00413 KillTimer(hwnd,TimerIdRight); 00414 lose_up_right=TRUE; 00415 00416 if (GetKeyState(VK_CONTROL)<0) 00417 { 00418 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CTRL_KEY+DBL_CLCK_RIGHT, 0, 0); 00419 } 00420 else 00421 if (GetKeyState(VK_SHIFT)<0) 00422 { 00423 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, SHIFT_KEY+DBL_CLCK_RIGHT, 0, 0); 00424 } 00425 else 00426 { 00427 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, DBL_CLCK_RIGHT, 0, 0); 00428 } 00429 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 335 of file MouseEvents.c.
References dclick_right, FALSE, KillTimerLeft(), KillTimerRight(), lose_up_right, MOUSEX, MOUSEY, reset_right_click_counter(), TimerIdRight, TRUE, and wait_dclick_right.
Referenced by GetEventKeyboardAndMouse().
00336 { 00337 MOUSEX= x; 00338 MOUSEY= y; 00339 00340 KillTimerLeft(hwnd); 00341 KillTimerRight(hwnd); 00342 00343 if (wait_dclick_right) 00344 { 00345 wait_dclick_right = FALSE; 00346 dclick_right = TRUE; 00347 lose_up_right = FALSE; 00348 KillTimer(hwnd,TimerIdRight); 00349 return; 00350 } 00351 00352 SetTimer(hwnd,TimerIdRight,GetDoubleClickTime(),reset_right_click_counter); 00353 wait_dclick_right = TRUE; 00354 lose_up_right = FALSE; 00355 dclick_right = FALSE; 00356 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 358 of file MouseEvents.c.
References CTRL_KEY, BCG::CurWindow, dclick_right, FALSE, KillTimerLeft(), KillTimerMiddle(), lose_up_right, MOUSEX, MOUSEY, PushClickQueue(), RELEASED_RIGHT, SHIFT_KEY, TRUE, and wait_dclick_right.
Referenced by GetEventKeyboardAndMouse().
00359 { 00360 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00361 int horzsinPos=ScilabGC->horzsi.nPos; 00362 int vertsinPos=ScilabGC->vertsi.nPos; 00363 00364 MOUSEX= x; 00365 MOUSEY= y; 00366 00367 KillTimerLeft(hwnd); 00368 KillTimerMiddle(hwnd); 00369 00370 if (wait_dclick_right) 00371 { 00372 lose_up_right=TRUE; 00373 return; 00374 } 00375 00376 if (!dclick_right) 00377 { 00378 if (GetKeyState(VK_CONTROL)<0) 00379 { 00380 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, RELEASED_RIGHT+CTRL_KEY, 0, -1); 00381 } 00382 else 00383 if (GetKeyState(VK_SHIFT)<0) 00384 { 00385 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, RELEASED_RIGHT+SHIFT_KEY, 0, -1); 00386 } 00387 else 00388 { 00389 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, RELEASED_RIGHT, 0, -1); 00390 } 00391 } 00392 else 00393 if (lose_up_right) 00394 { 00395 lose_up_right=FALSE; 00396 } 00397 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void CALLBACK reset_left_click_counter | ( | HWND | hwnd, | |
| UINT | msg, | |||
| UINT_PTR | id, | |||
| DWORD | data | |||
| ) | [static] |
Definition at line 431 of file MouseEvents.c.
References CLCK_LEFT, CTRL_KEY, BCG::CurWindow, DBL_CLCK_LEFT, dclick_left, FALSE, KillTimerMiddle(), KillTimerRight(), lose_up_left, MOUSEX, MOUSEY, PRESSED_LEFT, PushClickQueue(), SHIFT_KEY, TimerIdLeft, and wait_dclick_left.
Referenced by ON_EVENT_GRAPH_WM_LBUTTONDOWN().
00432 { 00433 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00434 int horzsinPos=ScilabGC->horzsi.nPos; 00435 int vertsinPos=ScilabGC->vertsi.nPos; 00436 00437 KillTimerMiddle(hwnd); 00438 KillTimerRight(hwnd); 00439 00440 wait_dclick_left=FALSE; 00441 KillTimer(hwnd,TimerIdLeft); 00442 00443 if (dclick_left) 00444 { 00445 if (GetKeyState(VK_CONTROL)<0) 00446 { 00447 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CTRL_KEY+DBL_CLCK_LEFT, 0, 0); 00448 } 00449 else 00450 if (GetKeyState(VK_SHIFT)<0) 00451 { 00452 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, SHIFT_KEY+DBL_CLCK_LEFT, 0, 0); 00453 } 00454 else 00455 { 00456 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, DBL_CLCK_LEFT, 0, 0); 00457 } 00458 } 00459 else 00460 { 00461 if (lose_up_left) 00462 { 00463 if (GetKeyState(VK_CONTROL)<0) 00464 { 00465 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CTRL_KEY+CLCK_LEFT, 0, 0); 00466 } 00467 else 00468 if (GetKeyState(VK_SHIFT)<0) 00469 { 00470 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, SHIFT_KEY+CLCK_LEFT, 0, 0); 00471 } 00472 else 00473 { 00474 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos,CLCK_LEFT, 0, 0); 00475 } 00476 lose_up_left=FALSE; 00477 } 00478 else 00479 { 00480 if (GetKeyState(VK_CONTROL)<0) 00481 { 00482 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, CTRL_KEY+PRESSED_LEFT, 0, 0); 00483 } 00484 else 00485 if (GetKeyState(VK_SHIFT)<0) 00486 { 00487 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, SHIFT_KEY+PRESSED_LEFT, 0, 0); 00488 } 00489 else 00490 { 00491 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos,PRESSED_LEFT, 0, 0); 00492 } 00493 } 00494 } 00495 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void CALLBACK reset_middle_click_counter | ( | HWND | hwnd, | |
| UINT | msg, | |||
| UINT_PTR | id, | |||
| DWORD | data | |||
| ) | [static] |
Definition at line 497 of file MouseEvents.c.
References CLCK_MIDDLE, CTRL_KEY, BCG::CurWindow, DBL_CLCK_MIDDLE, dclick_middle, FALSE, KillTimerLeft(), KillTimerRight(), lose_up_middle, MOUSEX, MOUSEY, PRESSED_MIDDLE, PushClickQueue(), SHIFT_KEY, TimerIdMiddle, and wait_dclick_left.
Referenced by ON_EVENT_GRAPH_WM_MBUTTONDOWN().
00498 { 00499 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00500 int horzsinPos=ScilabGC->horzsi.nPos; 00501 int vertsinPos=ScilabGC->vertsi.nPos; 00502 00503 KillTimerLeft(hwnd); 00504 KillTimerRight(hwnd); 00505 00506 wait_dclick_left=FALSE; 00507 KillTimer(hwnd,TimerIdMiddle); 00508 00509 if (dclick_middle) 00510 { 00511 if (GetKeyState(VK_CONTROL)<0) 00512 { 00513 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CTRL_KEY+DBL_CLCK_MIDDLE, 0, 0); 00514 } 00515 else 00516 if (GetKeyState(VK_SHIFT)<0) 00517 { 00518 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, SHIFT_KEY+DBL_CLCK_MIDDLE, 0, 0); 00519 } 00520 else 00521 { 00522 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, DBL_CLCK_MIDDLE, 0, 0); 00523 } 00524 } 00525 else 00526 { 00527 if (lose_up_middle) 00528 { 00529 if (GetKeyState(VK_CONTROL)<0) 00530 { 00531 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CTRL_KEY+CLCK_MIDDLE, 0, 0); 00532 } 00533 else 00534 if (GetKeyState(VK_SHIFT)<0) 00535 { 00536 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, SHIFT_KEY+CLCK_MIDDLE, 0, 0); 00537 } 00538 else 00539 { 00540 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CLCK_MIDDLE, 0, 0); 00541 } 00542 lose_up_middle=FALSE; 00543 } 00544 else 00545 { 00546 if (GetKeyState(VK_CONTROL)<0) 00547 { 00548 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, CTRL_KEY+PRESSED_MIDDLE, 0, 0); 00549 } 00550 else 00551 if (GetKeyState(VK_SHIFT)<0) 00552 { 00553 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, SHIFT_KEY+PRESSED_MIDDLE, 0, 0); 00554 } 00555 else 00556 { 00557 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos,PRESSED_MIDDLE, 0, 0); 00558 } 00559 } 00560 } 00561 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void CALLBACK reset_right_click_counter | ( | HWND | hwnd, | |
| UINT | msg, | |||
| UINT_PTR | id, | |||
| DWORD | data | |||
| ) | [static] |
Definition at line 563 of file MouseEvents.c.
References CLCK_RIGHT, CTRL_KEY, BCG::CurWindow, DBL_CLCK_RIGHT, dclick_right, FALSE, KillTimerLeft(), KillTimerMiddle(), lose_up_right, MOUSEX, MOUSEY, PRESSED_RIGHT, PushClickQueue(), SHIFT_KEY, TimerIdRight, and wait_dclick_right.
Referenced by ON_EVENT_GRAPH_WM_RBUTTONDOWN().
00564 { 00565 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00566 int horzsinPos=ScilabGC->horzsi.nPos; 00567 int vertsinPos=ScilabGC->vertsi.nPos; 00568 00569 KillTimerLeft(hwnd); 00570 KillTimerMiddle(hwnd); 00571 00572 wait_dclick_right=FALSE; 00573 KillTimer(hwnd,TimerIdRight); 00574 00575 if (dclick_right) 00576 { 00577 if (GetKeyState(VK_CONTROL)<0) 00578 { 00579 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CTRL_KEY+DBL_CLCK_RIGHT, 0, 0); 00580 } 00581 else 00582 if (GetKeyState(VK_SHIFT)<0) 00583 { 00584 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, SHIFT_KEY+DBL_CLCK_RIGHT, 0, 0); 00585 } 00586 else 00587 { 00588 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, DBL_CLCK_RIGHT, 0, 0); 00589 } 00590 } 00591 else 00592 { 00593 if (lose_up_right) 00594 { 00595 if (GetKeyState(VK_CONTROL)<0) 00596 { 00597 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CTRL_KEY+CLCK_RIGHT, 0, 0); 00598 } 00599 else 00600 if (GetKeyState(VK_SHIFT)<0) 00601 { 00602 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, SHIFT_KEY+CLCK_RIGHT, 0, 0); 00603 } 00604 else 00605 { 00606 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY + vertsinPos, CLCK_RIGHT, 0, 0); 00607 } 00608 lose_up_right=FALSE; 00609 } 00610 else 00611 { 00612 if (GetKeyState(VK_CONTROL)<0) 00613 { 00614 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, CTRL_KEY+PRESSED_RIGHT, 0, 0); 00615 } 00616 else 00617 if (GetKeyState(VK_SHIFT)<0) 00618 { 00619 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos, SHIFT_KEY+PRESSED_RIGHT, 0, 0); 00620 } 00621 else 00622 { 00623 PushClickQueue (ScilabGC->CurWindow, MOUSEX+horzsinPos,MOUSEY+vertsinPos,PRESSED_RIGHT, 0, 0); 00624 } 00625 } 00626 } 00627 }
Here is the call graph for this function:

Here is the caller graph for this function:

BOOL dclick_left = FALSE [static] |
Definition at line 33 of file MouseEvents.c.
Referenced by KillTimerLeft(), ON_EVENT_GRAPH_WM_LBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_LBUTTONDOWN(), ON_EVENT_GRAPH_WM_LBUTTONUP(), and reset_left_click_counter().
BOOL dclick_middle = FALSE [static] |
Definition at line 37 of file MouseEvents.c.
Referenced by KillTimerMiddle(), ON_EVENT_GRAPH_WM_MBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_MBUTTONDOWN(), ON_EVENT_GRAPH_WM_MBUTTONUP(), and reset_middle_click_counter().
BOOL dclick_right = FALSE [static] |
Definition at line 41 of file MouseEvents.c.
Referenced by KillTimerRight(), ON_EVENT_GRAPH_WM_RBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_RBUTTONDOWN(), ON_EVENT_GRAPH_WM_RBUTTONUP(), and reset_right_click_counter().
BOOL lose_up_left = FALSE [static] |
Definition at line 34 of file MouseEvents.c.
Referenced by KillTimerLeft(), ON_EVENT_GRAPH_WM_LBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_LBUTTONDOWN(), ON_EVENT_GRAPH_WM_LBUTTONUP(), and reset_left_click_counter().
BOOL lose_up_middle = FALSE [static] |
Definition at line 38 of file MouseEvents.c.
Referenced by KillTimerMiddle(), ON_EVENT_GRAPH_WM_MBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_MBUTTONDOWN(), ON_EVENT_GRAPH_WM_MBUTTONUP(), and reset_middle_click_counter().
BOOL lose_up_right = FALSE [static] |
Definition at line 42 of file MouseEvents.c.
Referenced by KillTimerRight(), ON_EVENT_GRAPH_WM_RBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_RBUTTONDOWN(), ON_EVENT_GRAPH_WM_RBUTTONUP(), and reset_right_click_counter().
Definition at line 25 of file MouseEvents.c.
Referenced by ON_EVENT_GRAPH_WM_LBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_LBUTTONDOWN(), ON_EVENT_GRAPH_WM_LBUTTONUP(), ON_EVENT_GRAPH_WM_MBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_MBUTTONDOWN(), ON_EVENT_GRAPH_WM_MBUTTONUP(), ON_EVENT_GRAPH_WM_MOUSEMOVE(), ON_EVENT_GRAPH_WM_RBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_RBUTTONDOWN(), ON_EVENT_GRAPH_WM_RBUTTONUP(), reset_left_click_counter(), reset_middle_click_counter(), and reset_right_click_counter().
Definition at line 26 of file MouseEvents.c.
Referenced by ON_EVENT_GRAPH_WM_LBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_LBUTTONDOWN(), ON_EVENT_GRAPH_WM_LBUTTONUP(), ON_EVENT_GRAPH_WM_MBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_MBUTTONDOWN(), ON_EVENT_GRAPH_WM_MBUTTONUP(), ON_EVENT_GRAPH_WM_MOUSEMOVE(), ON_EVENT_GRAPH_WM_RBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_RBUTTONDOWN(), ON_EVENT_GRAPH_WM_RBUTTONUP(), reset_left_click_counter(), reset_middle_click_counter(), and reset_right_click_counter().
BOOL wait_dclick_left = FALSE [static] |
Definition at line 32 of file MouseEvents.c.
Referenced by KillTimerLeft(), ON_EVENT_GRAPH_WM_LBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_LBUTTONDOWN(), ON_EVENT_GRAPH_WM_LBUTTONUP(), ON_EVENT_GRAPH_WM_MOUSEMOVE(), reset_left_click_counter(), and reset_middle_click_counter().
BOOL wait_dclick_middle = FALSE [static] |
Definition at line 36 of file MouseEvents.c.
Referenced by KillTimerMiddle(), ON_EVENT_GRAPH_WM_MBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_MBUTTONDOWN(), ON_EVENT_GRAPH_WM_MBUTTONUP(), and ON_EVENT_GRAPH_WM_MOUSEMOVE().
BOOL wait_dclick_right = FALSE [static] |
Definition at line 40 of file MouseEvents.c.
Referenced by KillTimerRight(), ON_EVENT_GRAPH_WM_MOUSEMOVE(), ON_EVENT_GRAPH_WM_RBUTTONDBLCLK(), ON_EVENT_GRAPH_WM_RBUTTONDOWN(), ON_EVENT_GRAPH_WM_RBUTTONUP(), and reset_right_click_counter().
1.5.1