File indexing completed on 2025-01-18 10:10:48
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef ROOT7_RText
0010 #define ROOT7_RText
0011
0012 #include <ROOT/ROnFrameDrawable.hxx>
0013 #include <ROOT/RAttrText.hxx>
0014 #include <ROOT/RPadPos.hxx>
0015
0016 #include <initializer_list>
0017 #include <string>
0018
0019 namespace ROOT {
0020 namespace Experimental {
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 class RText : public ROnFrameDrawable {
0032
0033 std::string fText;
0034 RPadPos fPos;
0035
0036 public:
0037 RAttrText text{this, "text"};
0038
0039 RText() : ROnFrameDrawable("text") {}
0040
0041 RText(const std::string &txt) : RText() { fText = txt; }
0042
0043 RText(const RPadPos &p, const std::string &txt) : RText()
0044 {
0045 fText = txt;
0046 fPos = p;
0047 }
0048
0049 RText &SetText(const std::string &t) { fText = t; return *this; }
0050 const std::string &GetText() const { return fText; }
0051
0052 RText &SetPos(const RPadPos &p) { fPos = p; return *this; }
0053 const RPadPos &GetPos() const { return fPos; }
0054 };
0055
0056 }
0057 }
0058
0059 #endif