-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.hpp
98 lines (84 loc) · 1.79 KB
/
Main.hpp
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#pragma once
#ifndef Main_H
#define Main_H
#define TIME_TO_SLEEP 100
// include
#include <termios.h>
#include <cstdlib>
#include <fcntl.h>
#include <iostream>
#include <string>
#include <vector>
#include <unistd.h>
#include <sys/ioctl.h>
#include <signal.h>
#include <stdlib.h>
#include <thread>
#include <fstream>
#include <stdio.h>
#include <regex>
class EditWindow {
std::vector<std::string> putStrings;
public:
int w;
int h;
int cursX;
int cursY;
std::string drawData;
std::string drawCommand;
std::string drawOutCommand;
std::vector<std::string> drawingData;
void drawDataLine();
void drawCommandLine();
void drawOutCommandLine();
void drawWindow();
void colorScheme(std::string fileStrS, int num);
};
class Io {
std::string openData;
};
class Command {
public:
std::vector<std::string>command;
std::vector<std::string>commandHistroy;
std::string inputCommand;
std::string runCommand();
};
class MainWindow {
public:
EditWindow ew;
Command cd;
EditWindow *editWindow = &ew;
Command *command = &cd;
std::string openFileName;
void MainInit();
void Main();
void clear();
};
int getche(void);
int getch(void);
int kbhit(void);
inline std::vector<std::string> fileData;
inline int lineNum;
inline int mode;
inline int cX;
inline int cY;
inline std::string openFileName;
inline int bestLine;
inline int fileDataC;
inline int newC;
inline int backC;
inline int cursC;
inline int typeC;
inline int textC;
inline int nomalC;
inline int commandC;
inline int numC;
inline int charC;
inline int loopC;
inline int symbolbracketC;
inline int reservC;
inline int strC;
inline int ifC;
inline int FC;
#endif