igor::iKeyboard Class Reference

#include <iKeyboard.h>

Inherits igor::iOSEventListener, and igor::iModule< iKeyboard >.

Public Member Functions

bool getKey (iKeyCode keyCode)
 
bool keyPressed ()
 
iWindowPtr getWindow () const override
 
- Public Member Functions inherited from igor::iOSEventListener
 iOSEventListener ()=default
 
virtual ~iOSEventListener ()=default
 
virtual iWindowPtr getWindow () const =0
 

Static Public Member Functions

static iKeyCode getKeyCode (const iaString &keyname)
 
- Static Public Member Functions inherited from igor::iModule< iKeyboard >
static IGOR_INLINE iKeyboardgetInstance ()
 
static IGOR_INLINE bool isInstantiated ()
 
static void create ()
 
static void destroy ()
 

Friends

class iModule< iKeyboard >
 

Additional Inherited Members

- Protected Member Functions inherited from igor::iModule< iKeyboard >
 iModule ()=default
 
virtual ~iModule ()=default
 

Detailed Description

Handles keyboard specific os events and triggers Igor events.

It also stores key states for later use

Member Function Documentation

◆ getKey()

bool igor::iKeyboard::getKey ( iKeyCode  keyCode)
Returns
true: if a specified key is pressed; false if the specified key is not pressed

you should not use that. better style is to use events

Parameters
keyCodethe specified key

◆ getKeyCode()

iKeyCode igor::iKeyboard::getKeyCode ( const iaString keyname)
static

returns key code

Parameters
keycodekey name
Returns
key code

◆ getWindow()

iWindowPtr igor::iKeyboard::getWindow ( ) const
overridevirtual

\retruns pointer to corresponding window if it returns nullptr the listener was not registred to a window yet

Implements igor::iOSEventListener.

◆ keyPressed()

bool igor::iKeyboard::keyPressed ( )
Returns
true: if any key is pressed; false: if no key is pressed

you should not use that. better style is to use events

Friends And Related Function Documentation

◆ iModule< iKeyboard >

friend class iModule< iKeyboard >
friend

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