Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/ROOT/RAttrText.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*************************************************************************
0002  * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers.               *
0003  * All rights reserved.                                                  *
0004  *                                                                       *
0005  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0006  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0007  *************************************************************************/
0008 
0009 #ifndef ROOT7_RAttrText
0010 #define ROOT7_RAttrText
0011 
0012 #include <ROOT/RAttrAggregation.hxx>
0013 #include <ROOT/RAttrValue.hxx>
0014 #include <ROOT/RAttrFont.hxx>
0015 
0016 namespace ROOT {
0017 namespace Experimental {
0018 
0019 /** \class RAttrText
0020 \ingroup GpadROOT7
0021 \brief A text attributes.
0022 \authors Axel Naumann <axel@cern.ch> Sergey Linev <s.linev@gsi.de>
0023 \date 2018-10-12
0024 \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
0025 */
0026 
0027 class RAttrText : public RAttrAggregation {
0028 
0029    R__ATTR_CLASS(RAttrText, "text");
0030 
0031 public:
0032 
0033    enum EAlign {
0034       kLeftBottom = 11,
0035       kLeftCenter = 12,
0036       kLeftTop = 13,
0037       kCenterBottom = 21,
0038       kCenter = 22,
0039       kCenterTop = 23,
0040       kRightBottom = 31,
0041       kRightCenter = 32,
0042       kRightTop = 33
0043    };
0044 
0045    RAttrValue<RColor> color{this, "color", RColor::kBlack};  ///<! text color
0046    RAttrValue<double> size{this, "size", 12.};               ///<! text size
0047    RAttrValue<double> angle{this, "angle", 0.};              ///<! text angle
0048    RAttrValue<EAlign> align{this, "align", kCenter};         ///<! text align
0049    RAttrFont font{this, "font"};                             ///<! text font
0050 
0051    RAttrText(RDrawable *drawable, const char *prefix, double _size) : RAttrAggregation(drawable, prefix), size(this, "size", _size) {}
0052 };
0053 
0054 } // namespace Experimental
0055 } // namespace ROOT
0056 
0057 #endif