Logo ROOT  
Reference Guide
ROOT::Experimental::RDrawable Class Reference

Base class for drawable entities: objects that can be painted on a RPad.

Author
Axel Naumann axel@.nosp@m.cern.nosp@m..ch
Sergey Linev s.lin.nosp@m.ev@g.nosp@m.si.de
Date
2015-08-07
Warning
This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!

Definition at line 109 of file RDrawable.hxx.

Classes

class  RDisplayContext
 

Public Types

using Version_t = uint64_t
 

Public Member Functions

 RDrawable (const std::string &type)
 
virtual ~RDrawable ()
 
void ClearStyle ()
 
const std::string & GetCssClass () const
 
const std::string & GetCssType () const
 
const std::string & GetId () const
 
void SetCssClass (const std::string &cl)
 
void SetId (const std::string &id)
 
virtual void UseStyle (const std::shared_ptr< RStyle > &style)
 

Protected Member Functions

 RDrawable (const RDrawable &)=delete
 
virtual void CollectShared (Internal::RIOSharedVector_t &)
 
virtual std::unique_ptr< RDisplayItemDisplay (const RDisplayContext &)
 Creates display item for drawable By default item contains drawable data itself. More...
 
virtual void Execute (const std::string &)
 
RAttrMapGetAttrMap ()
 
const RAttrMapGetAttrMap () const
 
Version_t GetVersion () const
 
virtual bool IsFrameRequired () const
 
bool MatchSelector (const std::string &selector) const
 Preliminary method which checks if drawable matches with given selector Following selector are allowed: "type" or "#id" or ".class_name" Here type is drawable kind like 'rect' or 'pad' id is drawable identifier, specified with RDrawable::SetId() method class_name is drawable class name, specified with RDrawable::SetCssClass() method. More...
 
virtual void OnDisplayItemDestroyed (RDisplayItem *) const
 
RDrawableoperator= (const RDrawable &)=delete
 
virtual void PopulateMenu (RMenuItems &)
 
virtual void SetDrawableVersion (Version_t vers)
 

Private Attributes

RAttrMap fAttr
 attributes values More...
 
std::string fCssClass
 user defined drawable class, can later go inside map More...
 
std::string fCssType
 ! drawable type, not stored in the root file, must be initialized in constructor More...
 
std::string fId
 optional object identifier, may be used in CSS as well More...
 
std::weak_ptr< RStylefStyle
 ! style applied for RDrawable, not stored when canvas is saved More...
 
Version_t fVersion {1}
 ! drawable version, changed from the canvas More...
 

Friends

class RAttrBase
 
class RChangeAttrRequest
 
class RDrawableDisplayItem
 
class RDrawableExecRequest
 
class RDrawableMenuRequest
 
class RIndirectDisplayItem
 
class RLegend
 
class RPadBase
 
class RStyle
 

#include <ROOT/RDrawable.hxx>

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

Member Typedef Documentation

◆ Version_t

Definition at line 123 of file RDrawable.hxx.

Constructor & Destructor Documentation

◆ RDrawable() [1/2]

ROOT::Experimental::RDrawable::RDrawable ( const RDrawable )
protecteddelete

◆ RDrawable() [2/2]

ROOT::Experimental::RDrawable::RDrawable ( const std::string &  type)
inlineexplicit

Definition at line 206 of file RDrawable.hxx.

◆ ~RDrawable()

RDrawable::~RDrawable ( )
virtualdefault

Member Function Documentation

◆ ClearStyle()

void ROOT::Experimental::RDrawable::ClearStyle ( )
inline

Definition at line 211 of file RDrawable.hxx.

◆ CollectShared()

◆ Display()

std::unique_ptr< RDisplayItem > RDrawable::Display ( const RDisplayContext ctxt)
protectedvirtual

Creates display item for drawable By default item contains drawable data itself.

Reimplemented in ROOT::Experimental::RHistDrawableBase, ROOT::Experimental::RHistStatBoxBase, ROOT::Experimental::RObjectDrawable, and ROOT::Experimental::RPad.

Definition at line 68 of file RDrawable.cxx.

◆ Execute()

void RDrawable::Execute ( const std::string &  exec)
protectedvirtual

Reimplemented in ROOT::Experimental::RObjectDrawable.

Definition at line 40 of file RDrawable.cxx.

◆ GetAttrMap() [1/2]

RAttrMap& ROOT::Experimental::RDrawable::GetAttrMap ( )
inlineprotected

Definition at line 185 of file RDrawable.hxx.

◆ GetAttrMap() [2/2]

const RAttrMap& ROOT::Experimental::RDrawable::GetAttrMap ( ) const
inlineprotected

Definition at line 186 of file RDrawable.hxx.

◆ GetCssClass()

const std::string& ROOT::Experimental::RDrawable::GetCssClass ( ) const
inline

Definition at line 214 of file RDrawable.hxx.

◆ GetCssType()

const std::string& ROOT::Experimental::RDrawable::GetCssType ( ) const
inline

Definition at line 216 of file RDrawable.hxx.

◆ GetId()

const std::string& ROOT::Experimental::RDrawable::GetId ( ) const
inline

Definition at line 218 of file RDrawable.hxx.

◆ GetVersion()

Version_t ROOT::Experimental::RDrawable::GetVersion ( ) const
inlineprotected

Definition at line 195 of file RDrawable.hxx.

◆ IsFrameRequired()

virtual bool ROOT::Experimental::RDrawable::IsFrameRequired ( ) const
inlineprotectedvirtual

◆ MatchSelector()

bool RDrawable::MatchSelector ( const std::string &  selector) const
protected

Preliminary method which checks if drawable matches with given selector Following selector are allowed: "type" or "#id" or ".class_name" Here type is drawable kind like 'rect' or 'pad' id is drawable identifier, specified with RDrawable::SetId() method class_name is drawable class name, specified with RDrawable::SetCssClass() method.

Definition at line 59 of file RDrawable.cxx.

◆ OnDisplayItemDestroyed()

virtual void ROOT::Experimental::RDrawable::OnDisplayItemDestroyed ( RDisplayItem ) const
inlineprotectedvirtual

Definition at line 192 of file RDrawable.hxx.

◆ operator=()

RDrawable& ROOT::Experimental::RDrawable::operator= ( const RDrawable )
protecteddelete

◆ PopulateMenu()

void RDrawable::PopulateMenu ( RMenuItems items)
protectedvirtual

◆ SetCssClass()

void ROOT::Experimental::RDrawable::SetCssClass ( const std::string &  cl)
inline

Definition at line 213 of file RDrawable.hxx.

◆ SetDrawableVersion()

virtual void ROOT::Experimental::RDrawable::SetDrawableVersion ( Version_t  vers)
inlineprotectedvirtual

Reimplemented in ROOT::Experimental::RPadBase.

Definition at line 194 of file RDrawable.hxx.

◆ SetId()

void ROOT::Experimental::RDrawable::SetId ( const std::string &  id)
inline

Definition at line 219 of file RDrawable.hxx.

◆ UseStyle()

virtual void ROOT::Experimental::RDrawable::UseStyle ( const std::shared_ptr< RStyle > &  style)
inlinevirtual

Reimplemented in ROOT::Experimental::RPadBase.

Definition at line 210 of file RDrawable.hxx.

Friends And Related Function Documentation

◆ RAttrBase

friend class RAttrBase
friend

Definition at line 112 of file RDrawable.hxx.

◆ RChangeAttrRequest

friend class RChangeAttrRequest
friend

Definition at line 117 of file RDrawable.hxx.

◆ RDrawableDisplayItem

friend class RDrawableDisplayItem
friend

Definition at line 115 of file RDrawable.hxx.

◆ RDrawableExecRequest

friend class RDrawableExecRequest
friend

Definition at line 119 of file RDrawable.hxx.

◆ RDrawableMenuRequest

friend class RDrawableMenuRequest
friend

Definition at line 118 of file RDrawable.hxx.

◆ RIndirectDisplayItem

friend class RIndirectDisplayItem
friend

Definition at line 116 of file RDrawable.hxx.

◆ RLegend

friend class RLegend
friend

Definition at line 114 of file RDrawable.hxx.

◆ RPadBase

friend class RPadBase
friend

Definition at line 111 of file RDrawable.hxx.

◆ RStyle

friend class RStyle
friend

Definition at line 113 of file RDrawable.hxx.

Member Data Documentation

◆ fAttr

RAttrMap ROOT::Experimental::RDrawable::fAttr
private

attributes values

Definition at line 172 of file RDrawable.hxx.

◆ fCssClass

std::string ROOT::Experimental::RDrawable::fCssClass
private

user defined drawable class, can later go inside map

Definition at line 175 of file RDrawable.hxx.

◆ fCssType

std::string ROOT::Experimental::RDrawable::fCssType
private

! drawable type, not stored in the root file, must be initialized in constructor

Definition at line 174 of file RDrawable.hxx.

◆ fId

std::string ROOT::Experimental::RDrawable::fId
private

optional object identifier, may be used in CSS as well

Definition at line 176 of file RDrawable.hxx.

◆ fStyle

std::weak_ptr<RStyle> ROOT::Experimental::RDrawable::fStyle
private

! style applied for RDrawable, not stored when canvas is saved

Definition at line 173 of file RDrawable.hxx.

◆ fVersion

Version_t ROOT::Experimental::RDrawable::fVersion {1}
private

! drawable version, changed from the canvas

Definition at line 177 of file RDrawable.hxx.


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