FifeGUI 0.2.0
A C++ GUI library designed for games.
fcn::Input Class Referenceabstract

#include <input.hpp>

Inheritance diagram for fcn::Input:
fcn::GenericInput fcn::sdl2::Input

Public Member Functions

virtual void _pollInput ()=0
virtual KeyInput dequeueKeyInput ()=0
virtual MouseInput dequeueMouseInput ()=0
 Input (Input &&)=delete
 Input (Input const &)=delete
virtual bool isKeyQueueEmpty ()=0
virtual bool isMouseQueueEmpty ()=0
Input & operator= (Input &&)=delete
Input & operator= (Input const &)=delete

Detailed Description

Abstract interface for polling user input devices.

FifeGUI contains implementations of Input for common libraries like SDL. To make FifeGUI usable with other libraries, an Input class must be implemented.

See also
SDLInput

Definition at line 27 of file input.hpp.

Member Function Documentation

◆ _pollInput()

virtual void fcn::Input::_pollInput ( )
pure virtual

Polls all exsisting input.

Called when input should be polled. The function exists for compatibility reason where some libraries need to poll input at a certain logic rate.

Implemented in fcn::GenericInput, and fcn::sdl2::Input.

◆ dequeueKeyInput()

virtual KeyInput fcn::Input::dequeueKeyInput ( )
pure virtual

Dequeues the key input queue.

Returns
The first key input in the key input queue.

Implemented in fcn::GenericInput, and fcn::sdl2::Input.

◆ dequeueMouseInput()

virtual MouseInput fcn::Input::dequeueMouseInput ( )
pure virtual

Dequeues the mouse input queue.

Returns
The first mouse input in the mouse input queue.

Implemented in fcn::GenericInput, and fcn::sdl2::Input.

◆ isKeyQueueEmpty()

virtual bool fcn::Input::isKeyQueueEmpty ( )
pure virtual

Checks if the key queue is empty, or not.

Returns
True if the key queue is empty, false otherwise.

Implemented in fcn::GenericInput, and fcn::sdl2::Input.

◆ isMouseQueueEmpty()

virtual bool fcn::Input::isMouseQueueEmpty ( )
pure virtual

Checks if the mouse queue is empyt, or not.

Returns
True if the mouse queue is empty, false otherwise.

Implemented in fcn::GenericInput, and fcn::sdl2::Input.


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