fixed output not found
This commit is contained in:
35
src/output.h
Normal file
35
src/output.h
Normal file
@ -0,0 +1,35 @@
|
||||
#ifndef __DISPLAY_H__
|
||||
#define __DISPLAY_H__
|
||||
|
||||
#include <ncurses.h>
|
||||
#include <vector>
|
||||
#include "position.h"
|
||||
#include "cursor.h"
|
||||
|
||||
class output {
|
||||
protected:
|
||||
// use an array of ints to keep track of what's on the screen
|
||||
// This will have a bit of buffer for the last line
|
||||
// just in case it overflows
|
||||
std::vector<int> contents;
|
||||
public:
|
||||
output();
|
||||
|
||||
virtual ~output() = default;
|
||||
|
||||
// Only call this to refresh the entire output
|
||||
virtual void render() = 0;
|
||||
|
||||
// Clears the contents buffer
|
||||
virtual void clear();
|
||||
|
||||
virtual void print_char(const position &pos, const char ch,
|
||||
const int attrs =
|
||||
A_NORMAL | COLOR_PAIR(COLOR_WHITE)) = 0;
|
||||
virtual void print_str(const position &pos, const std::string &str,
|
||||
const int attrs =
|
||||
A_NORMAL | COLOR_PAIR(COLOR_WHITE)) = 0;
|
||||
// default arguments are to be set in the base class's declaration
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user