|
PEBL 2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
|
#include <PlatformKeyboard.h>
Public Member Functions | |
| PlatformKeyboard () | |
| Standard Constructor. | |
| virtual | ~PlatformKeyboard () |
| Standard Destructor. | |
| virtual PEBL_Keycode | IsKeyDown (PEBL_Keycode key) const |
| Primitive key event poller. | |
| virtual bool | IsKeyUp (PEBL_Keycode key) const |
| virtual int | GetState (int iface) const |
| PlatformKeyboard () | |
| virtual | ~PlatformKeyboard () |
| virtual PEBL_Keycode | IsKeyDown (PEBL_Keycode code) const |
| virtual bool | IsKeyUp (PEBL_Keycode code) const |
Public Member Functions inherited from PKeyboard | |
| PKeyboard () | |
| The Standard constructor. | |
| virtual | ~PKeyboard () |
| The Standard destructor. | |
| virtual PEBL_Keycode | TranslateString (std::string letter) const |
| Translate a letter string to the appropriate keyboard symbol. | |
| virtual std::string | TranslateKeyCode (const PEBL_Keycode code) const |
| virtual PEBL_DEVICE_TYPE | GetDeviceType () |
| virtual int | GetModKeys () const |
Public Member Functions inherited from PDevice | |
| PDevice () | |
| The Standard constructor. | |
| virtual | ~PDevice () |
| The Standard destructor. | |
Public Member Functions inherited from PEBLObjectBase | |
| PEBLObjectBase () | |
| Standard Constructor. | |
| PEBLObjectBase (ComplexDataType cdt) | |
| Standard Constructor. | |
| PEBLObjectBase (const PEBLObjectBase &pob) | |
| virtual | ~PEBLObjectBase () |
| Standard Destructor. | |
| virtual bool | InitializeProperty (std::string name, Variant v) |
| virtual bool | SetProperty (std::string name, Variant v) |
| Variant | GetProperty (std::string) const |
| virtual ObjectValidationError | ValidateProperty (std::string, Variant v) const |
| virtual ObjectValidationError | ValidateProperty (std::string) const |
| ComplexDataType | GetType () |
| virtual std::string | ObjectName () const |
| virtual std::ostream & | PrintProperties (std::ostream &out) |
| virtual Variant | GetPropertyList () |
Protected Member Functions | |
| virtual std::ostream & | SendToStream (std::ostream &out) const |
| virtual std::ostream & | SendToStream (std::ostream &out) const |
Additional Inherited Members | |
Protected Attributes inherited from PEBLObjectBase | |
| ComplexDataType | mCDT |
| std::map< std::string, Variant > | mProperties |
This class instantiates a Keyboard event handler using platform-specific code.
Definition at line 42 of file sdl/PlatformKeyboard.h.
| PlatformKeyboard::PlatformKeyboard | ( | ) |
Standard Constructor.
This is the SDL-specific binding for the keyboard handler. SDL key events can be accessed in multiple ways. First, they can be handled through the standard SDL event queue. Key-Up and Key-Down events are signalled through this loop. Also, the entire state of the keyboard can be polled at a given point in time, and this state can be examined. For optimal performance, we should select a subset of keys to examine and poll them until one flips.
Definition at line 59 of file sdl/PlatformKeyboard.cpp.
References NULL.
|
virtual |
| PlatformKeyboard::PlatformKeyboard | ( | ) |
|
virtual |
|
virtual |
Reimplemented from PKeyboard.
Definition at line 212 of file sdl/PlatformKeyboard.cpp.
References IsKeyUp().
|
virtual |
This will test whether a specific key is down, and return true if it is.
Implements PKeyboard.
|
virtual |
Primitive key event poller.
This will test whether a specific key is down, and return true if it is.
Implements PKeyboard.
Definition at line 85 of file sdl/PlatformKeyboard.cpp.
References PEBL_KEYCODE_ANYKEY, and PEBL_KEYCODE_NOTHING.
Referenced by PEBLEnvironment::IsAnyKeyDown(), and PEBLEnvironment::IsKeyDown().
|
virtual |
This will test whether a specific key is up, and return true if it is.
Implements PKeyboard.
|
virtual |
This will test whether a specific key is up, and return true if it is.
Primitive key event poller for 'up' state. If the key argument is the 'anykey' it will return true if every key is unpressed. we want to bo able to return the value of the key pressed, thus determining which key was pressed when anykey is being tested.
Implements PKeyboard.
Definition at line 113 of file sdl/PlatformKeyboard.cpp.
References PEBL_KEYCODE_ANYKEY, and PEBL_KEYCODE_NOTHING.
Referenced by GetState(), and PEBLEnvironment::IsKeyUp().
|
protectedvirtual |
Reimplemented from PKeyboard.
Definition at line 15 of file validator/PlatformKeyboard.cpp.
|
protectedvirtual |
Reimplemented from PKeyboard.