48 lines
1.4 KiB
C++
48 lines
1.4 KiB
C++
#ifndef CURSOR_H__
|
|
#define CURSOR_H__
|
|
|
|
/* *******************************************************************
|
|
* Includes
|
|
* ******************************************************************/
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
/* *******************************************************************
|
|
* Defines
|
|
* ******************************************************************/
|
|
|
|
/* *******************************************************************
|
|
* Global types definition
|
|
* ******************************************************************/
|
|
|
|
/* *******************************************************************
|
|
* Global variables declaration
|
|
* ******************************************************************/
|
|
|
|
/* *******************************************************************
|
|
* Global functions declaration
|
|
* ******************************************************************/
|
|
|
|
/* *******************************************************************
|
|
* Class definition
|
|
* ******************************************************************/
|
|
|
|
class Cursor
|
|
{
|
|
public:
|
|
explicit Cursor(void);
|
|
void move(const int8_t x = 0, const int8_t y = 0);
|
|
uint8_t getX(void);
|
|
uint8_t getY(void);
|
|
bool isXCentered(void);
|
|
bool isYCentered(void);
|
|
|
|
private:
|
|
uint8_t _x;
|
|
uint8_t _y;
|
|
};
|
|
|
|
#endif /* CURSOR_H__ */
|
|
|