forked from newsboat/newsboat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
colormanager.h
44 lines (34 loc) · 908 Bytes
/
colormanager.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
#ifndef NEWSBOAT_COLORMANAGER_H_
#define NEWSBOAT_COLORMANAGER_H_
#include <map>
#include <vector>
#include "configparser.h"
#include "stflpp.h"
namespace podboat {
class PbView;
}
class View;
namespace newsboat {
struct TextStyle {
std::string fg_color;
std::string bg_color;
std::vector<std::string> attributes;
};
class ColorManager : public ConfigActionHandler {
public:
ColorManager();
~ColorManager() override;
void register_commands(ConfigParser& cfgparser);
void handle_action(const std::string& action,
const std::vector<std::string>& params) override;
void dump_config(std::vector<std::string>& config_output) const override;
void apply_colors(Stfl::Form& form) const;
std::map<std::string, TextStyle> get_styles() const
{
return element_styles;
}
private:
std::map<std::string, TextStyle> element_styles;
};
} // namespace newsboat
#endif /* NEWSBOAT_COLORMANAGER_H_ */