< Home

< Table of Contents

REFERENCE MANUAL

InputEvent Class Reference

#include <hps.h>

Inheritance diagram for InputEvent:
Event KeyboardEvent MouseEvent TouchEvent

Public Member Functions

EventClone () const
 
virtual bool Equals (InputEvent const &in_that) const
 
ModifierKeys GetModifierKeys () const
 
 InputEvent ()
 
 InputEvent (ModifierKeys const &in_modifiers)
 
virtual bool operator!= (InputEvent const &in_that) const
 
virtual bool operator== (InputEvent const &in_that) const
 
- Public Member Functions inherited from Event
virtual bool Drop (Event const *in_that_event) const
 
 Event (intptr_t in_channel=0)
 
virtual intptr_t Freshen () const
 
intptr_t GetChannel () const
 
intptr_t GetClassID () const
 
Time GetTimeStamp () const
 
bool IsConsumable () const
 

Public Attributes

ModifierKeys ModifierKeyState
 The modifier keys which are active for this InputEvent.
 

Additional Inherited Members

- Public Types inherited from Event
enum  Status { Status::InProgress, Status::Completed, Status::Failed }
 
- Static Public Member Functions inherited from Event
static void operator delete (void *in_ptr, size_t in_size) throw ()
 
static void * operator new (size_t in_size)
 
- Protected Attributes inherited from Event
intptr_t channel
 
bool consumable
 

Detailed Description

The InputEvent class is the base class for input events such as MouseEvent, TouchEvent, and KeyboardEvent. It contains functionality which is common to all input event types, namely the state of modifier keys.

Constructor & Destructor Documentation

InputEvent::InputEvent ( )
inline

This constructor creates a default InputEvent object.

InputEvent::InputEvent ( ModifierKeys const &  in_modifiers)
inline

This constructor creates a new InputEvent with the specified modifier keys initialized.

Parameters
in_modifiersThe modifier keys associated with the new Event.

Member Function Documentation

Event* InputEvent::Clone ( ) const
inlinevirtual

Allocates and returns a copy of this InputEvent.

Returns
A copy of this InputEvent.

Implements Event.

Reimplemented in KeyboardEvent, MouseEvent, and TouchEvent.

virtual bool InputEvent::Equals ( InputEvent const &  in_that) const
inlinevirtual

Check if the source object is equivalent to this object.

Parameters
in_kitThe source object to compare to this object.
Returns
true if the objects are equivalent, false otherwise.

References ModifierKeyState.

Referenced by TouchEvent::Equals(), MouseEvent::Equals(), and KeyboardEvent::Equals().

ModifierKeys InputEvent::GetModifierKeys ( ) const
inline

Query whether a particular modifier key is active for this InputEvent.

Parameters
in_modifier_keyThe modifier key for which to query if it is active.
Returns
true if the given modifier key is active, false otherwise.
virtual bool InputEvent::operator!= ( InputEvent const &  in_that) const
inlinevirtual

Check if the source object is not equivalent to this object.

Parameters
in_kitThe source object to compare to this object.
Returns
true if the objects are not equivalent, false otherwise.
virtual bool InputEvent::operator== ( InputEvent const &  in_that) const
inlinevirtual

Check if the source object is equivalent to this object.

Parameters
in_kitThe source object to compare to this object.
Returns
true if the objects are equivalent, false otherwise.

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