Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
ROOT::Experimental::RAttrBorder Class Reference

Drawing line attributes for different objects.

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

Definition at line 26 of file RAttrBorder.hxx.

Public Types

enum  EStyle {
  kNone = 0 , kSolid = 1 , kDashed = 2 , kDotted = 3 ,
  kDashDotted = 4 , kStyle1 = 1 , kStyle2 = 2 , kStyle3 = 3 ,
  kStyle4 = 4 , kStyle5 = 5 , kStyle6 = 6 , kStyle7 = 7 ,
  kStyle8 = 8 , kStyle9 = 9 , kStyle10 = 10
}

Public Member Functions

 RAttrBorder ()=default
 RAttrBorder (const RAttrBorder &src)
 RAttrBorder (RAttrBase *parent, const char *prefix="border")
 RAttrBorder (RDrawable *drawable, const char *prefix="border")
void Clear () override
 Clear all respective values from drawable. Only defaults can be used.
RAttrBorderoperator= (const RAttrBorder &src)

Public Attributes

RAttrValue< RColorcolor {this, "color", RColor::kBlack}
 ! line color
RAttrValue< std::string > pattern {this, "pattern"}
 ! line pattern like "3,2,3,1,5"
RAttrValue< intrx {this, "rx", 0}
 ! rounding on x coordinate, px
RAttrValue< intry {this, "ry", 0}
 ! rounding on y coordinate, px
RAttrValue< EStylestyle {this, "style", kSolid}
 ! line style
RAttrValue< doublewidth {this, "width", 1.}
 ! line width

Protected Member Functions

const Rec_t AccessAttr (const std::string &name) const
 Find attributes container and full-qualified name for value.
const Val_t AccessValue (const std::string &name, bool use_style=true) const
 Search value with given name in attributes.
void ClearValue (const std::string &name)
 Clear value if any with specified name.
RAttrMap CollectDefaults () const override
 Collect all attributes in derived class Works only if such class has dictionary.
void CopyTo (RAttrAggregation &tgt, bool use_style=true) const
 Copy attributes into target object.
bool CopyValue (const std::string &name, const RAttrMap::Value_t &value, bool check_type=true)
 Copy attributes from other object.
Rec_t EnsureAttr (const std::string &name)
 Ensure attribute with give name exists - creates container for attributes if required.
const RAttrMapGetDefaults () const override
 Return default values for attributes, empty for base class.
RDrawableGetDrawable () const
RAttrMapGetOwnAttr () const
RAttrBaseGetParent () const
const char * GetPrefix () const
bool IsAggregation () const final
bool IsSame (const RAttrAggregation &src, bool use_style=true) const
 Check if all values which are evaluated in this object are exactly the same as in tgt object.
bool IsValueEqual (const std::string &name, const RAttrMap::Value_t &value, bool use_style=false) const
 Check if provided value equal to attribute in the map.
void MoveTo (RAttrBase &tgt)
 Move all fields into target object.
void SetNoValue (const std::string &name)
 Set <NoValue> for attribute.

Private Types

enum  { kDrawable , kParent , kOwnAttr }

Private Member Functions

void ClearData ()
 Clear internal data.
RAttrMapCreateOwnAttr ()
 Creates own attribute - only if no drawable and no parent are assigned.

Private Attributes

const char * fPrefix {nullptr}
 ! name prefix for all attributes values
enum ROOT::Experimental::RAttrBase:: { ... }  kDrawable
 ! kind of data
union { 
   RDrawable *   drawable 
   RAttrMap *   ownattr 
   RAttrBase *   parent 
nullptr
 ! data

#include <ROOT/RAttrBorder.hxx>

Inheritance diagram for ROOT::Experimental::RAttrBorder:
ROOT::Experimental::RAttrLine ROOT::Experimental::RAttrAggregation ROOT::Experimental::RAttrBase

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
privateinherited
Enumerator
kDrawable 
kParent 
kOwnAttr 

Definition at line 37 of file RAttrBase.hxx.

◆ EStyle

Enumerator
kNone 
kSolid 
kDashed 
kDotted 
kDashDotted 
kStyle1 
kStyle2 
kStyle3 
kStyle4 
kStyle5 
kStyle6 
kStyle7 
kStyle8 
kStyle9 
kStyle10 

Definition at line 32 of file RAttrLine.hxx.

Constructor & Destructor Documentation

◆ RAttrBorder() [1/4]

ROOT::Experimental::RAttrBorder::RAttrBorder ( )
default

◆ RAttrBorder() [2/4]

ROOT::Experimental::RAttrBorder::RAttrBorder ( RDrawable * drawable,
const char * prefix = "border" )
inline

Definition at line 28 of file RAttrBorder.hxx.

◆ RAttrBorder() [3/4]

ROOT::Experimental::RAttrBorder::RAttrBorder ( RAttrBase * parent,
const char * prefix = "border" )
inline

Definition at line 28 of file RAttrBorder.hxx.

◆ RAttrBorder() [4/4]

ROOT::Experimental::RAttrBorder::RAttrBorder ( const RAttrBorder & src)
inline

Definition at line 28 of file RAttrBorder.hxx.

Member Function Documentation

◆ AccessAttr()

const Rec_t ROOT::Experimental::RAttrBase::AccessAttr ( const std::string & name) const
inlineprotectedinherited

Find attributes container and full-qualified name for value.

Definition at line 70 of file RAttrBase.hxx.

◆ AccessValue()

const Val_t ROOT::Experimental::RAttrBase::AccessValue ( const std::string & name,
bool use_style = true ) const
inlineprotectedinherited

Search value with given name in attributes.

Definition at line 95 of file RAttrBase.hxx.

◆ Clear()

void RAttrAggregation::Clear ( )
overridevirtualinherited

Clear all respective values from drawable. Only defaults can be used.

Implements ROOT::Experimental::RAttrBase.

Definition at line 118 of file RAttrAggregation.cxx.

◆ ClearData()

void RAttrBase::ClearData ( )
privateinherited

Clear internal data.

Definition at line 26 of file RAttrBase.cxx.

◆ ClearValue()

void RAttrBase::ClearValue ( const std::string & name)
protectedinherited

Clear value if any with specified name.

Definition at line 54 of file RAttrBase.cxx.

◆ CollectDefaults()

RAttrMap RAttrAggregation::CollectDefaults ( ) const
overrideprotectedvirtualinherited

Collect all attributes in derived class Works only if such class has dictionary.

In special cases one has to provide special implementation directly

Implements ROOT::Experimental::RAttrBase.

Definition at line 37 of file RAttrAggregation.cxx.

◆ CopyTo()

void RAttrAggregation::CopyTo ( RAttrAggregation & tgt,
bool use_style = true ) const
protectedinherited

Copy attributes into target object.

Definition at line 60 of file RAttrAggregation.cxx.

◆ CopyValue()

bool RAttrAggregation::CopyValue ( const std::string & name,
const RAttrMap::Value_t & value,
bool check_type = true )
protectedinherited

Copy attributes from other object.

Definition at line 71 of file RAttrAggregation.cxx.

◆ CreateOwnAttr()

RAttrMap * RAttrBase::CreateOwnAttr ( )
privateinherited

Creates own attribute - only if no drawable and no parent are assigned.

Definition at line 37 of file RAttrBase.cxx.

◆ EnsureAttr()

Rec_t ROOT::Experimental::RAttrBase::EnsureAttr ( const std::string & name)
inlineprotectedinherited

Ensure attribute with give name exists - creates container for attributes if required.

Definition at line 112 of file RAttrBase.hxx.

◆ GetDefaults()

const RAttrMap & ROOT::Experimental::RAttrBorder::GetDefaults ( ) const
inlineoverrideprotectedvirtual

Return default values for attributes, empty for base class.

Reimplemented from ROOT::Experimental::RAttrAggregation.

Definition at line 28 of file RAttrBorder.hxx.

◆ GetDrawable()

RDrawable * ROOT::Experimental::RAttrBase::GetDrawable ( ) const
inlineprotectedinherited

Definition at line 52 of file RAttrBase.hxx.

◆ GetOwnAttr()

RAttrMap * ROOT::Experimental::RAttrBase::GetOwnAttr ( ) const
inlineprotectedinherited

Definition at line 54 of file RAttrBase.hxx.

◆ GetParent()

RAttrBase * ROOT::Experimental::RAttrBase::GetParent ( ) const
inlineprotectedinherited

Definition at line 53 of file RAttrBase.hxx.

◆ GetPrefix()

const char * ROOT::Experimental::RAttrBase::GetPrefix ( ) const
inlineprotectedinherited

Definition at line 153 of file RAttrBase.hxx.

◆ IsAggregation()

bool ROOT::Experimental::RAttrAggregation::IsAggregation ( ) const
inlinefinalprotectedvirtualinherited

Reimplemented from ROOT::Experimental::RAttrBase.

Definition at line 33 of file RAttrAggregation.hxx.

◆ IsSame()

bool RAttrAggregation::IsSame ( const RAttrAggregation & src,
bool use_style = true ) const
protectedinherited

Check if all values which are evaluated in this object are exactly the same as in tgt object.

Definition at line 103 of file RAttrAggregation.cxx.

◆ IsValueEqual()

bool RAttrAggregation::IsValueEqual ( const std::string & name,
const RAttrMap::Value_t & value,
bool use_style = false ) const
protectedinherited

Check if provided value equal to attribute in the map.

Definition at line 91 of file RAttrAggregation.cxx.

◆ MoveTo()

void RAttrBase::MoveTo ( RAttrBase & tgt)
protectedinherited

Move all fields into target object.

Definition at line 73 of file RAttrBase.cxx.

◆ operator=()

RAttrBorder & ROOT::Experimental::RAttrBorder::operator= ( const RAttrBorder & src)
inline

Definition at line 28 of file RAttrBorder.hxx.

◆ SetNoValue()

void RAttrBase::SetNoValue ( const std::string & name)
protectedinherited

Set <NoValue> for attribute.

Ensure that value can not be configured via style - defaults will be used Equivalent to css syntax { attrname:; }

Definition at line 64 of file RAttrBase.cxx.

Member Data Documentation

◆ color

RAttrValue<RColor> ROOT::Experimental::RAttrLine::color {this, "color", RColor::kBlack}
inherited

! line color

Definition at line 50 of file RAttrLine.hxx.

◆ drawable

RDrawable* ROOT::Experimental::RAttrBase::drawable
inherited

Definition at line 40 of file RAttrBase.hxx.

◆ fPrefix

const char* ROOT::Experimental::RAttrBase::fPrefix {nullptr}
privateinherited

! name prefix for all attributes values

Definition at line 45 of file RAttrBase.hxx.

◆ []

enum { ... } ROOT::Experimental::RAttrBase::kDrawable

! kind of data

◆ [union]

union { ... } ROOT::Experimental::RAttrBase::nullptr

! data

◆ ownattr

RAttrMap* ROOT::Experimental::RAttrBase::ownattr
inherited

Definition at line 42 of file RAttrBase.hxx.

◆ parent

RAttrBase* ROOT::Experimental::RAttrBase::parent
inherited

Definition at line 41 of file RAttrBase.hxx.

◆ pattern

RAttrValue<std::string> ROOT::Experimental::RAttrLine::pattern {this, "pattern"}
inherited

! line pattern like "3,2,3,1,5"

Definition at line 53 of file RAttrLine.hxx.

◆ rx

RAttrValue<int> ROOT::Experimental::RAttrBorder::rx {this, "rx", 0}

! rounding on x coordinate, px

Definition at line 32 of file RAttrBorder.hxx.

◆ ry

RAttrValue<int> ROOT::Experimental::RAttrBorder::ry {this, "ry", 0}

! rounding on y coordinate, px

Definition at line 33 of file RAttrBorder.hxx.

◆ style

RAttrValue<EStyle> ROOT::Experimental::RAttrLine::style {this, "style", kSolid}
inherited

! line style

Definition at line 52 of file RAttrLine.hxx.

◆ width

RAttrValue<double> ROOT::Experimental::RAttrLine::width {this, "width", 1.}
inherited

! line width

Definition at line 51 of file RAttrLine.hxx.


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