-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscreen.hh
43 lines (38 loc) · 881 Bytes
/
screen.hh
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
#ifndef SCREEN_H
#define SCREEN_H
#include<ncurses.h>
#include<vector>
#include<map>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<string>
#include<sstream>
class Screen{
public:
Screen();
~Screen();
void addAList(std::vector<std::string> al); // available sensors
void addSList(std::vector<std::string> sl); // subscribed sensors
std::vector<std::string> getSList();
std::vector<std::string> getUList();
std::vector<std::string> getPList();
WINDOW * getIPWin();
void moveWinUp();
void moveWinDown();
void toggle();
void switchtab();
void status(const char []);
private:
// data
WINDOW * top,* hdr0,* hdr1,* opt[2],* bottom;
size_t win[2];
size_t cur[2];
size_t tab;
std::map<std::string,bool> sensors[2];
// functions
void showTop();
void showHeader();
void showOption();
};
#endif