- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::GUI::Events::CMouseEvent Class Reference

Inheritance diagram for Exponent::GUI::Events::CMouseEvent:

List of all members.

## Detailed Description

Allows for responding to mouse actions.

Date:
  21/08/2004

Author:
  Paul Chana

Version:
  1.0.0 Initial version

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  CMouseEvent.hpp,v 1.4 2007/02/08 21:07:54 paul Exp

Definition at line 45 of file CMouseEvent.hpp.

## Public Types

- enum EMouseEventType {
  e_leftMouseDown = WM_LBUTTONDOWN,
  e_rightMouseDown = WM_RBUTTONDOWN,
  e_leftMouseUp = WM_LBUTTONUP,
  e_rightMouseUp = WM_RBUTTONUP,
  e_leftMouseDoubleClick = WM_LBUTTONDBLCLK,
  e_button3MouseClick = 0,
  e_mouseWheelMove = 0x020A,
  e_mouseMove = WM_MOUSEMOVE,
  e_mouseLeftArea = WM_MOUSELEAVE
  }
    Enumerated mouse movements. More...

## Public Member Functions

- CMouseEvent (CMouse *mouse, const UINT type, double wheelMovementAmount=0.0)
- CMouseEvent (CMouse *mouse, const EMouseEventType type, double wheelMovementAmount=0.0)
- EMouseEventType getEventType () const
- WPARAM getModifiers () const
- const CMouse * getMouse () const
- const CPoint & getMousePosition () const
- CMouse * getMutableMouse () const
- double getWheelMovementAmount () const
- bool isAltDown () const
- bool isCtrlDown () const
- bool isShiftDown () const
- void setEventType (EMouseEventType type)
- void setModifiers (WPARAM wParam)
- void setModifiers (const bool ctrl, const bool shift, const bool alt)
- void setMousePosition (const CPoint &point)
- void setWheelMovementAmount (const double wheelMovementAmount)
- virtual ~CMouseEvent ()

## Protected Attributes

- bool m_altIsDown
- bool m_ctrlIsDown
- CMouse * m_mouse
- WPARAM m_rawModifiers
- bool m_shiftIsDown
- EMouseEventType m_type
- double m_wheelMovementAmount

## Member Enumeration Documentation

enum Exponent::GUI::Events::CMouseEvent::EMouseEventType

Enumerated mouse movements.

Enumerator:

  e_leftMouseDown | Left button down
  e_rightMouseDown | Right button down
  e_leftMouseUp | Left button up
  e_rightMouseUp | Right button up
  e_leftMouseDoubleClick | Double click
  e_button3MouseClick | Wheel click
  e_mouseWheelMove | Wheel
  e_mouseMove | Movement
  e_mouseLeftArea | Mosue left user area

Definition at line 61 of file CMouseEvent.hpp.

## Constructor & Destructor Documentation

Exponent::GUI::Events::CMouseEvent::CMouseEvent | ( | CMouse * | mouse,
|  | const EMouseEventType | type,
|  | double | wheelMovementAmount = `0.0` |
| ) |  |  |

Construction

Parameters:

  | mouse | The mouse
  | type | The type of event
  | wheelMovementAmount | The amount of wheel movement -1 -> +1

Exponent::GUI::Events::CMouseEvent::CMouseEvent | ( | CMouse * | mouse,
|  | const UINT | type,
|  | double | wheelMovementAmount = `0.0` |
| ) |  |  |

Construction

Parameters:

  | mouse | The mouse
  | type | The type of event
  | wheelMovementAmount | The amount of wheel movement -1 -> +1

virtual Exponent::GUI::Events::CMouseEvent::~CMouseEvent | ( |  | ) | `[virtual]`

Destruction

## Member Function Documentation

EMouseEventType Exponent::GUI::Events::CMouseEvent::getEventType | ( |  | ) | const

Get the event type

Return values:

  | EMouseEventType | The type of event

WPARAM Exponent::GUI::Events::CMouseEvent::getModifiers | ( |  | ) | const

Get hte modifiers

Return values:

  | WPARAM | The mouse modifiers

const CMouse* Exponent::GUI::Events::CMouseEvent::getMouse | ( |  | ) | const

Get the mouse

Return values:

  | const | CMouse* The mouse

const CPoint& Exponent::GUI::Events::CMouseEvent::getMousePosition | ( |  | ) | const

Get the mouse position

Return values:

  | const | CPoint The position of the mouse

CMouse* Exponent::GUI::Events::CMouseEvent::getMutableMouse | ( |  | ) | const

Get the mouse

Return values:

  | CMouse* | The mouse

double Exponent::GUI::Events::CMouseEvent::getWheelMovementAmount | ( |  | ) | const

Get the wheel movement amount

Return values:

  | double | The mouse wheel movement amount -1 -> +1

bool Exponent::GUI::Events::CMouseEvent::isAltDown | ( |  | ) | const

Is the alt key down

Return values:

  | bool | True if alt is down, false otherwise

bool Exponent::GUI::Events::CMouseEvent::isCtrlDown | ( |  | ) | const

Is ctrl down

Return values:

  | bool | True if ctrl is down, false otherwise

bool Exponent::GUI::Events::CMouseEvent::isShiftDown | ( |  | ) | const

Is shift down

Return values:

  | bool | True if shift is down, false otherwise

void Exponent::GUI::Events::CMouseEvent::setEventType | ( | EMouseEventType | type | ) |

Set the event type

Parameters:

  | type | The mouse event type

void Exponent::GUI::Events::CMouseEvent::setModifiers | ( | WPARAM | wParam | ) |

Set the modifiers

Parameters:

  | wParam | The windows mouse raw parameters

void Exponent::GUI::Events::CMouseEvent::setModifiers | ( | const bool | ctrl,
|  | const bool | shift,
|  | const bool | alt |
| ) |  |  |

Set the modifiers

Parameters:

  | shift | True if shift is down, false otherwise
  | alt | True if alt is down, false otherwise
  | ctrl | True if ctrl is down, false otherwise

void Exponent::GUI::Events::CMouseEvent::setMousePosition | ( | const CPoint & | point | ) |

Set the mouse postiion

Parameters:

  | point | The mouse position

void Exponent::GUI::Events::CMouseEvent::setWheelMovementAmount | ( | const double | wheelMovementAmount | ) |

Set the wheel movement amount

Parameters:

  | wheelMovementAmount | The amount of movement -1 -> +1

## Member Data Documentation

bool Exponent::GUI::Events::CMouseEvent::m_altIsDown`[protected]`

Is alt key down

Definition at line 223 of file CMouseEvent.hpp.

bool Exponent::GUI::Events::CMouseEvent::m_ctrlIsDown`[protected]`

Is ctrl key down

Definition at line 221 of file CMouseEvent.hpp.

CMouse* Exponent::GUI::Events::CMouseEvent::m_mouse`[protected]`

The mouse that generated this

Definition at line 218 of file CMouseEvent.hpp.

WPARAM Exponent::GUI::Events::CMouseEvent::m_rawModifiers`[protected]`

Raw modifiers for internal use

Definition at line 226 of file CMouseEvent.hpp.

bool Exponent::GUI::Events::CMouseEvent::m_shiftIsDown`[protected]`

Is shift key down

Definition at line 222 of file CMouseEvent.hpp.

EMouseEventType Exponent::GUI::Events::CMouseEvent::m_type`[protected]`

The type of event

Definition at line 217 of file CMouseEvent.hpp.

double Exponent::GUI::Events::CMouseEvent::m_wheelMovementAmount`[protected]`

The mouse wheel movement amount

Definition at line 219 of file CMouseEvent.hpp.