#include <Win32Mouse.h>
Inherits Mouse.
Inherited by W3DMouse.
Classes | |
| struct | Win32MouseEvent |
Public Member Functions | |
| Win32Mouse (void) | |
| virtual | ~Win32Mouse (void) |
| virtual void | init (void) |
| init mouse, extend this functionality, do not replace | |
| virtual void | reset (void) |
| reset the system | |
| virtual void | update (void) |
| update | |
| virtual void | initCursorResources (void) |
| load windows resources needed for 2d cursors. | |
| virtual void | setCursor (MouseCursor cursor) |
| set mouse cursor | |
| virtual void | capture (void) |
| capture the mouse | |
| virtual void | releaseCapture (void) |
| release mouse capture | |
| virtual void | setVisibility (Bool visible) |
| void | addWin32Event (UINT msg, WPARAM wParam, LPARAM lParam, DWORD time) |
| add an event from a win32 window procedure | |
| void | lostFocus (Bool state) |
Public Member Functions inherited from Mouse | |
| Mouse (void) | |
| virtual | ~Mouse (void) |
| virtual void | parseIni (void) |
| parse ini settings associated with mouse (do this before init()). | |
| virtual void | createStreamMessages (void) |
| virtual void | draw (void) |
| draw the mouse | |
| virtual void | setPosition (Int x, Int y) |
| set the mouse position | |
| const MouseIO * | getMouseStatus (void) |
| get current mouse status | |
| Int | getCursorTooltipDelay () |
| void | setCursorTooltipDelay (Int delay) |
| void | setCursorTooltip (UnicodeString tooltip, Int tooltipDelay=-1, const RGBColor *color=NULL, Real width=1.0f) |
| set tooltip string at cursor | |
| void | setMouseText (UnicodeString text, const RGBAColorInt *color, const RGBAColorInt *dropColor) |
| set the cursor text, NOT the tooltip text | |
| virtual void | setMouseLimits (void) |
| update the limit extents the mouse can move in | |
| MouseCursor | getMouseCursor (void) |
| get the current mouse cursor image type | |
| virtual void | setRedrawMode (RedrawMode mode) |
| set cursor drawing method. | |
| virtual RedrawMode | getRedrawMode (void) |
| Bool | getVisibility (void) |
| void | drawTooltip (void) |
| draw the tooltip text | |
| void | drawCursorText (void) |
| draw the mouse cursor text | |
| Int | getCursorIndex (const AsciiString &name) |
| void | resetTooltipDelay (void) |
| void | mouseNotifyResolutionChange (void) |
| Bool | isClick (const ICoord2D *anchor, const ICoord2D *dest, UnsignedInt previousMouseClick, UnsignedInt currentMouseClick) |
| virtual | ~Mouse (void) |
| virtual void | Set_Cursor (int xhotspot, int yhotspot, ShapeSet const *cursor, int shape)=0 |
| virtual void | Hide_Mouse (void)=0 |
| virtual void | Show_Mouse (void)=0 |
| virtual void | Release_Mouse (void)=0 |
| virtual void | Capture_Mouse (void)=0 |
| virtual bool | Is_Captured (void) const =0 |
| virtual void | Conditional_Hide_Mouse (Rect region)=0 |
| virtual void | Conditional_Show_Mouse (void)=0 |
| virtual int | Get_Mouse_State (void) const =0 |
| virtual int | Get_Mouse_X (void) const =0 |
| virtual int | Get_Mouse_Y (void) const =0 |
| virtual void | Set_Mouse_XY (int xpos, int ypos)=0 |
| virtual void | Draw_Mouse (Surface *scr, bool issidebarsurface=false)=0 |
| virtual void | Erase_Mouse (Surface *scr, bool issidebarsurface=false)=0 |
| virtual void | Convert_Coordinate (int &x, int &y) const =0 |
Public Member Functions inherited from SubsystemInterface | |
| SubsystemInterface () | |
| virtual | ~SubsystemInterface () |
| virtual void | postProcessLoad () |
| void | UPDATE (void) |
| void | DRAW (void) |
| AsciiString | getName (void) |
| void | setName (AsciiString name) |
Protected Member Functions | |
| virtual UnsignedByte | getMouseEvent (MouseIO *result, Bool flush) |
| get the next event available in the buffer | |
| void | translateEvent (UnsignedInt eventIndex, MouseIO *result) |
| translate a win32 mouse event to our own info | |
Protected Member Functions inherited from Mouse | |
| void | updateMouseData () |
| update the mouse with the current device data | |
| void | processMouseEvent (Int eventToProcess) |
| combine mouse events into final data | |
| void | checkForDrag (void) |
| check for mouse drag | |
| void | moveMouse (Int x, Int y, Int relOrAbs) |
| move mouse by delta or absolute | |
Protected Attributes | |
| Win32MouseEvent | m_eventBuffer [Mouse::NUM_MOUSE_EVENTS] |
| this is our buffer of events that we receive via a WndProc message | |
| UnsignedInt | m_nextFreeIndex |
| insert new events at this index | |
| UnsignedInt | m_nextGetIndex |
| MouseCursor | m_currentWin32Cursor |
| keep track of last cursor image sent to D3D. | |
| Int | m_directionFrame |
| current frame of directional cursor (frome 0 points up). | |
| Bool | m_lostFocus |
| flag if window has lost focues and mouse should stop being updated. | |
Protected Attributes inherited from Mouse | |
| UnsignedByte | m_numButtons |
| number of buttons on this mouse | |
| UnsignedByte | m_numAxes |
| number of axes this mouse has | |
| Bool | m_forceFeedback |
| set to TRUE if mouse supprots force feedback | |
| UnicodeString | m_tooltipString |
| tooltip text | |
| DisplayString * | m_tooltipDisplayString |
| tooltipDisplayString | |
| Bool | m_displayTooltip |
| Bool | m_isTooltipEmpty |
| MouseIO | m_mouseEvents [NUM_MOUSE_EVENTS] |
| for event list | |
| MouseIO | m_currMouse |
| for current mouse data | |
| MouseIO | m_prevMouse |
| for previous mouse data | |
| Int | m_minX |
| mouse is locked to this region | |
| Int | m_maxX |
| mouse is locked to this region | |
| Int | m_minY |
| mouse is locked to this region | |
| Int | m_maxY |
| mouse is locked to this region | |
| UnsignedInt | m_inputFrame |
| frame input was gathered on | |
| UnsignedInt | m_deadInputFrame |
| Frame which last input occured. | |
| Bool | m_inputMovesAbsolute |
| Bool | m_visible |
| MouseCursor | m_currentCursor |
| current mouse cursor | |
| DisplayString * | m_cursorTextDisplayString |
| text to display on the cursor (if specified) | |
| RGBAColorInt | m_cursorTextColor |
| color of the cursor text | |
| RGBAColorInt | m_cursorTextDropColor |
| color of the cursor text drop shadow | |
| Int | m_tooltipDelay |
| millisecond delay for tooltips | |
| Int | m_highlightPos |
| UnsignedInt | m_highlightUpdateStart |
| UnsignedInt | m_stillTime |
| RGBAColorInt | m_tooltipTextColor |
| RGBAColorInt | m_tooltipBackColor |
| Int | m_eventsThisFrame |
Protected Attributes inherited from SubsystemInterface | |
| AsciiString | m_name |
Mouse interface for when using only the Win32 messages
Definition at line 63 of file Win32Mouse.h.
| Win32Mouse::Win32Mouse | ( | void | ) |
Definition at line 270 of file Win32Mouse.cpp.
|
virtual |
Definition at line 288 of file Win32Mouse.cpp.
add an event from a win32 window procedure
Add a window message event along with its WPARAM and LPARAM parameters to our input storage buffer
Definition at line 340 of file Win32Mouse.cpp.
|
virtual |
capture the mouse
Capture the mouse to our application
Implements Mouse.
Definition at line 424 of file Win32Mouse.cpp.
|
protectedvirtual |
get the next event available in the buffer
Get a mouse event from the buffer if available, we need to translate from the windows message meanings to our own internal mouse structure
Implements Mouse.
Definition at line 57 of file Win32Mouse.cpp.
|
virtual |
init mouse, extend this functionality, do not replace
Initialize our device
Reimplemented from Mouse.
Reimplemented in W3DMouse.
Definition at line 299 of file Win32Mouse.cpp.
|
virtual |
load windows resources needed for 2d cursors.
Preload all the cursors we may need during the game. This must be done before the D3D device is created to avoid cursor corruption on buggy ATI Radeon cards.
Implements Mouse.
Definition at line 376 of file Win32Mouse.cpp.
|
inline |
Definition at line 84 of file Win32Mouse.h.
|
virtual |
release mouse capture
Release the mouse capture for our app window
Implements Mouse.
Definition at line 434 of file Win32Mouse.cpp.
|
virtual |
reset the system
Reset
Reimplemented from Mouse.
Reimplemented in W3DMouse.
Definition at line 317 of file Win32Mouse.cpp.
|
virtual |
set mouse cursor
Super basic simplistic cursor
Implements Mouse.
Reimplemented in W3DMouse.
Definition at line 401 of file Win32Mouse.cpp.
|
virtual |
Reimplemented from Mouse.
Definition at line 366 of file Win32Mouse.cpp.
|
protected |
translate a win32 mouse event to our own info
Translate a win32 mouse event to our own event info
Definition at line 86 of file Win32Mouse.cpp.
|
virtual |
update
Update, called once per frame
Reimplemented from Mouse.
Definition at line 328 of file Win32Mouse.cpp.
|
protected |
keep track of last cursor image sent to D3D.
events retrieved through getMouseEvent will come from this index, then it will be incremented to the next index
Definition at line 107 of file Win32Mouse.h.
|
protected |
current frame of directional cursor (frome 0 points up).
Definition at line 108 of file Win32Mouse.h.
|
protected |
this is our buffer of events that we receive via a WndProc message
Definition at line 102 of file Win32Mouse.h.
|
protected |
flag if window has lost focues and mouse should stop being updated.
Definition at line 109 of file Win32Mouse.h.
|
protected |
insert new events at this index
Definition at line 103 of file Win32Mouse.h.
|
protected |
Definition at line 104 of file Win32Mouse.h.