added: input and its subclasses

This commit is contained in:
2024-07-04 22:47:25 -04:00
parent c67dbcc62a
commit f5b5f180a0
9 changed files with 245 additions and 18 deletions

View File

@ -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