This repository has been archived by the owner on Aug 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
107 lines (81 loc) · 2.53 KB
/
main.cpp
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
99
100
101
102
103
104
105
106
107
#include "list.h"
char vi = 'c';
//Linked list structure allows for fully dynamic capability
//You can insert & delete between individual tabs as well as tablines, and also
//easily edit tabs and tablines
/* Goal Queue
Implement DLL for printing last 7 (or fewer) tablines (fixes spacing issues);
Implement Enter/Backspace for adding empty spaces and deleting columns respectively.
Implement Arrow keys to move the view of the 7 tablines (assuming there are more than 7)
Implement editing system for lines
Implement editing system for tablines
Implement Tab cut off after 150 chars
Implement repeat feature
Fix bugs that occur when you enter non digits
Take care of Memory Leaks
Implement File input
Implement error checking for incorrect strings
Implement common chord patterns as a single command(G, C, E, etc..)
Implement a feature that allows users to define their own custom chords.
Implement a robust title screen
*/
//Each line will be 150 spaces long bookended with |
void printtitle(){
// printw("%s", "WELCOME TO ");
printw("%s", " _ _____ _____ _ _ _____ _ _ _____ _ _ _____ _____ ___ ______ \n");
printw("%s", "| | |_ _| __ \\| | | |_ _| \\ | |_ _| \\ | | __ \\ |_ _/ _ \\ | ___ \\ \n");
printw("%s", "| | | | | | \\/| |_| | | | | \\| | | | | \\| | | \\/ | |/ /_\\ \\| |_/ / \n");
printw("%s", "| | | | | | __ | _ | | | | . ` | | | | . ` | | __ | || _ || ___ \\ \n");
printw("%s", "| |_____| |_| |_\\ \\| | | | | | | |\\ |_| |_| |\\ | |_\\ \\ | || | | || |_/ / \n");
printw("%s", "\\_____/\\___/ \\____/\\_| |_/ \\_/ \\_| \\_/\\___/\\_| \\_/\\____/ \\_/\\_| |_/\\____/ \n\n");
printw("%s", "PRESS ENTER TO CONTINUE\n");
}
int main()
{
initscr();
(void)echo();
char test[100];
megaList meg;
for(int i=0;i<100;i++){
test[i] = '$';
}
keypad(stdscr, TRUE);
//addstr( "lightningTab> " );
printtitle();
getnstr(test, sizeof( test ) -1);
meg.fileInsert();
while(true){
clear();
refresh();
meg.insert(test, false);
remove( "output.txt" );
meg.print();
refresh();
if(vi == 'i')
addstr( "lightningTab[I]> " );
else
addstr( "lightningTab[V]> " );
for(int i=0;i<100;i++){
test[i] = '$';
}
switch(vi){
case 'i':
getnstr(test, sizeof( test ) -1);
break;
case 'c':
int input = getch();
if(input == 'i')
vi = 'i';
if(input == 'd')
meg.deleteSingle();
if(input == 'j')
meg.shiftDown();
if(input == 'k')
meg.shiftUp();
break;
}
Dash = true;
}
endwin();
return 0;
}