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

A font attributes, used together with text attributes.

Author
Sergey Linev s.lin.nosp@m.ev@g.nosp@m.si.de
Date
2021-06-28
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 RAttrFont.hxx.

Public Types

enum  EFont {
  kTimesItalic = 1 , kTimesBold = 2 , kTimesBoldItalic = 3 , kArial = 4 ,
  kArialOblique = 5 , kArialBold = 6 , kArialBoldOblique = 7 , kCourier = 8 ,
  kCourierOblique = 9 , kCourierBold = 10 , kCourierBoldOblique = 11 , kTimes = 13 ,
  kVerdana = 16 , kVerdanaItalic = 17 , kVerdanaBold = 18 , kVerdanaBoldItalic = 19
}
 

Public Member Functions

 RAttrFont ()=default
 
 RAttrFont (const RAttrFont &src)
 
 RAttrFont (RAttrBase *parent, const char *prefix="font")
 
 RAttrFont (RDrawable *drawable, const char *prefix="font")
 
std::string GetFullName () const
 Returns full font name including weight and style.
 
RAttrFontoperator= (const RAttrFont &src)
 
RAttrFontoperator= (EFont id)
 assign font id, setting all necessary properties
 
RAttrFontSetFont (EFont font)
 Set text font by id as usually handled in the ROOT (without precision), number should be between 1 and 15.
 
- Public Member Functions inherited from ROOT::Experimental::RAttrAggregation
 RAttrAggregation ()=default
 
 RAttrAggregation (const RAttrAggregation &src)
 
 RAttrAggregation (RAttrBase *parent, const char *prefix=nullptr)
 
 RAttrAggregation (RDrawable *drawable, const char *prefix=nullptr)
 
void Clear () override
 Clear all respective values from drawable. Only defaults can be used.
 
RAttrAggregationoperator= (const RAttrAggregation &src)
 
- Public Member Functions inherited from ROOT::Experimental::RAttrBase
 RAttrBase ()=default
 
virtual ~RAttrBase ()
 

Public Attributes

RAttrValue< std::string > family {this, "family"}
 ! font family, corresponds to css font-familty attribute
 
RAttrValue< std::string > style {this, "style"}
 ! font style, corresponds to css font-style attribute
 
RAttrValue< std::string > weight {this, "weight"}
 ! font weight, corresponds to css font-weight attribute
 

Protected Member Functions

const RAttrMapGetDefaults () const override
 Return default values for attributes, empty for base class.
 
- Protected Member Functions inherited from ROOT::Experimental::RAttrAggregation
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.
 
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.
 
- Protected Member Functions inherited from ROOT::Experimental::RAttrBase
 RAttrBase (const char *prefix)
 
 RAttrBase (RAttrBase *parent, const char *prefix=nullptr)
 
 RAttrBase (RDrawable *drawable, const char *prefix=nullptr)
 
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.
 
Rec_t EnsureAttr (const std::string &name)
 Ensure attribute with give name exists - creates container for attributes if required.
 
RDrawableGetDrawable () const
 
RAttrMapGetOwnAttr () const
 
RAttrBaseGetParent () const
 
const char * GetPrefix () const
 
void MoveTo (RAttrBase &tgt)
 Move all fields into target object.
 
void SetNoValue (const std::string &name)
 Set <NoValue> for attribute.
 

Friends

bool operator== (const RAttrFont &font, EFont id)
 

#include <ROOT/RAttrFont.hxx>

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

Member Enumeration Documentation

◆ EFont

Enumerator
kTimesItalic 
kTimesBold 
kTimesBoldItalic 
kArial 
kArialOblique 
kArialBold 
kArialBoldOblique 
kCourier 
kCourierOblique 
kCourierBold 
kCourierBoldOblique 
kTimes 
kVerdana 
kVerdanaItalic 
kVerdanaBold 
kVerdanaBoldItalic 

Definition at line 36 of file RAttrFont.hxx.

Constructor & Destructor Documentation

◆ RAttrFont() [1/4]

ROOT::Experimental::RAttrFont::RAttrFont ( )
default

◆ RAttrFont() [2/4]

ROOT::Experimental::RAttrFont::RAttrFont ( RDrawable drawable,
const char *  prefix = "font" 
)
inline

Definition at line 28 of file RAttrFont.hxx.

◆ RAttrFont() [3/4]

ROOT::Experimental::RAttrFont::RAttrFont ( RAttrBase parent,
const char *  prefix = "font" 
)
inline

Definition at line 28 of file RAttrFont.hxx.

◆ RAttrFont() [4/4]

ROOT::Experimental::RAttrFont::RAttrFont ( const RAttrFont src)
inline

Definition at line 28 of file RAttrFont.hxx.

Member Function Documentation

◆ GetDefaults()

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

Return default values for attributes, empty for base class.

Reimplemented from ROOT::Experimental::RAttrAggregation.

Definition at line 28 of file RAttrFont.hxx.

◆ GetFullName()

std::string ROOT::Experimental::RAttrFont::GetFullName ( ) const
inline

Returns full font name including weight and style.

Definition at line 91 of file RAttrFont.hxx.

◆ operator=() [1/2]

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

Definition at line 28 of file RAttrFont.hxx.

◆ operator=() [2/2]

RAttrFont & ROOT::Experimental::RAttrFont::operator= ( EFont  id)
inline

assign font id, setting all necessary properties

Definition at line 86 of file RAttrFont.hxx.

◆ SetFont()

RAttrFont & ROOT::Experimental::RAttrFont::SetFont ( EFont  font)
inline

Set text font by id as usually handled in the ROOT (without precision), number should be between 1 and 15.

Definition at line 59 of file RAttrFont.hxx.

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const RAttrFont font,
EFont  id 
)
friend

Definition at line 88 of file RAttrFont.hxx.

Member Data Documentation

◆ family

RAttrValue<std::string> ROOT::Experimental::RAttrFont::family {this, "family"}

! font family, corresponds to css font-familty attribute

Definition at line 32 of file RAttrFont.hxx.

◆ style

RAttrValue<std::string> ROOT::Experimental::RAttrFont::style {this, "style"}

! font style, corresponds to css font-style attribute

Definition at line 33 of file RAttrFont.hxx.

◆ weight

RAttrValue<std::string> ROOT::Experimental::RAttrFont::weight {this, "weight"}

! font weight, corresponds to css font-weight attribute

Definition at line 34 of file RAttrFont.hxx.

Libraries for ROOT::Experimental::RAttrFont:

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