Logo ROOT   6.14/05
Reference Guide
List of all members | Public Member Functions | Private Attributes | Friends | List of all members
ROOT::Experimental::TPad Class Reference

Graphic container for TDrawable-s.

Definition at line 182 of file TPad.hxx.

Public Member Functions

 TPad ()=default
 Create a topmost, non-paintable pad. More...
 
 TPad (TPadBase &parent, const TPadExtent &size)
 Create a child pad. More...
 
virtual ~TPad ()
 Destructor to have a vtable. More...
 
const TCanvasGetCanvas () const override
 Access to the top-most canvas (const version). More...
 
TCanvasGetCanvas () override
 Access to the top-most canvas (non-const version). More...
 
const TPadBaseGetParent () const
 Access to the parent pad (const version). More...
 
TPadBaseGetParent ()
 Access to the parent pad (non-const version). More...
 
const TPadExtentGetSize () const
 Get the size of the pad in parent (!) coordinates. More...
 
std::array< TPadLength::Normal, 2 > PixelsToNormal (const std::array< TPadLength::Pixel, 2 > &pos) const override
 Convert a Pixel position to Canvas-normalized positions. More...
 
std::array< TPadLength::Normal, 2 > ToNormal (const Internal::TPadHorizVert &pos) const
 Convert a TPadPos to [x, y] of normalized coordinates. More...
 
- Public Member Functions inherited from ROOT::Experimental::TPadBase
virtual ~TPadBase ()
 
void CreateFrameIfNeeded ()
 
std::vector< std::vector< TPad * > > Divide (int nHoriz, int nVert, const TPadExtent &padding={})
 Divide this pad into a grid of subpads with padding in between. More...
 
template<class T , class... ARGS>
auto Draw (const std::shared_ptr< T > &what, ARGS... args)
 Add something to be painted. More...
 
template<class T , class... ARGS>
auto Draw (std::unique_ptr< T > &&what, ARGS... args)
 Add something to be painted. More...
 
template<class T , class... ARGS, class = typename std::enable_if<!ROOT::TypeTraits::IsSmartOrDumbPtr<T>::value>::type>
auto Draw (const T &what, ARGS... args)
 Add a copy of something to be painted. More...
 
std::shared_ptr< TDrawableFindDrawable (const std::string &id) const
 
TPadUserAxisBaseGetAxis (size_t dimension) const
 Get a pad axis from the TFrame. More...
 
const TFrameGetFrame () const
 
TPadUserAxisBaseGetOrCreateAxis (size_t dimension)
 Get a pad axis from the TFrame. More...
 
TFrameGetOrCreateFrame ()
 
const Primitives_tGetPrimitives () const
 Get the elements contained in the canvas. More...
 
bool Remove (TDrawingOptsBase &opts)
 Remove an object from the list of primitives. More...
 
void SetAllAxisAutoBounds ()
 Set the range of an axis as bound kind and bound (up or down). More...
 
void SetAllAxisBound (const std::vector< BoundKindAndValue > &vecBoundAndKind)
 Set the range of an axis as bound kind and bound (up or down). More...
 
void SetAllAxisBounds (const std::vector< std::array< double, 2 >> &vecBeginAndEnd)
 Set the range of an axis as bound kind and bound (up or down). More...
 
void SetAxisAutoBounds (int dimension)
 Set the range of an axis as bound kind and bound (up or down). More...
 
void SetAxisBound (int dimension, TPadUserAxisBase::EAxisBoundsKind boundsKind, double bound)
 Set the range of an axis as bound kind and bound (up or down). More...
 
void SetAxisBounds (int dimension, double begin, double end)
 Set the range of an axis as begin, end. More...
 
std::array< TPadLength::Normal, 2 > UserToNormal (const std::array< TPadLength::User, 2 > &pos) const
 Convert user coordinates to normal coordinates. More...
 
void Wipe ()
 Wipe the pad by clearing the list of primitives. More...
 

Private Attributes

TPadBasefParent = nullptr
 Pad containing this pad as a sub-pad. More...
 
TPadExtent fSize = {1._normal, 1._normal}
 The parent pad, if this pad has one. More...
 

Friends

std::unique_ptr< TPadDrawableGetDrawable (std::unique_ptr< TPad > &&pad)
 

Additional Inherited Members

- Public Types inherited from ROOT::Experimental::TPadBase
using Primitives_t = std::vector< std::shared_ptr< TDrawable > >
 
- Protected Member Functions inherited from ROOT::Experimental::TPadBase
 TPadBase ()=default
 Allow derived classes to default construct a TPadBase. More...
 

#include <ROOT/TPad.hxx>

Inheritance diagram for ROOT::Experimental::TPad:
[legend]

Constructor & Destructor Documentation

◆ TPad() [1/2]

ROOT::Experimental::TPad::TPad ( )
default

Create a topmost, non-paintable pad.

◆ TPad() [2/2]

ROOT::Experimental::TPad::TPad ( TPadBase parent,
const TPadExtent size 
)
inline

Create a child pad.

Definition at line 197 of file TPad.hxx.

◆ ~TPad()

TPad::~TPad ( )
virtualdefault

Destructor to have a vtable.

Member Function Documentation

◆ GetCanvas() [1/2]

const TCanvas* ROOT::Experimental::TPad::GetCanvas ( ) const
inlineoverridevirtual

Access to the top-most canvas (const version).

Implements ROOT::Experimental::TPadBase.

Definition at line 209 of file TPad.hxx.

◆ GetCanvas() [2/2]

TCanvas* ROOT::Experimental::TPad::GetCanvas ( )
inlineoverridevirtual

Access to the top-most canvas (non-const version).

Implements ROOT::Experimental::TPadBase.

Definition at line 212 of file TPad.hxx.

◆ GetParent() [1/2]

const TPadBase* ROOT::Experimental::TPad::GetParent ( ) const
inline

Access to the parent pad (const version).

Definition at line 203 of file TPad.hxx.

◆ GetParent() [2/2]

TPadBase* ROOT::Experimental::TPad::GetParent ( )
inline

Access to the parent pad (non-const version).

Definition at line 206 of file TPad.hxx.

◆ GetSize()

const TPadExtent& ROOT::Experimental::TPad::GetSize ( ) const
inline

Get the size of the pad in parent (!) coordinates.

Definition at line 215 of file TPad.hxx.

◆ PixelsToNormal()

std::array<TPadLength::Normal, 2> ROOT::Experimental::TPad::PixelsToNormal ( const std::array< TPadLength::Pixel, 2 > &  pos) const
inlineoverridevirtual

Convert a Pixel position to Canvas-normalized positions.

Implements ROOT::Experimental::TPadBase.

Definition at line 218 of file TPad.hxx.

◆ ToNormal()

std::array<TPadLength::Normal, 2> ROOT::Experimental::TPad::ToNormal ( const Internal::TPadHorizVert pos) const
inline

Convert a TPadPos to [x, y] of normalized coordinates.

Definition at line 232 of file TPad.hxx.

Friends And Related Function Documentation

◆ GetDrawable

std::unique_ptr<TPadDrawable> GetDrawable ( std::unique_ptr< TPad > &&  pad)
friend

Member Data Documentation

◆ fParent

TPadBase* ROOT::Experimental::TPad::fParent = nullptr
private

Pad containing this pad as a sub-pad.

Definition at line 185 of file TPad.hxx.

◆ fSize

TPadExtent ROOT::Experimental::TPad::fSize = {1._normal, 1._normal}
private

The parent pad, if this pad has one.

Size of the pad in the parent's (!) coordinate system.

Definition at line 188 of file TPad.hxx.

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

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