Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
KeyPress Class Reference

#include <keycode.h>

+ Collaboration diagram for KeyPress:

Public Member Functions

 KeyPress ()=default
 
 KeyPress (const char *name)
 
 KeyPress (const irr::SEvent::SKeyInput &in, bool prefer_character=false)
 
bool operator== (const KeyPress &o) const
 
const char * sym () const
 
const char * name () const
 

Static Protected Member Functions

static bool valid_kcode (irr::EKEY_CODE k)
 

Protected Attributes

irr::EKEY_CODE Key = irr::KEY_KEY_CODES_COUNT
 
wchar_t Char = L'\0'
 
std::string m_name = ""
 

Constructor & Destructor Documentation

◆ KeyPress() [1/3]

KeyPress::KeyPress ( )
default

◆ KeyPress() [2/3]

KeyPress::KeyPress ( const char * name)

References Char, FATAL_ERROR_IF, Key, lookup_keychar(), lookup_keyname(), m_name, name(), and warningstream.

+ Here is the call graph for this function:

◆ KeyPress() [3/3]

KeyPress::KeyPress ( const irr::SEvent::SKeyInput & in,
bool prefer_character = false )

References Char, Key, lookup_keychar(), lookup_keykey(), m_name, table_key::Name, and valid_kcode().

+ Here is the call graph for this function:

Member Function Documentation

◆ name()

const char * KeyPress::name ( ) const

References Char, Key, table_key::LangName, lookup_keychar(), lookup_keykey(), m_name, and valid_kcode().

Referenced by KeyPress(), GUIKeyChangeMenu::OnEvent(), GUIKeyChangeMenu::regenerateGui(), GUIKeyChangeMenu::resetMenu(), and TestKeycode::testCreateFromString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator==()

bool KeyPress::operator== ( const KeyPress & o) const
inline

References Char, Key, and valid_kcode().

+ Here is the call graph for this function:

◆ sym()

const char * KeyPress::sym ( ) const

References m_name.

Referenced by GUIKeyChangeMenu::OnEvent(), TestKeycode::testCreateFromSKeyInput(), and TestKeycode::testCreateFromString().

+ Here is the caller graph for this function:

◆ valid_kcode()

static bool KeyPress::valid_kcode ( irr::EKEY_CODE k)
inlinestaticprotected

Referenced by KeyPress(), name(), and operator==().

+ Here is the caller graph for this function:

Member Data Documentation

◆ Char

wchar_t KeyPress::Char = L'\0'
protected

Referenced by KeyPress(), KeyPress(), name(), and operator==().

◆ Key

irr::EKEY_CODE KeyPress::Key = irr::KEY_KEY_CODES_COUNT
protected

◆ m_name

std::string KeyPress::m_name = ""
protected

Referenced by KeyPress(), KeyPress(), name(), and sym().


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