blob: 04ed7076c5cfdc1a0f3ef8afc59c84aab4e79ec7 (
plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
|
#ifndef CURSES_H
#define CURSES_H
#include "attributes.h"
#include "incl.h"
#include "color.h"
#include "cursor.h"
#include "menu.h"
#include "pwindow.h"
#include "tool.h"
#include "window.h"
#include "coordinate.h"
using namespace std;
/* This class is representing the base of curses, it has to be instantiated
* in order to use curses.
*/
class curses
{
private:
static int i_self_counter;
public:
/* Initializes curses before its first use */
curses();
/* Removes all curses elements, all objects (such as window, color etc)
* be finished as well!
*/
~curses();
/* Waits for user intput and returns the ASCII code being typed */
static int get_char();
/* Returns the string being typed until the first return */
static string get_string();
/* Waits intil the user hits a key */
static void pause();
static void disable();
static void enable();
/* Removes all curses elements, all objects (such as window, color etc) will
* be finished as well! This method will be called by ~curses internally.
* You can also use this method instead of the destructor if you wanna use
* another shutdown routine like catching SIGINT first, deleting your own
* stuff, and then running curses::finish();!
*/
static void finish();
static void clear();
};
#endif
|