16 #ifndef ROOT7_TDrawingOptsReader 17 #define ROOT7_TDrawingOptsReader 23 #include <unordered_map> 27 namespace Experimental {
35 using Attrs_t = std::unordered_map<std::string, std::string>;
long long ParseInt(std::string_view attr, long long deflt, std::vector< std::string_view > opts={})
Parse an integer attribute, or if opts is given, return the index of the string from the options file...
basic_string_view< char > string_view
Namespace for new ROOT classes and functions.
Attrs_t & fAttrs
Attributes to operate on.
TColor Parse(std::string_view attr, const TColor &deflt, std::vector< std::string_view >={})
Convenience overloads:
double Parse(std::string_view attr, double deflt, std::vector< std::string_view >={})
bool AddFromStyleFile(std::string_view filename)
Adds attributes specified in filename to those already existing in fAttrs.
TColor ParseColor(std::string_view attr, const TColor &deflt)
Parse a TColor from attr's value.
std::unordered_map< std::string, std::string > Attrs_t
TDrawingOptsReader(Attrs_t &attrs)
static Attrs_t ReadDefaults()
Reads the attribute config values from .rootstylerc.
double ParseFP(std::string_view attr, double deflt)
Parse a floating point attribute.
A color: Red|Green|Blue|Alpha, or a position in a TPalette.
long long Parse(std::string_view attr, long long deflt, std::vector< std::string_view > opts={})