- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UKeyStroke Class Reference

A representation of a typed key on the keyboard. Used for hotkeys. More...

#include <ukeystroke.hpp>

Inheritance diagram for ufo::UKeyStroke:

ufo::UObject ufo::UCollectable List of all members.

Public Member Functions

 UKeyStroke (const char *key)
 UKeyStroke (const std::string &key)
 UKeyStroke (wchar_t keyChar, bool onKeyRelease=false)
 UKeyStroke (UKeyCode_t keyCode, UMod_t modifiers=UMod::NoModifier, bool onKeyRelease=false)
 UKeyStroke (wchar_t keyChar, UKeyCode_t keyCode, UMod_t modifiers=UMod::NoModifier, bool onKeyRelease=false)
 UKeyStroke (UKeyEvent *e)
bool operator== (const UKeyStroke &) const
bool operator!= (const UKeyStroke &) const
bool operator< (const UKeyStroke &) const
wchar_t getKeyChar () const
UKeyCode_t getKeyCode () const
UMod_t getModifiers () const
bool onKeyRelease () const
virtual std::string toString () const
virtual unsigned int hashCode () const
virtual bool equals (const UObject *objA) const
virtual bool equals (const UKeyStroke *strokeA) const

Detailed Description

A representation of a typed key on the keyboard. Used for hotkeys.

Author:
Johannes Schmidt


Member Function Documentation

virtual bool ufo::UKeyStroke::equals const UObject objA  )  const [virtual]
 

checks if this object is the same object than obj

Reimplemented from ufo::UObject.

virtual unsigned int ufo::UKeyStroke::hashCode  )  const [inline, virtual]
 

returns a std::size_t which is used when UObject pointers are the keys for UHashMap. If equals(UObject*) returns true, these two objects should return the same hash code. If these objects are different, the hash code may be equal.

Returns:
a hash code.

Reimplemented from ufo::UObject.

bool ufo::UKeyStroke::operator< const UKeyStroke  )  const
 

For use in std::map

virtual std::string ufo::UKeyStroke::toString  )  const [virtual]
 

std::string representation

Reimplemented from ufo::UObject.


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt