LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "Colors.h"
Public Member Functions | |
Colors (fhicl::ParameterSet const &p) | |
~Colors () | |
void | reconfigure (fhicl::ParameterSet const &p) |
void | WhiteOnBlack () |
void | BlackOnWhite () |
int | Foreground (int i=0) |
int | Background (int i=0) |
ColorScale & | Scale (const std::string &nm) |
void | do_reconfigure (fhicl::ParameterSet const &pset) |
Private Member Functions | |
void | UnpackColorScale (fhicl::ParameterSet const &p, const std::string &c) |
void | SetStyle () |
Private Attributes | |
int | fFG [kMAX_FGBG] |
Foreground colors. More... | |
int | fBG [kMAX_FGBG] |
std::map< std::string, ColorScale * > | fColorScales |
Static Private Attributes | |
static const int | kMAX_FGBG = 6 |
evdb::Colors::Colors | ( | fhicl::ParameterSet const & | p | ) |
Definition at line 14 of file Colors.cc.
References reconfigure().
evdb::Colors::~Colors | ( | ) |
int evdb::Colors::Background | ( | int | i = 0 | ) |
Return the background color
i | : 0 is highest contrast to foreground color, 5 is least |
Definition at line 136 of file Colors.cc.
References fBG, and kMAX_FGBG.
Referenced by SetStyle().
void evdb::Colors::BlackOnWhite | ( | ) |
Set foreground and background colors for black text on black background
Definition at line 114 of file Colors.cc.
References fBG, fFG, and SetStyle().
Referenced by reconfigure().
|
inlineinherited |
Definition at line 16 of file Reconfigurable.h.
References evdb::Reconfigurable::reconfigure(), and evdb::Reconfigurable::~Reconfigurable().
int evdb::Colors::Foreground | ( | int | i = 0 | ) |
Return the foreground color
i | : 0 is highest contrast to background color, 5 is least |
Definition at line 127 of file Colors.cc.
References fFG, and kMAX_FGBG.
Referenced by SetStyle().
|
virtual |
Implements evdb::Reconfigurable.
Definition at line 32 of file Colors.cc.
References BlackOnWhite(), fhicl::ParameterSet::get(), UnpackColorScale(), and WhiteOnBlack().
Referenced by Colors().
ColorScale & evdb::Colors::Scale | ( | const std::string & | nm | ) |
|
private |
Push the colors off to the ROOT style
Definition at line 145 of file Colors.cc.
References Background(), and Foreground().
Referenced by BlackOnWhite(), and WhiteOnBlack().
|
private |
Unpack the parameters for a named color scale
Definition at line 47 of file Colors.cc.
References fColorScales, fhicl::ParameterSet::get(), n, evdb::ColorScale::Palette(), r, scale, and evdb::ColorScale::Scale().
Referenced by reconfigure().
void evdb::Colors::WhiteOnBlack | ( | ) |
Set foreground and background colors for white text on black background
Definition at line 101 of file Colors.cc.
References fBG, fFG, and SetStyle().
Referenced by reconfigure().
|
private |
Background colors
Definition at line 73 of file Colors.h.
Referenced by Background(), BlackOnWhite(), and WhiteOnBlack().
|
private |
Collection of color scales managed by this class
Definition at line 77 of file Colors.h.
Referenced by Scale(), UnpackColorScale(), and ~Colors().
|
private |
Foreground colors.
Definition at line 72 of file Colors.h.
Referenced by BlackOnWhite(), Foreground(), and WhiteOnBlack().
|
staticprivate |
Definition at line 71 of file Colors.h.
Referenced by Background(), and Foreground().