-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLaptopDisplay.h
65 lines (55 loc) · 1.24 KB
/
LaptopDisplay.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
#pragma once
#include <fstream>
#include <vector>
#include <conio.h>
#include <cmath>
#include <Windows.h>
#include "Laptop.h"
#define KEY_UP 72
#define KEY_DOWN 80
#define KEY_LEFT 75
#define KEY_RIGHT 77
#define KEY_ESC 27
#define KEY_ENTER 13
#define KEY_DELETE 83
class LaptopDisplay {
private:
vector<Laptop> _laptopList;
int _numOfPages;
int _numOfItems;
int _curPage;
int _itemsInPage;
string _nameBuf;
int _priceBuf;
Laptop _laptopBuf;
string _productFile = "Test Products.txt";
//string _productFile = "All Products.txt";
public:
LaptopDisplay();
void addLaptopList();
void outputLaptopList();
//void manipulateFile();
//void laptopFile();
//void printLaptopFile();
string outputOneProduct(int index);
public:
void gotoXY(int x, int y);
void changeColor(int color);
void testLaptopList();
int selectFunction(int& y);
void selectMenu(int y, int color);
void displayMenu();
void interactiveMenu();
int selectProduct(int &y);
void selectProductMenu(int y, int color);
void displayProduct();
void interactiveProductMenu();
//int getNumOfItems();
void nextPage();
void previouPage();
void addProduct();
void editProduct(int index);
void deleteProductById();
void deleteProductOnList(int index);
void exitMessage();
};