Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |

# TQWSMouseHandler Class Reference

The TQWSMouseHandler class is a mouse driver for TQt/Embedded. More...

`#include <qmouse_qws.h>`

List of all member functions.

## Public Members

- TQWSMouseHandler ( const TQString & driver = TQString::null, const TQString & device = TQString::null )
- virtual ~TQWSMouseHandler ()
- virtual void clearCalibration ()
- virtual void calibrate ( TQWSPointerCalibrationData * )
- void limitToScreen ( TQPoint & pt )
- void mouseChanged ( const TQPoint & pos, int bstate )
- const TQPoint & pos () const

## Detailed Description

The TQWSMouseHandler class is a mouse driver for TQt/Embedded.

The mouse driver handles events from system devices and generates mouse events.

A TQWSMouseHandler will usually open some system device in its constructor, create a TQSocketNotifier on that opened device and when it receives data, it will call mouseChanged() to send the event to TQt/Embedded for relaying to clients.

See also TQt/Embedded.

## Member Function Documentation

### TQWSMouseHandler::TQWSMouseHandler ( const TQString & driver = TQString::null, const TQString & device = TQString::null )

Constructs a mouse handler. This becomes the primary mouse handler.

Note that once created, mouse handlers are controlled by the system and should not be deleted.

The driver and device arguments are not used by this base class.

### TQWSMouseHandler::~TQWSMouseHandler ()`[virtual]`

Destroys the mouse handler. You should not call this directly.

### void TQWSMouseHandler::calibrate ( TQWSPointerCalibrationData * )`[virtual]`

This method is reimplemented in the calibrated mouse handler to set calibration information (from, for instance, the TQtopia calibration screen). This version does nothing.

### void TQWSMouseHandler::clearCalibration ()`[virtual]`

This method is reimplemented in the calibrated mouse handler to clear calibration information. This version does nothing.

### void TQWSMouseHandler::limitToScreen ( TQPoint & pt )

Ensures that the given point, pt is within the screen's boundaries, changing pt if necessary.

### void TQWSMouseHandler::mouseChanged ( const TQPoint & pos, int bstate )

When a mouse event occurs this function is called with the mouse's position in pos, and the state of its buttons in bstate.

### const TQPoint & TQWSMouseHandler::pos () const

Returns the mouse position.

This file is part of the TQt toolkit. Copyright © 1995-2007 Trolltech. All Rights Reserved.