DDraceNetwork Docs
IInput Class Referenceabstract

#include <input.h>

Inheritance diagram for IInput:
[legend]
Collaboration diagram for IInput:
[legend]

Classes

class  CEvent
 
class  CTouchFinger
 
class  CTouchFingerState
 
class  IJoystick
 

Public Types

enum  { FLAG_PRESS = 1 << 0 , FLAG_RELEASE = 1 << 1 , FLAG_TEXT = 1 << 2 }
 
enum  ECursorType { CURSOR_NONE , CURSOR_MOUSE , CURSOR_JOYSTICK }
 

Public Member Functions

virtual void ConsumeEvents (std::function< void(const CEvent &Event)> Consumer) const =0
 
virtual void Clear ()=0
 
virtual float GetUpdateTime () const =0
 
virtual bool ModifierIsPressed () const =0
 
virtual bool ShiftIsPressed () const =0
 
virtual bool AltIsPressed () const =0
 
virtual bool KeyIsPressed (int Key) const =0
 
virtual bool KeyPress (int Key, bool CheckCounter=false) const =0
 
const char * KeyName (int Key) const
 
virtual int FindKeyByName (const char *pKeyName) const =0
 
virtual size_t NumJoysticks () const =0
 
virtual IJoystickGetJoystick (size_t Index)=0
 
virtual IJoystickGetActiveJoystick ()=0
 
virtual void SetActiveJoystick (size_t Index)=0
 
virtual vec2 NativeMousePos () const =0
 
virtual bool NativeMousePressed (int Index) const =0
 
virtual void MouseModeRelative ()=0
 
virtual void MouseModeAbsolute ()=0
 
virtual bool MouseRelative (float *pX, float *pY)=0
 
virtual const std::vector< CTouchFingerState > & TouchFingerStates () const =0
 
virtual std::string GetClipboardText ()=0
 
virtual void SetClipboardText (const char *pText)=0
 
virtual void StartTextInput ()=0
 
virtual void StopTextInput ()=0
 
virtual const char * GetComposition () const =0
 
virtual bool HasComposition () const =0
 
virtual int GetCompositionCursor () const =0
 
virtual int GetCompositionLength () const =0
 
virtual const char * GetCandidate (int Index) const =0
 
virtual int GetCandidateCount () const =0
 
virtual int GetCandidateSelectedIndex () const =0
 
virtual void SetCompositionWindowPosition (float X, float Y, float H)=0
 
virtual bool GetDropFile (char *aBuf, int Len)=0
 
ECursorType CursorRelative (float *pX, float *pY)
 
- Public Member Functions inherited from IInterface
 IInterface ()
 
virtual void Shutdown ()
 
virtual ~IInterface ()
 

Static Public Member Functions

static const char * InterfaceName ()
 

Additional Inherited Members

- Protected Member Functions inherited from IInterface
IKernelKernel ()
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FLAG_PRESS 
FLAG_RELEASE 
FLAG_TEXT 

◆ ECursorType

Enumerator
CURSOR_NONE 
CURSOR_MOUSE 
CURSOR_JOYSTICK 

Member Function Documentation

◆ AltIsPressed()

virtual bool IInput::AltIsPressed ( ) const
pure virtual

Implemented in CInput.

◆ Clear()

virtual void IInput::Clear ( )
pure virtual

Implemented in CInput.

◆ ConsumeEvents()

virtual void IInput::ConsumeEvents ( std::function< void(const CEvent &Event)>  Consumer) const
pure virtual

Implemented in CInput.

◆ CursorRelative()

ECursorType IInput::CursorRelative ( float *  pX,
float *  pY 
)
inline

◆ FindKeyByName()

virtual int IInput::FindKeyByName ( const char *  pKeyName) const
pure virtual

Implemented in CInput.

◆ GetActiveJoystick()

virtual IJoystick * IInput::GetActiveJoystick ( )
pure virtual

Implemented in CInput.

◆ GetCandidate()

virtual const char * IInput::GetCandidate ( int  Index) const
pure virtual

Implemented in CInput.

◆ GetCandidateCount()

virtual int IInput::GetCandidateCount ( ) const
pure virtual

Implemented in CInput.

◆ GetCandidateSelectedIndex()

virtual int IInput::GetCandidateSelectedIndex ( ) const
pure virtual

Implemented in CInput.

◆ GetClipboardText()

virtual std::string IInput::GetClipboardText ( )
pure virtual

Implemented in CInput.

◆ GetComposition()

virtual const char * IInput::GetComposition ( ) const
pure virtual

Implemented in CInput.

◆ GetCompositionCursor()

virtual int IInput::GetCompositionCursor ( ) const
pure virtual

Implemented in CInput.

◆ GetCompositionLength()

virtual int IInput::GetCompositionLength ( ) const
pure virtual

Implemented in CInput.

◆ GetDropFile()

virtual bool IInput::GetDropFile ( char *  aBuf,
int  Len 
)
pure virtual

Implemented in CInput.

◆ GetJoystick()

virtual IJoystick * IInput::GetJoystick ( size_t  Index)
pure virtual

Implemented in CInput.

◆ GetUpdateTime()

virtual float IInput::GetUpdateTime ( ) const
pure virtual
Returns
Rolling average of the time in seconds between calls of the Update function.

Implemented in CInput.

◆ HasComposition()

virtual bool IInput::HasComposition ( ) const
pure virtual

Implemented in CInput.

◆ InterfaceName()

static const char * IInput::InterfaceName ( )
inlinestatic

◆ KeyIsPressed()

virtual bool IInput::KeyIsPressed ( int  Key) const
pure virtual

Implemented in CInput.

◆ KeyName()

const char * IInput::KeyName ( int  Key) const
inline

◆ KeyPress()

virtual bool IInput::KeyPress ( int  Key,
bool  CheckCounter = false 
) const
pure virtual

Implemented in CInput.

◆ ModifierIsPressed()

virtual bool IInput::ModifierIsPressed ( ) const
pure virtual

Implemented in CInput.

◆ MouseModeAbsolute()

virtual void IInput::MouseModeAbsolute ( )
pure virtual

Implemented in CInput.

◆ MouseModeRelative()

virtual void IInput::MouseModeRelative ( )
pure virtual

Implemented in CInput.

◆ MouseRelative()

virtual bool IInput::MouseRelative ( float *  pX,
float *  pY 
)
pure virtual

Implemented in CInput.

◆ NativeMousePos()

virtual vec2 IInput::NativeMousePos ( ) const
pure virtual

Implemented in CInput.

◆ NativeMousePressed()

virtual bool IInput::NativeMousePressed ( int  Index) const
pure virtual

Implemented in CInput.

◆ NumJoysticks()

virtual size_t IInput::NumJoysticks ( ) const
pure virtual

Implemented in CInput.

◆ SetActiveJoystick()

virtual void IInput::SetActiveJoystick ( size_t  Index)
pure virtual

Implemented in CInput.

◆ SetClipboardText()

virtual void IInput::SetClipboardText ( const char *  pText)
pure virtual

Implemented in CInput.

◆ SetCompositionWindowPosition()

virtual void IInput::SetCompositionWindowPosition ( float  X,
float  Y,
float  H 
)
pure virtual

Implemented in CInput.

◆ ShiftIsPressed()

virtual bool IInput::ShiftIsPressed ( ) const
pure virtual

Implemented in CInput.

◆ StartTextInput()

virtual void IInput::StartTextInput ( )
pure virtual

Implemented in CInput.

◆ StopTextInput()

virtual void IInput::StopTextInput ( )
pure virtual

Implemented in CInput.

◆ TouchFingerStates()

virtual const std::vector< CTouchFingerState > & IInput::TouchFingerStates ( ) const
pure virtual

Returns a vector of the states of all touch fingers currently being pressed down on touch devices. Note that this only contains fingers which are pressed down, i.e. released fingers are never stored. The order of the fingers in this vector is based on the order in which the fingers where pressed.

Returns
vector of all touch finger states

Implemented in CInput.


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