#ifndef NEWSBOAT_COLORMANAGER_H_ #define NEWSBOAT_COLORMANAGER_H_ #include #include #include #include "configactionhandler.h" namespace podboat { class PbView; } class View; namespace newsboat { class ConfigParser; struct TextStyle { std::string fg_color; std::string bg_color; std::vector attributes; }; class ColorManager : public ConfigActionHandler { public: ColorManager(); ~ColorManager() override; void register_commands(ConfigParser& cfgparser); void handle_action(const std::string& action, const std::vector& params) override; void dump_config(std::vector& config_output) const override; void apply_colors(std::function stfl_value_setter) const; private: void emit_fallback_from_to(const std::string& from_element, const std::string& to_element, const std::function& stfl_value_setter) const; std::map element_styles; }; } // namespace newsboat #endif /* NEWSBOAT_COLORMANAGER_H_ */