Logo ROOT   6.12/06
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
ROOT::Experimental::TStyle Class Reference

A set of defaults for graphics attributes, e.g.

for histogram fill color, line width, frame offsets etc.

Definition at line 34 of file TStyle.hxx.

Public Types

using AllAttrs_t = std::tuple< Attrs_t< TColor >, Attrs_t< long long >, Attrs_t< double >>
 
template<class PRIMITIVE >
using Attrs_t = std::unordered_map< std::string, PRIMITIVE >
 A map of attribute name to attribute value for an attribute type PRIMITIVE. More...
 

Public Member Functions

 TStyle ()=default
 Default constructor, creating an unnamed, empty style. More...
 
 TStyle (std::string_view name)
 Creates a named but empty style. More...
 
 TStyle (std::string_view name, AllAttrs_t &&attrs)
 Constructor taking user coordinate system, position and extent. More...
 
const std::string & GetName () const
 

Static Public Member Functions

static TStyle * Get (std::string_view name)
 Get the TStyle named name from the global style collection, or nullptr if that doesn't exist. More...
 
static TStyle & GetCurrent ()
 Get the current TStyle. More...
 
static void Register (const TStyle &style)
 Register a copy of style in the global style collection, possibly replacing a global style with the same name. More...
 
static void SetCurrent (const TStyle &style)
 Set the current TStyle by copying style into the static current style object. More...
 

Private Attributes

AllAttrs_t fAttrs
 
std::string fName
 Mapping of user coordinates to normal coordinates. More...
 

#include <ROOT/TStyle.hxx>

Member Typedef Documentation

using ROOT::Experimental::TStyle::AllAttrs_t = std::tuple<Attrs_t<TColor>, Attrs_t<long long>, Attrs_t<double>>

Definition at line 38 of file TStyle.hxx.

template<class PRIMITIVE >
using ROOT::Experimental::TStyle::Attrs_t = std::unordered_map<std::string, PRIMITIVE>

A map of attribute name to attribute value for an attribute type PRIMITIVE.

Definition at line 37 of file TStyle.hxx.

Constructor & Destructor Documentation

ROOT::Experimental::TStyle::TStyle ( )
default

Default constructor, creating an unnamed, empty style.

ROOT::Experimental::TStyle::TStyle ( std::string_view  name)
inlineexplicit

Creates a named but empty style.

Definition at line 50 of file TStyle.hxx.

ROOT::Experimental::TStyle::TStyle ( std::string_view  name,
AllAttrs_t &&  attrs 
)
inline

Constructor taking user coordinate system, position and extent.

Definition at line 53 of file TStyle.hxx.

Member Function Documentation

TStyle * TStyle::Get ( std::string_view  name)
static

Get the TStyle named name from the global style collection, or nullptr if that doesn't exist.

Definition at line 46 of file TStyle.cxx.

TStyle & TStyle::GetCurrent ( )
static

Get the current TStyle.

Definition at line 72 of file TStyle.cxx.

const std::string& ROOT::Experimental::TStyle::GetName ( ) const
inline

Definition at line 55 of file TStyle.hxx.

void TStyle::Register ( const TStyle &  style)
static

Register a copy of style in the global style collection, possibly replacing a global style with the same name.

Definition at line 41 of file TStyle.cxx.

static void ROOT::Experimental::TStyle::SetCurrent ( const TStyle &  style)
inlinestatic

Set the current TStyle by copying style into the static current style object.

Definition at line 67 of file TStyle.hxx.

Member Data Documentation

AllAttrs_t ROOT::Experimental::TStyle::fAttrs
private

Definition at line 43 of file TStyle.hxx.

std::string ROOT::Experimental::TStyle::fName
private

Mapping of user coordinates to normal coordinates.

Definition at line 42 of file TStyle.hxx.

Libraries for ROOT::Experimental::TStyle:
[legend]

The documentation for this class was generated from the following files: