My Project
|
base class for GUI mouse More...
#include <GUIMouseVirtual.h>
Public Types | |
enum | MOUSE_KEY_STD { LEFT_BUTTON = 0, RIGHT_BUTTON = 1, MIDDLE_BUTTON = 2 } |
this is just traditional mouse key mapping. More... | |
Public Member Functions | |
virtual HRESULT | ReadBufferedData () |
virtual HRESULT | ReadImmediateData () |
virtual void | Update () |
virtual void | ResetLastMouseState () |
reset mouse to make the mouse delta correct in the next frame. More... | |
virtual void | Reset () |
virtual bool | IsButtonDown (MOUSE_KEY_STD nMouseButton) |
virtual int | GetMouseWheelDeltaSteps () |
the current mouse wheel delta in steps, such as -2,-1,0,1,2 | |
virtual int | GetMouseXDeltaSteps () |
the current mouse X delta in steps, such as -2,-1,0,1,2 | |
virtual int | GetMouseYDeltaSteps () |
the current mouse Y delta in steps, such as -2,-1,0,1,2 | |
virtual bool | IsLocked () |
virtual void | SetLock (bool bLock) |
true to lock the mouse at its current location | |
virtual void | UpdateX (int delta) |
virtual void | UpdateY (int delta) |
virtual void | PushMouseEvent (UINT uMsg, WPARAM wParam, LPARAM lParam) |
push a standard windows mouse event to the buffer for processing in the next frame move. More... | |
virtual void | PushMouseEvent (const MSG &msg) |
push a standard windows mouse event to the buffer for processing in the next frame move. More... | |
virtual void | SetCapture (CGUIBase *obj) |
virtual void | ReleaseCapture (CGUIBase *obj) |
virtual CGUIBase * | GetCapture () |
virtual void | ReleaseCapture () |
virtual bool | IsUseWindowsMessage () |
whether to use window message for buffered mouse event. More... | |
virtual void | SetUseWindowsMessage (bool bUseWinMsg) |
whether to use window message for buffered mouse event. More... | |
virtual void | ShowCursor (bool bShowCursor) |
true to show the cursor. More... | |
virtual void | ForceShowCursor (bool bShow) |
Force the device to show its cursor. More... | |
virtual int | GetCursorSize () |
get the cursor size in pixels | |
virtual bool | IsMouseButtonSwapped () |
swap left/right button. More... | |
virtual void | SetMouseButtonSwapped (bool bSwapped) |
virtual void | GetDeviceCursorPos (int &x, int &y) |
get current cursor position. More... | |
virtual void | SetDeviceCursorPos (int x, int y) |
virtual void | SetMousePosition (int x, int y) |
only change m_x, m_y, which is pretty fast. More... | |
virtual int | GetBufferedMessageCount () |
check if there is any unprocessed buffered window mouse message. More... | |
Public Attributes | |
DIDEVICEOBJECTDATA | m_didod [SAMPLE_BUFFER_SIZE] |
DWORD | m_dwElements |
DIMOUSESTATE2 | m_dims2 |
DIMOUSESTATE2 | m_lastMouseState |
DIMOUSESTATE2 | m_curMouseState |
int | m_x |
int | m_y |
MSG | m_buffered_mouse_msgs [SAMPLE_BUFFER_SIZE/2] |
int | m_buffered_mouse_msgs_count |
bool | m_isTouchInputting |
CGUIBase * | m_objCaptured |
Protected Attributes | |
bool | m_bLock |
bool | m_bUseWindowMessage |
whether to use window message for buffered mouse event. More... | |
bool | m_bSwapMouseButton |
swap left/right button. More... | |
bool | m_bLastMouseReset |
base class for GUI mouse
this is just traditional mouse key mapping.
|
inlinevirtual |
Force the device to show its cursor.
this is different from ShowCursor in that it always calls the device API to set the cursor.
|
virtual |
check if there is any unprocessed buffered window mouse message.
we call this function before Update() to check if there is any mouse event
|
virtual |
get current cursor position.
|
virtual |
swap left/right button.
|
virtual |
whether to use window message for buffered mouse event.
default to true, if false, directInput will be used.
|
virtual |
push a standard windows mouse event to the buffer for processing in the next frame move.
|
virtual |
push a standard windows mouse event to the buffer for processing in the next frame move.
|
virtual |
we do not use Read Buffered Data, instead, mouse events are translated from windows messages. Only immediate button data are read from direct input.
|
virtual |
reset mouse to make the mouse delta correct in the next frame.
|
virtual |
only change m_x, m_y, which is pretty fast.
|
virtual |
whether to use window message for buffered mouse event.
default to true, if false, directInput will be used.
|
inlinevirtual |
true to show the cursor.
only show if previous call is hide and vice versa.
|
protected |
swap left/right button.
|
protected |
whether to use window message for buffered mouse event.
default to true, if false, directInput will be used.