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

Graphic container for RDrawable-s.

Definition at line 182 of file RPad.hxx.

Classes

class  DrawingOpts
 Drawing options for a RPad. More...
 

Public Member Functions

 RPad ()=default
 Create a topmost, non-paintable pad. More...
 
 RPad (RPadBase &parent, const RPadPos &pos, const RPadExtent &size)
 Create a child pad. More...
 
virtual ~RPad ()
 Destructor to have a vtable. More...
 
const RCanvasGetCanvas () const override
 Access to the top-most canvas (const version). More...
 
RCanvasGetCanvas () override
 Access to the top-most canvas (non-const version). More...
 
DrawingOptsGetDrawingOpts ()
 Drawing options. More...
 
RPadBaseGetParent ()
 Access to the parent pad (non-const version). More...
 
const RPadBaseGetParent () const
 Access to the parent pad (const version). More...
 
const RPadPosGetPos () const
 Get the position of the pad in parent (!) coordinates. More...
 
const RPadExtentGetSize () const
 Get the size of the pad in parent (!) coordinates. More...
 
std::array< RPadLength::Normal, 2 > PixelsToNormal (const std::array< RPadLength::Pixel, 2 > &pos) const override
 Convert a Pixel position to Canvas-normalized positions. More...
 
std::array< RPadLength::Normal, 2 > ToNormal (const Internal::RPadHorizVert &pos) const
 Convert a RPadPos to [x, y] of normalized coordinates. More...
 
- Public Member Functions inherited from ROOT::Experimental::RPadBase
virtual ~RPadBase ()
 
void CreateFrameIfNeeded ()
 
std::vector< std::vector< RPad * > > Divide (int nHoriz, int nVert, const RPadExtent &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, 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...
 
template<class T , class... ARGS>
auto Draw (std::unique_ptr< T > &&what, ARGS... args)
 Add something to be painted. More...
 
std::shared_ptr< RDrawableFindDrawable (const std::string &id) const
 
RPadUserAxisBaseGetAxis (size_t dimension) const
 Get a pad axis from the RFrame. More...
 
virtual const RCanvasGetCanvas () const =0
 Access to the top-most canvas, if any (const version). More...
 
virtual RCanvasGetCanvas ()=0
 Access to the top-most canvas, if any (non-const version). More...
 
const RFrameGetFrame () const
 
RPadUserAxisBaseGetOrCreateAxis (size_t dimension)
 Get a pad axis from the RFrame. More...
 
RFrameGetOrCreateFrame ()
 
const Primitives_tGetPrimitives () const
 Get the elements contained in the canvas. More...
 
virtual std::array< RPadLength::Normal, 2 > PixelsToNormal (const std::array< RPadLength::Pixel, 2 > &pos) const =0
 Convert a Pixel position to Canvas-normalized positions. More...
 
bool Remove (RDrawingOptsBase &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, RPadUserAxisBase::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< RPadLength::Normal, 2 > UserToNormal (const std::array< RPadLength::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

DrawingOpts fOpts
 The parent pad, if this pad has one. More...
 
RPadBasefParent = nullptr
 Pad containing this pad as a sub-pad. More...
 
RPadPos fPos = fOpts.GetPos()
 Position of the pad in the parent's (!) coordinate system. More...
 
RPadExtent fSize = fOpts.GetSize()
 Size of the pad in the parent's (!) coordinate system. More...
 

Friends

std::unique_ptr< RPadDrawableGetDrawable (std::unique_ptr< RPad > &&pad)
 

Additional Inherited Members

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

#include <ROOT/RPad.hxx>

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

Constructor & Destructor Documentation

◆ RPad() [1/2]

ROOT::Experimental::RPad::RPad ( )
default

Create a topmost, non-paintable pad.

◆ RPad() [2/2]

ROOT::Experimental::RPad::RPad ( RPadBase parent,
const RPadPos pos,
const RPadExtent size 
)
inline

Create a child pad.

Definition at line 230 of file RPad.hxx.

◆ ~RPad()

ROOT::Experimental::RPad::~RPad ( )
virtualdefault

Destructor to have a vtable.

Member Function Documentation

◆ GetCanvas() [1/2]

const RCanvas * ROOT::Experimental::RPad::GetCanvas ( ) const
inlineoverridevirtual

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

Implements ROOT::Experimental::RPadBase.

Definition at line 242 of file RPad.hxx.

◆ GetCanvas() [2/2]

RCanvas * ROOT::Experimental::RPad::GetCanvas ( )
inlineoverridevirtual

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

Implements ROOT::Experimental::RPadBase.

Definition at line 245 of file RPad.hxx.

◆ GetDrawingOpts()

DrawingOpts & ROOT::Experimental::RPad::GetDrawingOpts ( )
inline

Drawing options.

Definition at line 254 of file RPad.hxx.

◆ GetParent() [1/2]

RPadBase * ROOT::Experimental::RPad::GetParent ( )
inline

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

Definition at line 239 of file RPad.hxx.

◆ GetParent() [2/2]

const RPadBase * ROOT::Experimental::RPad::GetParent ( ) const
inline

Access to the parent pad (const version).

Definition at line 236 of file RPad.hxx.

◆ GetPos()

const RPadPos & ROOT::Experimental::RPad::GetPos ( ) const
inline

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

Definition at line 248 of file RPad.hxx.

◆ GetSize()

const RPadExtent & ROOT::Experimental::RPad::GetSize ( ) const
inline

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

Definition at line 251 of file RPad.hxx.

◆ PixelsToNormal()

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

Convert a Pixel position to Canvas-normalized positions.

Implements ROOT::Experimental::RPadBase.

Definition at line 257 of file RPad.hxx.

◆ ToNormal()

std::array< RPadLength::Normal, 2 > ROOT::Experimental::RPad::ToNormal ( const Internal::RPadHorizVert pos) const
inline

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

Definition at line 271 of file RPad.hxx.

Friends And Related Function Documentation

◆ GetDrawable

std::unique_ptr< RPadDrawable > GetDrawable ( std::unique_ptr< RPad > &&  pad)
friend

Member Data Documentation

◆ fOpts

DrawingOpts ROOT::Experimental::RPad::fOpts
private

The parent pad, if this pad has one.

Drawing options, containing the size (in parent coordinates!)

Definition at line 215 of file RPad.hxx.

◆ fParent

RPadBase* ROOT::Experimental::RPad::fParent = nullptr
private

Pad containing this pad as a sub-pad.

Definition at line 212 of file RPad.hxx.

◆ fPos

RPadPos ROOT::Experimental::RPad::fPos = fOpts.GetPos()
private

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

Definition at line 218 of file RPad.hxx.

◆ fSize

RPadExtent ROOT::Experimental::RPad::fSize = fOpts.GetSize()
private

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

Definition at line 221 of file RPad.hxx.

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

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