The Battle for Wesnoth  1.13.10+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CKey Class Reference

Class that keeps track of all the keys on the keyboard. More...

#include <key.hpp>

Public Member Functions

 CKey ()
 
bool operator[] (int k) const
 

Static Public Member Functions

static bool is_uncomposable (const SDL_KeyboardEvent &event)
 

Private Attributes

const uint8_t * key_list
 

Detailed Description

Class that keeps track of all the keys on the keyboard.

Whether any key is pressed or not can be found by using its operator[]. Note though that it is generally better to use key events to see when keys are pressed rather than to poll using this object.

Definition at line 27 of file key.hpp.

Constructor & Destructor Documentation

CKey::CKey ( )

Definition at line 17 of file key.cpp.

Member Function Documentation

bool CKey::is_uncomposable ( const SDL_KeyboardEvent &  event)
static

Definition at line 27 of file key.cpp.

Referenced by hotkey::create_hotkey(), and hotkey::hotkey_keyboard::matches_helper().

bool CKey::operator[] ( int  k) const

Definition at line 22 of file key.cpp.

References key_list.

Member Data Documentation

const uint8_t* CKey::key_list
private

Definition at line 29 of file key.hpp.

Referenced by operator[]().


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