25#include <unordered_map>
28namespace Experimental {
37 using Attrs_t = std::unordered_map<std::string, std::string>;
62 std::string
GetAttribute(
const std::string &attrName,
const std::string &className = {})
const;
A set of defaults for graphics attributes, e.g.
RStyle(std::string_view name)
Creates a named but empty style.
static RStyle & Register(RStyle &&style)
Move-register style in the global style collection, possibly replacing a global style with the same n...
static RStyle & GetCurrent()
Get the current RStyle.
RStyle()=default
Default constructor, creating an unnamed, empty style.
static RStyle * Get(std::string_view name)
Get the RStyle named name from the global style collection, or nullptr if that doesn't exist.
std::string fName
Mapping of user coordinates to normal coordinates.
static void SetCurrent(const RStyle &style)
Set the current RStyle by copying style into the static current style object.
std::unordered_map< std::string, std::string > Attrs_t
A map of attribute name to string attribute values/.
RStyle(std::string_view name, Attrs_t &&attrs)
Constructor taking the style name and a set of attributes (e.g. read from the config files).
std::string GetAttribute(const std::string &attrName, const std::string &className={}) const
Get the style value as a string, given an attribute name.
const std::string & GetName() const
Get this stryle's name. (No setter as that would upset the unordered_map.)
basic_string_view< char > string_view
Namespace for new ROOT classes and functions.