phoenix::PhEventHandler Class Reference

Event handler. More...

#include <PhEventHandle.h>

List of all members.

Public Member Functions

 PhEventHandler ()
 Construct.
void updateEvents ()
 Update events.
bool getKey (int a)
 Get key.
bool getKeyPressed (int a)
 Get pressed.
PhVector2d getMousePosition ()
 Get mouse position.
bool getMouseButton (int a)
 Get mouse button.
bool getMouseButtonPressed (int a)
 Get mouse button pressed.
bool returnQuit ()
 Return quit.


Detailed Description

Event handler.

Provides a simple interface to the keyboard, mouse, and other system events. The event handler uses SDL key definitions, for a list of acceptable key definitions, please see the SDL documentation page located at this website


Member Function Documentation

void phoenix::PhEventHandler::updateEvents (  ) 

Update events.

This polls the window manager for new events, this is always handled by the render system.

bool phoenix::PhEventHandler::getKey ( int  a  ) 

Get key.

Gets the state of a current key, true if it is down.

Parameters:
a Key to get the state of.
Returns:
State of the given key.
See also:
getKeyPressed()

bool phoenix::PhEventHandler::getKeyPressed ( int  a  ) 

Get pressed.

Gets if a get was just pressed.

Parameters:
a Key to get the state of.
Returns:
True if the key was just pressed.
See also:
getKey()

PhVector2d phoenix::PhEventHandler::getMousePosition (  ) 

Get mouse position.

Returns:
A vector that represents the mouse's position relative to the top of the window.

bool phoenix::PhEventHandler::getMouseButton ( int  a  ) 

Get mouse button.

Gives the state of the given mouse button.

Parameters:
a Button to get the state of.
Returns:
State of the given button.
See also:
getMouseButtonPressed()

bool phoenix::PhEventHandler::getMouseButtonPressed ( int  a  ) 

Get mouse button pressed.

Returns if the mouse button was just pressed.

Parameters:
a Button to get the state of.
Returns:
True if the mouse button was just pressed.
See also:
getMouseButton()

bool phoenix::PhEventHandler::returnQuit (  ) 

Return quit.

Returns:
True if the user closed the window.


The documentation for this class was generated from the following file:
Generated on Tue Nov 20 21:59:24 2007 for Phoenix by  doxygen 1.5.4