-
Notifications
You must be signed in to change notification settings - Fork 0
/
screen.h
74 lines (57 loc) · 1.24 KB
/
screen.h
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//*****************************************************************************
//
// Copyright (C) 2005 Steve Connet. All rights reserved.
//
// Source File Name : Screen.h
// Author : Steve Connet
//
// File Overview : Handle the screen GUI
//
//*****************************************************************************
#ifndef _SCREEN_H_
#define _SCREEN_H_
#include "docwindow.h"
class Screen
{
public:
Screen();
~Screen();
inline operator WINDOW *() const
{
return win;
}
void paint();
void resize();
void nextWin();
void prevWin();
DocWindow::DOCTYPE activeWin() const
{
return active.wintype;
}
Window *getActive() const
{
return active.win;
}
private:
// keep track of the active window
struct Active
{
Active() : win(NULL), count(0) {}
Window *win;
DocWindow::DOCTYPE wintype;
unsigned int count;
};
Active active;
void switchWin();
WINDOW *win; // ncurses window struct
DocWindow *winBook;
DocWindow *winPage;
DocWindow *winText;
int height;
int width;
int half_width;
int half_height;
std::string menu;
std::string status;
};
#endif // _SCREEN_H_