262 static void ApplyStyle(
const char *styleName);
267 static void AddLatexSymbol(
const char *symbolName,
const char *symbolTitle);
273 static Int_t
GetIntegerAt(
const char *format, Int_t index,
const char *separator =
";");
274 static Float_t
GetFloatAt(
const char *format, Int_t index,
const char *separator =
";");
276 static Float_t
GetMarkerSize(
const char *style, Int_t index);
278 static Int_t
GetFillColor(
const char *style, Int_t index);
279 static Int_t
GetLineStyle(
const char *style, Int_t index);
280 static Int_t
GetLineColor(
const char *style, Int_t index);
281 static Float_t
GetLineWidth(
const char *style, Int_t index);
283 static void PrintStyles(Option_t *option, TPRegexp ®Exp);
306 static void WriteCSSFile(
TObjArray *cssArray,
const char * outputName, std::fstream *cssOut=
nullptr);
309 static void ApplyCssStyle(TPad *pad,
const char *styleName, Int_t verbose=0);
311 template <
typename T>
312 static void TObjectApplyStyle(
const char* styleName, T *cObj, Int_t objNum=0, Int_t verbose=0);
313 static void TGraphApplyStyle(
const char* styleName, TGraph *cGraph, Int_t objNum=0, Int_t verbose=0);
314 static void TH1ApplyStyle(
const char* styleName, TH1 *cHis, Int_t objNum=0, Int_t verbose=0);
315 static void TF1ApplyStyle(
const char* styleName, TF1 *cFunc, Int_t objNum=0, Int_t verbose=0);
316 static void TLegendApplyStyle(
const char* styleName, TLegend *cLegend, Int_t objNum=0, Int_t verbose=0);
317 static void TPadApplyStyle(
const char* styleName, TPad *cPad, Int_t verbose=0);
321 static void GetIds(TObject *cObj, TString &elementID, TString &classID, TString &objectID, TString &localStyle, Int_t verbose=0);
322 static Float_t
PrepareValue(
const char* styleName, TString propertyName, TString elementID, TString classID, TString objectID, TString localStyle, Bool_t &status, Int_t objNum=0, Int_t verbose=0);
323 static TString
ParseDeclaration(
const char *inputDec,
const char *propertyName);
324 static TString
GetValue(
const char * styleName, TString propertyName, TString elementID, TString classID, TString objectID, TString localStyle=TString(
""), Int_t verbose=0);
325 static Bool_t
IsSelected(TString selectors,
const TString elementID,
const TString classID,
const TString objectID, Int_t verbose=0);
326 static Bool_t
ElementSearch(
const TString selectors,
const TString elementID, Int_t verbose=0);
327 static Bool_t
ClassSearch(
const TString selectors,
const TString classID, Int_t verbose=0);
328 static Bool_t
ObjectSearch(
const TString selectors,
const TString objectID, Int_t verbose=0);
329 static Float_t
GetNamedTypeAt(
const char *inputStr, Bool_t &status, Int_t index=0,
const char *propertyName=
"", Int_t verbose=0,
const char sep=
',',
const char *ignoreBrackets=
"()");
330 static Float_t
ConvertUnit(
const char *inputValues,
const char * option=
"", Int_t verbose=0);
331 static Int_t
ConvertColor(
const char *inputString, Int_t verbose=0);
332 static Float_t
PixelsToFloat_t(
const char *value,
const char *option=
"", Int_t verbose=0);
334 static Int_t
RgbToColor_t(
const char *inputString, Int_t verbose=0);
335 static Int_t
HexToColor_t(
const char *inputString, Int_t verbose=0);
static const TObjArray * GetCssStyle(const char *styleName)
static Float_t PercentToFloat_t(const char *value, Int_t verbose)
converter from percents to float
static void ApplyStyle(const char *styleName)
static Float_t GetFloatAt(const char *format, Int_t index, const char *separator=";")
static Bool_t ElementSearch(const TString selectors, const TString elementID, Int_t verbose=0)
Checks element id in selector.
static const std::vector< int > & GetFillColors(const char *style)
static void TF1ApplyStyle(const char *styleName, TF1 *cFunc, Int_t objNum=0, Int_t verbose=0)
static Bool_t IsSelected(TString selectors, const TString elementID, const TString classID, const TString objectID, Int_t verbose=0)
static std::map< TString, std::vector< int > > fMarkerColors
map of predefined colors arrays
static void TGraphApplyStyle(const char *styleName, TGraph *cGraph, Int_t objNum=0, Int_t verbose=0)
static const std::vector< int > & GetMarkerColors(const char *style)
static void TH1ApplyStyle(const char *styleName, TH1 *cHis, Int_t objNum=0, Int_t verbose=0)
static void RegisterDefaultLatexSymbols()
initialize default LatexSymbols
static Int_t GetFillColor(const char *style, Int_t index)
static Int_t GetIntegerAt(const char *format, Int_t index, const char *separator=";")
static void RegisterDefaultMarkers()
initialize default Markers/Colors
static Int_t GetPadNumber()
static void TCanvasApplyCssStyle(const char *styleName, TCanvas *cCanvas, Int_t verbose=0)
static std::map< TString, std::vector< float > > fLineWidth
map of predefined line width
static TString GetValue(const char *styleName, TString propertyName, TString elementID, TString classID, TString objectID, TString localStyle=TString(""), Int_t verbose=0)
GetValue gets value from css file or local style.
static const TStyle * GetStyle(const char *styleName)
static void SetPadNumber(Int_t num)
static TString ParseDeclaration(const char *inputDec, const char *propertyName)
static TString fDefaultTStyleID
ID of the default TStyle.
static Float_t GetNamedTypeAt(const char *inputStr, Bool_t &status, Int_t index=0, const char *propertyName="", Int_t verbose=0, const char sep=',', const char *ignoreBrackets="()")
static Bool_t ClassSearch(const TString selectors, const TString classID, Int_t verbose=0)
Checks class in selector.
static std::map< TString, std::vector< float > > fLineColor
map of predefined line color
static std::map< TString, std::vector< float > > fLineStyle
map of predefined line style
static Int_t ConvertColor(const char *inputString, Int_t verbose=0)
Defines what format of color user used and call appropriate converter Rules for values: *for rgb we a...
static void AddLatexSymbol(const char *symbolName, const char *symbolTitle)
static const std::vector< float > & GetMarkerSize(const char *style)
static void WriteCSSFile(TObjArray *cssArray, const char *outputName, std::fstream *cssOut=nullptr)
static std::map< TString, std::vector< int > > fMarkerStyles
map of predefined marker styles arrays
static Int_t GetLineColor(const char *style, Int_t index)
static const std::vector< float > & GetLineWidth(const char *style)
static std::map< TString, std::vector< float > > fMarkerSize
map of predefined marker sizes ()
static void RegisterDefaultStyle()
initialize default TStyles
static void SetDefaultStyles(const char *styleName, const char *arrayName)
static void TPadApplyStyle(const char *styleName, TPad *cPad, Int_t verbose=0)
static void SetDefaults()
SetDefault call RegisterDefaultLatexSymbols(), RegisterDefaultStyle(), RegisterDefaultMarkers();.
static Float_t PixelsToFloat_t(const char *value, const char *option="", Int_t verbose=0)
converter from pixels to float Pixels are relative units, it means that we should have something for ...
static void PrintStyles(Option_t *option, TPRegexp ®Exp)
static TObjArray * ReadCSSFile(const char *inputName, TObjArray *array=nullptr, Int_t verbose=0)
static void TObjectApplyStyle(const char *styleName, T *cObj, Int_t objNum=0, Int_t verbose=0)
Common part of TGraphApplyStyle(), TH1ApplyStyle(), TF1ApplyStyle()
static void PrintLatexSymbols(Option_t *option, TPRegexp ®Exp)
static Bool_t ObjectSearch(const TString selectors, const TString objectID, Int_t verbose=0)
static Int_t HexToColor_t(const char *inputString, Int_t verbose=0)
converter from HEX to Int_t (root format of colors)
static Int_t GetLineStyle(const char *style, Int_t index)
static void RegisterCssStyle(const char *styleName, TObjArray *array)
static std::map< TString, TString > fLatexAlice
map of predefined latex symbols - formatted according ALICE rules
static Float_t ConvertUnit(const char *inputValues, const char *option="", Int_t verbose=0)
Defines what units user used and call appropriate converter Rules for values: *for pixels we are usin...
static TString GetLatexAlice(const char *symbol)
static void GetIds(TObject *cObj, TString &elementID, TString &classID, TString &objectID, TString &localStyle, Int_t verbose=0)
Method get IDs from the cObject->GetName() and parse it into input reference. Names of objects should...
static std::map< TString, TObjArray * > fCssStyleAlice
map of Alice predefined styles corresponding to css notation
static std::map< TString, TStyle * > fStyleAlice
map of Alice predefined styles (+user defined)
static void ApplyCssStyle(TPad *pad, const char *styleName, Int_t verbose=0)
Applies style from css to all objects from Pad or Canvas. In case if pad inherited from TCanvas will ...
static TObjArray * ReadCssString(TString cssString, TObjArray *array=nullptr, Int_t verbose=0)
Class to access to drawing styles.
static TString fDefaultArrayStyleID
ID of the default array styles.
static Float_t PrepareValue(const char *styleName, TString propertyName, TString elementID, TString classID, TString objectID, TString localStyle, Bool_t &status, Int_t objNum=0, Int_t verbose=0)
prepares value for applying. This method defines which value user specified (color, unit, number, etc) and return number with appropriate type Returning value will use in Set methods of objects. (TH1.SetMarkerColor(value)).
static Int_t GetMarkerColor(const char *style, Int_t index)
static Int_t GetMarkerStyle(const char *style, Int_t index)
static const std::vector< int > & GetMarkerStyles(const char *style)
static void TLegendApplyStyle(const char *styleName, TLegend *cLegend, Int_t objNum=0, Int_t verbose=0)
static Int_t RgbToColor_t(const char *inputString, Int_t verbose=0)
converter from RGB to Int_t (root format of colors)
static std::map< TString, std::vector< int > > fFillColors
map of predefined fill colors arrays