-
Notifications
You must be signed in to change notification settings - Fork 0
/
keyaction.h
46 lines (37 loc) · 968 Bytes
/
keyaction.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
#ifndef KEYACTION_H
#define KEYACTION_H
#include "screenstate.h"
class KeyAction {
public:
virtual ~KeyAction() {}
virtual const char *Name() = 0;
virtual void Perform(PmcContext &pmc, ScreenState &state) = 0;
};
class QuitAction : public KeyAction {
public:
virtual const char *Name();
virtual void Perform(PmcContext &pmc, ScreenState &state);
};
class PerCpuAction : public KeyAction {
public:
virtual const char *Name();
virtual void Perform(PmcContext &pmc, ScreenState &state);
};
class ChoosePageAction : public KeyAction {
private:
int pageIndex;
std::string actionName;
public:
ChoosePageAction(int index, const std::string &pageName);
virtual const char *Name();
virtual void Perform(PmcContext &pmc, ScreenState &state);
};
class IncrementPageAction : public KeyAction {
private:
int increment;
public:
IncrementPageAction(int incr);
virtual const char *Name();
virtual void Perform(PmcContext &pmc, ScreenState &state);
};
#endif