#include "gevents.h"

class GMouseEvent

This event subclass represents a mouse event.
Constructor
GMouseEvent()
GMouseEvent(e)
GMouseEvent(type, x, y) 
Creates a GMouseEvent using the specified parameters or those taken from the more general event e.
Methods
getEventType() Returns the enumerated type constant corresponding to the specific type of mouse event.
getX() Returns the x coordinate at which the event occurred relative to the window origin at the upper left corner of the window.
getY() Returns the y coordinate at which the event occurred relative to the window origin at the upper left corner of the window.
toString() Converts the event to a human-readable representation of the event.

Constructor detail


GMouseEvent();
GMouseEvent(GEvent e);
GMouseEvent(MouseEventType type, double x, double y);
Creates a GMouseEvent using the specified parameters or those taken from the more general event e.

Usage:

GMouseEvent mouseEvent;
GMouseEvent mouseEvent(e);
GMouseEvent mouseEvent(type, x, y);

Method detail


MouseEventType getEventType();
Returns the enumerated type constant corresponding to the specific type of mouse event.

Usage:

MouseEventType type = e.getEventType();

double getX();
Returns the x coordinate at which the event occurred relative to the window origin at the upper left corner of the window.

Usage:

double x = getX();

double getY();
Returns the y coordinate at which the event occurred relative to the window origin at the upper left corner of the window.

Usage:

double y = getY();

string toString();
Converts the event to a human-readable representation of the event.

Usage:

string str = e.toString();