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
|
#ifndef COLORMANAGER_H_
#define COLORMANAGER_H_
#include <configparser.h>
#include <vector>
#include <map>
namespace podbeuter {
class pb_view;
}
class view;
namespace newsbeuter {
class colormanager : public config_action_handler {
public:
colormanager();
~colormanager();
void register_commands(configparser& cfgparser);
virtual void handle_action(const std::string& action, const std::vector<std::string>& params);
virtual void dump_config(std::vector<std::string>& config_output);
inline bool colors_loaded() {
return colors_loaded_;
}
void set_pb_colors(podbeuter::pb_view * v);
inline std::map<std::string,std::string>& get_fgcolors() {
return fg_colors;
}
inline std::map<std::string,std::string>& get_bgcolors() {
return bg_colors;
}
inline std::map<std::string,std::vector<std::string>>& get_attributes() {
return attributes;
}
private:
bool colors_loaded_;
std::map<std::string,std::string> fg_colors;
std::map<std::string,std::string> bg_colors;
std::map<std::string,std::vector<std::string>> attributes;
};
}
#endif
|