-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathScreen.h
More file actions
43 lines (38 loc) · 915 Bytes
/
Screen.h
File metadata and controls
43 lines (38 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Screen.h, Version 1.2 (14 Mar 2015)
#ifndef SCREEN_H
#define SCREEN_H
#include<ncurses.h>
#include<panel.h>
#include<cstdlib>
#include<cstring>
#include<utility> //for std::pair
#include<string>
#include<stdexcept>
#include<vector>
#include"goldchase.h"
/////
// The Screen class provides a shallow interface to ncurses
/////
class Screen {
private:
int screenHeight;
int screenWidth;
WINDOW* innerWindow;
PANEL* panel;
std::pair<int,int> _getScreenSize();
void _two_second_error(const char* errstr);
public:
enum colorSchemes {
c_gold = 1,
c_error
};
Screen(int h, int w);
~Screen();
void panelRefresh();
void plot(int y, int x, chtype ch, unsigned int attr=A_NORMAL);
void notice(const char* msg);
std::string getText(void);
int getOrdinal(const char* title, const std::vector<int>& nums);
int getKey();
};
#endif //SCREEN_H