Logo ROOT   6.10/09
Reference Guide
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
ROOT::Experimental::TCanvas Class Reference

Graphic container for TDrawable-s.

Access is through TCanvasPtr.

Definition at line 38 of file TCanvas.hxx.

Public Types

using Primitives_t = std::vector< std::unique_ptr< Internal::TDrawable > >
 

Public Member Functions

 TCanvas ()
 Create a temporary TCanvas; for long-lived ones please use Create(). More...
 
 ~TCanvas ()
 Default destructor. More...
 
template<class T >
void Draw (const std::shared_ptr< T > &what)
 Add something to be painted. More...
 
template<class T , class OPTIONS >
void Draw (const std::shared_ptr< T > &what, const OPTIONS &options)
 Add something to be painted, with options. More...
 
template<class T >
void Draw (std::unique_ptr< T > &&what)
 Add something to be painted. The pad claims ownership. More...
 
template<class T , class OPTIONS >
void Draw (std::unique_ptr< T > &&what, const OPTIONS &options)
 Add something to be painted, with options. The pad claims ownership. More...
 
template<class T >
void Draw (const T &what)
 Add a copy of something to be painted. More...
 
template<class T , class OPTIONS >
void Draw (const T &what, const OPTIONS &options)
 Add a copy of something to be painted, with options. More...
 
const Primitives_tGetPrimitives ()
 Get the elements contained in the canvas. More...
 
const std::string & GetTitle () const
 Get the canvas's title. More...
 
void Paint ()
 Remove an object from the list of primitives. More...
 
void SetTitle (const std::string &title)
 Set the canvas's title. More...
 

Static Public Member Functions

static std::shared_ptr< TCanvasCreate (const std::string &title)
 
static const std::vector< std::shared_ptr< TCanvas > > & GetCanvases ()
 

Private Member Functions

 TCanvas (const TCanvas &)=delete
 Disable copy construction for now. More...
 
TCanvasoperator= (const TCanvas &)=delete
 Disable assignment for now. More...
 

Private Attributes

std::unique_ptr< Internal::TV5CanvasAdaptor > fAdaptor
 Adaptor for painting an old canvas. More...
 
Primitives_t fPrimitives
 Content of the pad. More...
 
std::string fTitle
 Title of the canvas. More...
 

#include <ROOT/TCanvas.hxx>

Member Typedef Documentation

◆ Primitives_t

using ROOT::Experimental::TCanvas::Primitives_t = std::vector<std::unique_ptr<Internal::TDrawable> >

Definition at line 40 of file TCanvas.hxx.

Constructor & Destructor Documentation

◆ TCanvas() [1/2]

ROOT::Experimental::TCanvas::TCanvas ( const TCanvas )
privatedelete

Disable copy construction for now.

◆ TCanvas() [2/2]

TCanvas::TCanvas ( )

Create a temporary TCanvas; for long-lived ones please use Create().

Definition at line 76 of file TCanvas.cxx.

◆ ~TCanvas()

TCanvas::~TCanvas ( )
default

Default destructor.

Outline the implementation in sources.

Member Function Documentation

◆ Create()

std::shared_ptr< ROOT::Experimental::TCanvas > TCanvas::Create ( const std::string &  title)
static

Definition at line 89 of file TCanvas.cxx.

◆ Draw() [1/6]

template<class T >
void ROOT::Experimental::TCanvas::Draw ( const std::shared_ptr< T > &  what)
inline

Add something to be painted.

The pad observes what's lifetime through a weak pointer.

Definition at line 73 of file TCanvas.hxx.

◆ Draw() [2/6]

template<class T , class OPTIONS >
void ROOT::Experimental::TCanvas::Draw ( const std::shared_ptr< T > &  what,
const OPTIONS &  options 
)
inline

Add something to be painted, with options.

The pad observes what's lifetime through a weak pointer.

Definition at line 81 of file TCanvas.hxx.

◆ Draw() [3/6]

template<class T >
void ROOT::Experimental::TCanvas::Draw ( std::unique_ptr< T > &&  what)
inline

Add something to be painted. The pad claims ownership.

Definition at line 88 of file TCanvas.hxx.

◆ Draw() [4/6]

template<class T , class OPTIONS >
void ROOT::Experimental::TCanvas::Draw ( std::unique_ptr< T > &&  what,
const OPTIONS &  options 
)
inline

Add something to be painted, with options. The pad claims ownership.

Definition at line 95 of file TCanvas.hxx.

◆ Draw() [5/6]

template<class T >
void ROOT::Experimental::TCanvas::Draw ( const T &  what)
inline

Add a copy of something to be painted.

Definition at line 102 of file TCanvas.hxx.

◆ Draw() [6/6]

template<class T , class OPTIONS >
void ROOT::Experimental::TCanvas::Draw ( const T &  what,
const OPTIONS &  options 
)
inline

Add a copy of something to be painted, with options.

Definition at line 109 of file TCanvas.hxx.

◆ GetCanvases()

const std::vector< std::shared_ptr< ROOT::Experimental::TCanvas > > & TCanvas::GetCanvases ( )
static

Definition at line 71 of file TCanvas.cxx.

◆ GetPrimitives()

const Primitives_t& ROOT::Experimental::TCanvas::GetPrimitives ( )
inline

Get the elements contained in the canvas.

Definition at line 127 of file TCanvas.hxx.

◆ GetTitle()

const std::string& ROOT::Experimental::TCanvas::GetTitle ( ) const
inline

Get the canvas's title.

Definition at line 121 of file TCanvas.hxx.

◆ operator=()

TCanvas& ROOT::Experimental::TCanvas::operator= ( const TCanvas )
privatedelete

Disable assignment for now.

◆ Paint()

void TCanvas::Paint ( )

Remove an object from the list of primitives.

Paint the canvas elements ("primitives").

Definition at line 82 of file TCanvas.cxx.

◆ SetTitle()

void ROOT::Experimental::TCanvas::SetTitle ( const std::string &  title)
inline

Set the canvas's title.

Definition at line 124 of file TCanvas.hxx.

Member Data Documentation

◆ fAdaptor

std::unique_ptr<Internal::TV5CanvasAdaptor> ROOT::Experimental::TCanvas::fAdaptor
private

Adaptor for painting an old canvas.

Definition at line 50 of file TCanvas.hxx.

◆ fPrimitives

Primitives_t ROOT::Experimental::TCanvas::fPrimitives
private

Content of the pad.

Definition at line 44 of file TCanvas.hxx.

◆ fTitle

std::string ROOT::Experimental::TCanvas::fTitle
private

Title of the canvas.

Definition at line 47 of file TCanvas.hxx.


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