Logo ROOT   6.12/07
Reference Guide
List of all members | Public Member Functions | Static Public Member Functions | List of all members
ROOT::Experimental::TDrawingOptsBase< DERIVED > Class Template Reference

template<class DERIVED>
class ROOT::Experimental::TDrawingOptsBase< DERIVED >

Base class for drawing options.

Implements access to the default and the default's initialization from a config file.

Drawing options are made up of three kinds of primitives:

In derived classes (e.g. drawing options for the class MyFancyBox), declare attribute members as TDrawingAttrRef<TColor> fLineColor{*this, "MyFancyBoxLineColor", kRed}; The attribute's initial value will be taken from the current style or, if that has no setting for the attribute, from the argument passed to the constructor (kRed in the example above).

Definition at line 183 of file TDrawingOptsBase.hxx.

Public Member Functions

 TDrawingOptsBase ()=default
 
 TDrawingOptsBase (TPadBase &pad, std::string_view name)
 Construct from the pad that holds our TDrawable. More...
 
void Apply (const DERIVED &other)
 Apply the given options to this option set. More...
 
- Public Member Functions inherited from ROOT::Experimental::TDrawingOptsBaseNoDefault
 TDrawingOptsBaseNoDefault ()=default
 
 TDrawingOptsBaseNoDefault (const TDrawingOptsBaseNoDefault &other)
 
 TDrawingOptsBaseNoDefault (TDrawingOptsBaseNoDefault &&other)=default
 
 ~TDrawingOptsBaseNoDefault ()
 
template<class PRIMITIVE >
PRIMITIVE & Get (TDrawingAttrRef< PRIMITIVE > ref)
 Access to the attribute (non-const version). More...
 
template<class PRIMITIVE >
const PRIMITIVE & Get (TDrawingAttrRef< PRIMITIVE > ref) const
 Access to the attribute (const version). More...
 

Static Public Member Functions

static DERIVED & Default ()
 Retrieve the default drawing options for DERIVED. More...
 
static DERIVED GetDefaultForStyle (const TStyle &style)
 Retrieve the default drawing options for the given style. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ROOT::Experimental::TDrawingOptsBaseNoDefault
 TDrawingOptsBaseNoDefault (TPadBase &pad, std::string_view name)
 Construct from the pad that holds our TDrawable. More...
 
TCanvasGetCanvas ()
 The TCanvas holding the TDrawable (or its TPad) (non-const version). More...
 
const TCanvasGetCanvas () const
 The TCanvas holding the TDrawable (or its TPad) (const version). More...
 
const std::string & GetName () const
 Get the (style config) name of this option set. More...
 
template<class PRIMITIVE >
TDrawingAttrRef< PRIMITIVE > Register (const PRIMITIVE &val)
 
template<class PRIMITIVE >
TDrawingAttrRef< PRIMITIVE > SameAs (TDrawingAttrRef< PRIMITIVE > idx)
 
template<class PRIMITIVE >
TDrawingAttrRef< PRIMITIVE > SameAs (const PRIMITIVE &val)
 
template<class PRIMITIVE >
void Update (TDrawingAttrRef< PRIMITIVE > idx, const PRIMITIVE &val)
 
- Static Protected Member Functions inherited from ROOT::Experimental::TDrawingOptsBaseNoDefault
static TPadBaseGetDefaultCanvas (const TStyle &style)
 Default attributes need to register their values in a pad - they will take this pad for default attributes of a style, as identified by the style's name. More...
 
static bool IsDefaultCanvas (const TPadBase &canv)
 Whether the canvas is one of the canvases used to store attribute defaults. More...
 

#include <ROOT/TDrawingOptsBase.hxx>

Inheritance diagram for ROOT::Experimental::TDrawingOptsBase< DERIVED >:
[legend]

Constructor & Destructor Documentation

◆ TDrawingOptsBase() [1/2]

template<class DERIVED>
ROOT::Experimental::TDrawingOptsBase< DERIVED >::TDrawingOptsBase ( )
default

◆ TDrawingOptsBase() [2/2]

template<class DERIVED>
ROOT::Experimental::TDrawingOptsBase< DERIVED >::TDrawingOptsBase ( TPadBase pad,
std::string_view  name 
)
inline

Construct from the pad that holds our TDrawable.

Definition at line 187 of file TDrawingOptsBase.hxx.

Member Function Documentation

◆ Apply()

template<class DERIVED>
void ROOT::Experimental::TDrawingOptsBase< DERIVED >::Apply ( const DERIVED &  other)
inline

Apply the given options to this option set.

Definition at line 195 of file TDrawingOptsBase.hxx.

◆ Default()

template<class DERIVED>
static DERIVED& ROOT::Experimental::TDrawingOptsBase< DERIVED >::Default ( )
inlinestatic

Retrieve the default drawing options for DERIVED.

Can be used to query and adjust the default options.

Definition at line 207 of file TDrawingOptsBase.hxx.

◆ GetDefaultForStyle()

template<class DERIVED>
static DERIVED ROOT::Experimental::TDrawingOptsBase< DERIVED >::GetDefaultForStyle ( const TStyle style)
inlinestatic

Retrieve the default drawing options for the given style.

Definition at line 200 of file TDrawingOptsBase.hxx.

Libraries for ROOT::Experimental::TDrawingOptsBase< DERIVED >:
[legend]

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