added: input and its subclasses
This commit is contained in:
21
src/cursor.h
21
src/cursor.h
@ -4,20 +4,25 @@
|
||||
#include <ncurses.h>
|
||||
#include "position.h"
|
||||
|
||||
class cursor{
|
||||
// IMPORTANT: use unique_ptr for cursor because:
|
||||
// 1. Every instance of cursor will initialize a new ncurses screen
|
||||
// Hence you should only have one instance of cursor at a time
|
||||
// Otherwise IDK what'll happen
|
||||
// 2. unique_ptr insures that only one copy of a pre-declared cursor can exist
|
||||
class cursor final {
|
||||
private:
|
||||
public:
|
||||
cursor();
|
||||
cursor();
|
||||
|
||||
~cursor();
|
||||
~cursor();
|
||||
|
||||
int getcmd() const;
|
||||
|
||||
void show() const;
|
||||
int getcmd() const;
|
||||
|
||||
void print_char(const position &pos) const;
|
||||
void show() const;
|
||||
|
||||
void print_str(const position &head, const std::string str) const;
|
||||
void print_char(const position &pos) const;
|
||||
|
||||
void print_str(const position &head, const std::string str) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user