#include <LgiClass.h>
Inheritance diagram for GMouse:

Public Member Functions | |
| bool | Left () |
| True if the left mouse button was clicked. | |
| bool | Middle () |
| True if the middle mouse button was clicked. | |
| bool | Right () |
| True if the right mouse button was clicked. | |
| void | Left (bool i) |
| Sets the left button flag. | |
| void | Middle (bool i) |
| Sets the middle button flag. | |
| void | Right (bool i) |
| Sets the right button flag. | |
| bool | ToScreen () |
| Converts to screen coordinates. | |
| bool | ToView () |
| Converts to local coordinates. | |
Public Attributes | |
| GViewI * | Target |
| Receiving view. | |
| bool | ViewCoords |
| True if specified in view coordinates, false if in screen coords. | |
| int | x |
| The x co-ordinate of the mouse relitive to the current view. | |
| int | y |
| The y co-ordinate of the mouse relitive to the current view. | |
The parent class GUiEvent keeps information about whether it was a Down() or Double() click. You can also query whether the Alt(), Ctrl() or Shift() keys were pressed at the time the event occured.
To get the position of the mouse in screen co-ordinates you can either use GView::GetMouse() and pass true in the 'ScreenCoords' parameter. Or you can construct a GdcPt2 out of the x,y fields of this class and use GView::PointToScreen() to map the point to screen co-ordinates.
1.4.1