Om  1.0.0
A universal framework for multimedia simulation
Public Member Functions | List of all members
om::gui::input::MouseButtonEvent Class Reference

A class representing a button press or release event. More...

#include <omGUIInputMouseButtonEvent.h>

Public Member Functions

 MouseButtonEvent (MouseButtonCode newButtonCode, Bool newIsPressed, const Vector2f &newPosition)
 Construct a new mouse button event with button, it's state, and position. More...
 
MouseButtonCode getButtonCode () const
 Return the mouse button code that this event relates to. More...
 
void setButtonCode (MouseButtonCode newButtonCode)
 Set the mouse button code that this event relates to. More...
 
Bool isPressed () const
 Return whether or not the button was pressed. More...
 
Bool isReleased () const
 Return whether or not the button was released. More...
 
const Vector2f & getPosition () const
 Return the position of the mouse when the mouse button event occurred. More...
 
void setPosition (const Vector2f &newPosition)
 Set the position of the mouse when the mouse button event occurred. More...
 
const TimegetTime () const
 Return the absolute time since the epoch when the mouse button event occurred. More...
 
void setTime (const Time &newTime)
 Set the absolute time since the epoch when the mouse button event occurred. More...
 
const ModifiersgetModifiers () const
 Return the modifier flags that were set when the event occurred. More...
 
void setModifiers (const Modifiers &newModifiers)
 Set the modifier flags that were set when the event occurred. More...
 
Bool operator== (const MouseButton &mouseButton) const
 Return whether or not this mouse button event corresponds to the specified mouse button. More...
 
Bool operator!= (const MouseButton &mouseButton) const
 Return whether or not this mouse button event corresponds to the specified mouse button. More...
 

Detailed Description

A class representing a button press or release event.

A mouse button event contains information regarding a particular mouse button press or release event, such as the mouse button for the event, the new state of the mouse button, and the position of the mouse when the event occurred.

Constructor & Destructor Documentation

om::gui::input::MouseButtonEvent::MouseButtonEvent ( MouseButtonCode  newButtonCode,
Bool  newIsPressed,
const Vector2f &  newPosition 
)
inline

Construct a new mouse button event with button, it's state, and position.

Member Function Documentation

MouseButtonCode om::gui::input::MouseButtonEvent::getButtonCode ( ) const
inline

Return the mouse button code that this event relates to.

void om::gui::input::MouseButtonEvent::setButtonCode ( MouseButtonCode  newButtonCode)
inline

Set the mouse button code that this event relates to.

Bool om::gui::input::MouseButtonEvent::isPressed ( ) const
inline

Return whether or not the button was pressed.

Bool om::gui::input::MouseButtonEvent::isReleased ( ) const
inline

Return whether or not the button was released.

const Vector2f& om::gui::input::MouseButtonEvent::getPosition ( ) const
inline

Return the position of the mouse when the mouse button event occurred.

void om::gui::input::MouseButtonEvent::setPosition ( const Vector2f &  newPosition)
inline

Set the position of the mouse when the mouse button event occurred.

const Time& om::gui::input::MouseButtonEvent::getTime ( ) const
inline

Return the absolute time since the epoch when the mouse button event occurred.

void om::gui::input::MouseButtonEvent::setTime ( const Time newTime)
inline

Set the absolute time since the epoch when the mouse button event occurred.

const Modifiers& om::gui::input::MouseButtonEvent::getModifiers ( ) const
inline

Return the modifier flags that were set when the event occurred.

void om::gui::input::MouseButtonEvent::setModifiers ( const Modifiers newModifiers)
inline

Set the modifier flags that were set when the event occurred.

Bool om::gui::input::MouseButtonEvent::operator== ( const MouseButton mouseButton) const
inline

Return whether or not this mouse button event corresponds to the specified mouse button.

Bool om::gui::input::MouseButtonEvent::operator!= ( const MouseButton mouseButton) const
inline

Return whether or not this mouse button event corresponds to the specified mouse button.


The documentation for this class was generated from the following file: