OpenGLPrakt --> events --> cEvent --> cMousePressEvent

class cMousePressEvent
    extends cEvent as public

a cEvent with a payload (a mouse button state change)

Source:
../src/cMousePressEvent.hh:20

Constructors Index

cMousePressEvent
[public] constructor w/ initialization
cMousePressEvent
[public] constructor w/ initialization
cMousePressEvent
[public] constructor w/ initialization
cMousePressEvent
[public] copy constructor
~cMousePressEvent
[public] destructor


Variables Index

mButton
[protected] stored button mask
mPos
[protected] mouse position
mStatus
[protected] button status


Methods Index

Clone
[public] clone function
GetButtonState
[public] allow accessing the stored mouse status
GetPos
[public] allow accessing the stored mouse position


Constructors

cMousePressEvent

public cMousePressEvent ( const string & name = "cMousePressEvent" ) ;

constructor w/ initialization

Parameters:
name string which contains the event's name

cMousePressEvent

public cMousePressEvent ( const string & name ,
                          int button ,
                          int state ,
                          GLfloat x ,
                          GLfloat y ,
                          GLfloat z = 0 ) ;

constructor w/ initialization

Parameters:
name string which contains the event's name
button which button was affected
state how did it change state (GLUT_UP/GLUT_DOWN)
x x-pos of mouse
y y-pos of mouse
z z-pos of mouse (if any)

cMousePressEvent

public cMousePressEvent ( const string & name ,
                          int button ,
                          int state ,
                          const cVertex & pos ) ;

constructor w/ initialization

Parameters:
name string which contains the event's name
button which button was affected
state how did it change state (GLUT_UP/GLUT_DOWN)
pos cVertex pos of mouse

cMousePressEvent

public cMousePressEvent ( const cMousePressEvent & e ) ;

copy constructor

cMousePressEvent

public virtual ~ cMousePressEvent ( ) ;

destructor


Variables

mButton

protected int mButton

stored button mask

mStatus

protected int mStatus

button status

mPos

protected cVertex mPos

mouse position


Methods

Clone

public virtual cMousePressEvent * Clone ( ) const ;

clone function

Return:
pointer to new allocated cMousePressEvent

GetButtonState

public virtual void GetButtonState ( int & button ,
                                     int & state ) const ;

allow accessing the stored mouse status

Parameters:
button reference to int where the affected buttons are written to
state reference to int where the new state is written to

GetPos

public virtual const cVertex & GetPos ( ) const ;

allow accessing the stored mouse position

Return:
const reference to cVertex with stored position

This documentation was generated automatically by the ccdoc tool (version 0.7a).
Click here to submit a bug report or feature request.

Click here to return to the top of the page.