MouseEvents.h File Reference

#include <windows.h>
#include "wcommon.h"

Include dependency graph for MouseEvents.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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_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)
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_MOUSEMOVE (HWND hwnd, int x, int y, UINT keyFlags)


Function Documentation

void ON_EVENT_GRAPH_WM_LBUTTONDBLCLK ( HWND  hwnd,
BOOL  fDoubleClick,
int  x,
int  y,
UINT  keyFlags 
)

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:

void ON_EVENT_GRAPH_WM_LBUTTONDOWN ( HWND  hwnd,
BOOL  fDoubleClick,
int  x,
int  y,
UINT  keyFlags 
)

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:

void ON_EVENT_GRAPH_WM_LBUTTONUP ( HWND  hwnd,
int  x,
int  y,
UINT  keyFlags 
)

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:

void ON_EVENT_GRAPH_WM_MBUTTONDBLCLK ( HWND  hwnd,
BOOL  fDoubleClick,
int  x,
int  y,
UINT  keyFlags 
)

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:

void ON_EVENT_GRAPH_WM_MBUTTONDOWN ( HWND  hwnd,
BOOL  fDoubleClick,
int  x,
int  y,
UINT  keyFlags 
)

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:

void ON_EVENT_GRAPH_WM_MBUTTONUP ( HWND  hwnd,
int  x,
int  y,
UINT  keyFlags 
)

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:

void ON_EVENT_GRAPH_WM_MOUSEMOVE ( HWND  hwnd,
int  x,
int  y,
UINT  keyFlags 
)

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:

void ON_EVENT_GRAPH_WM_RBUTTONDBLCLK ( HWND  hwnd,
BOOL  fDoubleClick,
int  x,
int  y,
UINT  keyFlags 
)

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:

void ON_EVENT_GRAPH_WM_RBUTTONDOWN ( HWND  hwnd,
BOOL  fDoubleClick,
int  x,
int  y,
UINT  keyFlags 
)

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:

void ON_EVENT_GRAPH_WM_RBUTTONUP ( HWND  hwnd,
int  x,
int  y,
UINT  keyFlags 
)

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:


Generated on Sun Mar 4 15:57:56 2007 for Scilab [trunk] by  doxygen 1.5.1