-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwinsys.h
More file actions
78 lines (62 loc) · 1.29 KB
/
Copy pathwinsys.h
File metadata and controls
78 lines (62 loc) · 1.29 KB
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
75
76
77
78
#ifndef __WINSYS_H__
#define __WINSYS_H__
#include "cpoint.h"
#include <list>
#include <string>
//#include <ctype.h>
//#include <stdarg.h>
using namespace std;
class CView
{
protected:
CRect geom;
public:
CView(CRect g) : geom(g) {}
virtual ~CView() {}
virtual void paint () = 0;
virtual bool handleEvent (int key) = 0;
virtual void move (const CPoint & delta);
};
class CWindow:public CView //CWindow <- CView
{
protected:
char c;
public:
CWindow(CRect r, char _c = '*') : CView(r), c(_c) {}
void paint();
bool handleEvent(int key);
};
class CFramedWindow:public CWindow //CFramedWindow <- CWindow <- CView
{
public:
CFramedWindow(CRect r, char _c = '\'') : CWindow(r, _c) {}
void paint();
};
class CInputLine:public CFramedWindow // CInputLine <- CFramedWindow <- CWindow <- CView
{
string text;
public:
CInputLine(CRect r, char _c = ',') : CFramedWindow(r, _c) {} //catchy
void paint();
bool handleEvent(int c);
};
class CGroup:public CView //CGroup <- CView
{
list< CView * > children;
public:
CGroup(CRect g) : CView(g) {}
~CGroup();
void paint();
bool handleEvent(int key);
void insert(CView * v);
};
class CDesktop:public CGroup //CDesktop <- CGroup <- CView
{
public:
CDesktop();
~CDesktop();
void paint();
int getEvent();
void run();
};
#endif