16 #ifndef ROOT7_TDrawingOptsBase 17 #define ROOT7_TDrawingOptsBase 30 namespace Experimental {
55 template <
class PRIMITIVE>
137 template <
class PRIMITIVE>
143 template <
class PRIMITIVE>
149 template <
class PRIMITIVE>
155 template <
class PRIMITIVE>
161 template <
class PRIMITIVE>
171 template <
class PRIMITIVE>
174 template <
class PRIMITIVE>
182 template <
class DERIVED>
196 static_cast<DERIVED&
>(*this) = other;
OptsAttrRefArr< TColor > & GetAttrsRefArr(TColor *)
Access to the attribute tables (non-const version).
const OptsAttrRefArr< long long > & GetAttrsRefArr(long long *) const
std::vector< TDrawingAttrRef< PRIMITIVE > > fRefArray
Indexes of the TCanvas's attribute table entries used by the options object.
basic_string_view< char > string_view
Namespace for new ROOT classes and functions.
const PRIMITIVE & Get(TDrawingAttrRef< PRIMITIVE > ref) const
Access to the attribute (const version).
TDrawingOptsBaseNoDefault()=default
A window's topmost TPad.
TDrawingOptsBase(TPadBase &pad, std::string_view name)
Construct from the pad that holds our TDrawable.
Base class for drawing options.
static DERIVED GetDefaultForStyle(const TStyle &style)
Retrieve the default drawing options for the given style.
TDrawingAttrRef< PRIMITIVE > SameAs(const PRIMITIVE &val)
TCanvas * fCanvas
The TCanvas holding the TDrawable (or its TPad).
A set of defaults for graphics attributes, e.g.
const OptsAttrRefArr< TColor > & GetAttrsRefArr(TColor *) const
Access to the attribute tables (const version).
TDrawingAttrRef< PRIMITIVE > SameAs(TDrawingAttrRef< PRIMITIVE > idx)
OptsAttrRefArr< TColor > fColorIdx
Indexes of the TCanvas's color table entries used by this options object.
~TDrawingOptsBaseNoDefault()
static TStyle & GetCurrent()
Get the current TStyle.
OptsAttrRefArr< double > & GetAttrsRefArr(double *)
void RegisterCopy(TCanvas &canv)
Once copied, elements of a OptsAttrRefArr need to increase their use count.
Base class for graphic containers for TDrawable-s.
OptsAttrRefArr< long long > fIntIdx
Indexes of the TCanvas's integer table entries used by this options object.
OptsAttrRefArr< long long > & GetAttrsRefArr(long long *)
const PRIMITIVE & Get(TCanvas &canv, TDrawingAttrRef< PRIMITIVE > idx) const
Access to attribute (const version).
void Update(TCanvas &canv, TDrawingAttrRef< PRIMITIVE > idx, const PRIMITIVE &val)
Update the attribute at index idx to the value val.
TCanvas & GetCanvas()
The TCanvas holding the TDrawable (or its TPad) (non-const version).
PRIMITIVE & Get(TDrawingAttrRef< PRIMITIVE > ref)
Access to the attribute (non-const version).
static bool IsDefaultCanvas(const TPadBase &canv)
Whether the canvas is one of the canvases used to store attribute defaults.
void Release(TCanvas &canv)
Clear all attribute references, removing their uses in TCanvas.
const TCanvas & GetCanvas() const
The TCanvas holding the TDrawable (or its TPad) (const version).
const std::string & GetName() const
Get the (style config) name of this option set.
std::string fName
Name of these drawing options, e.g.
void Update(TDrawingAttrRef< PRIMITIVE > idx, const PRIMITIVE &val)
TDrawingAttrRef< PRIMITIVE > Register(const PRIMITIVE &val)
The TCanvas keep track of TColors, integer and floating point attributes used by the drawing options...
static TPadBase & GetDefaultCanvas(const TStyle &style)
Default attributes need to register their values in a pad - they will take this pad for default attri...
TDrawingAttrRef< PRIMITIVE > Register(TCanvas &canv, const PRIMITIVE &val)
Register an attribute.
OptsAttrRefArr< double > fFPIdx
Indexes of the TCanvas's floating point table entries used by this options object.
A color: Red|Green|Blue|Alpha, or a position in a TPalette.
static DERIVED & Default()
Retrieve the default drawing options for DERIVED.
const OptsAttrRefArr< double > & GetAttrsRefArr(double *) const
TDrawingAttrRef< PRIMITIVE > SameAs(TCanvas &canv, TDrawingAttrRef< PRIMITIVE > idx)
Re-use an existing attribute.
void Apply(const DERIVED &other)
Apply the given options to this option set.