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

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

# Exponent::GUI::Windowing::CMouse Class Reference

List of all members.

## Detailed Description

A mouse representation.

Date:
  19/09/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
  CMouse.hpp,v 1.4 2007/02/08 21:07:54 paul Exp

Definition at line 39 of file CMouse.hpp.

## Public Member Functions

- void capture (SWindowHandle *windowHandle) const
- CMouse ()
- CMouse (LPARAM lParam, CCursor *cursor=&CCursor::CCURSOR_ARROW)
- CMouse (const CPoint &point, CCursor *cursor=&CCursor::CCURSOR_ARROW)
- CCursor * getCursor () const
- const CPoint & getPosition () const
- long getXPosition () const
- long getYPosition () const
- bool isCaptured () const
- bool isCaptured (SWindowHandle *windowHandle) const
- void release () const
- void setCursor (CCursor *cursor=&CCursor::CCURSOR_ARROW)
- void setPosition (LPARAM lParam)
- void setPosition (const CPoint &point)
- virtual ~CMouse ()

## Protected Attributes

- CCursor * m_cursor
- CPoint m_position

## Constructor & Destructor Documentation

Exponent::GUI::Windowing::CMouse::CMouse | ( | const CPoint & | point,
|  | CCursor * | cursor = `&CCursor::CCURSOR_ARROW` |
| ) |  |  |

Construction

Parameters:

  | point | The mouse position
  | cursor | The cursor to use

Exponent::GUI::Windowing::CMouse::CMouse | ( | LPARAM | lParam,
|  | CCursor * | cursor = `&CCursor::CCURSOR_ARROW` |
| ) |  |  |

Construction

Parameters:

  | lParam | The mouse position as a window LPARAM
  | cursor | The cursor to use

Exponent::GUI::Windowing::CMouse::CMouse | ( |  | ) |

Construction

virtual Exponent::GUI::Windowing::CMouse::~CMouse | ( |  | ) | `[virtual]`

Destruction

## Member Function Documentation

void Exponent::GUI::Windowing::CMouse::capture | ( | SWindowHandle * | windowHandle | ) | const

Capture the mouse

Parameters:

  | windowHandle | The window to capture

CCursor* Exponent::GUI::Windowing::CMouse::getCursor | ( |  | ) | const`[inline]`

Get the cursor

Return values:

  | CCursor* | The cursor that is being used

Definition at line 87 of file CMouse.hpp.

References m_cursor.

const CPoint& Exponent::GUI::Windowing::CMouse::getPosition | ( |  | ) | const`[inline]`

Get the position

Return values:

  | const | CPoint& The position of the mouse

Definition at line 113 of file CMouse.hpp.

References m_position.

long Exponent::GUI::Windowing::CMouse::getXPosition | ( |  | ) | const`[inline]`

Get the xposition

Return values:

  | long | The X Position of the mouse

Definition at line 119 of file CMouse.hpp.

References Exponent::MathTools::CPoint::getXPosition(), and m_position.

long Exponent::GUI::Windowing::CMouse::getYPosition | ( |  | ) | const`[inline]`

Get the y position

Return values:

  | long | The Y Position of the mouse

Definition at line 125 of file CMouse.hpp.

References Exponent::MathTools::CPoint::getYPosition(), and m_position.

bool Exponent::GUI::Windowing::CMouse::isCaptured | ( |  | ) | const

Check if the mouse is captured

Return values:

  | bool | True if captured, false otherwise

bool Exponent::GUI::Windowing::CMouse::isCaptured | ( | SWindowHandle * | windowHandle | ) | const

Check if the mouse is captured by a specific window

Parameters:

  | windowHandle | The window to check against

Return values:

  | bool | True if captured, false otherwise

void Exponent::GUI::Windowing::CMouse::release | ( |  | ) | const

Release the mouse

void Exponent::GUI::Windowing::CMouse::setCursor | ( | CCursor * | cursor = `&CCursor::CCURSOR_ARROW` | ) |

Set the cursor

Parameters:

  | cursor | The cursor to use

void Exponent::GUI::Windowing::CMouse::setPosition | ( | LPARAM | lParam | ) |

Set the position

Parameters:

  | lParam | The mouse position as a window LPARAM

void Exponent::GUI::Windowing::CMouse::setPosition | ( | const CPoint & | point | ) |

Set the position of the mouse

Parameters:

  | point | The mouse position

## Member Data Documentation

CCursor* Exponent::GUI::Windowing::CMouse::m_cursor`[protected]`

The cursor

Definition at line 160 of file CMouse.hpp.

Referenced by getCursor().

CPoint Exponent::GUI::Windowing::CMouse::m_position`[protected]`

The mouse position

Definition at line 159 of file CMouse.hpp.

Referenced by getPosition(), getXPosition(), and getYPosition().