File indexing completed on 2025-01-30 10:22:33
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef ROOT7_RFrameTitle
0010 #define ROOT7_RFrameTitle
0011
0012 #include <ROOT/RDrawable.hxx>
0013 #include <ROOT/RAttrText.hxx>
0014 #include <ROOT/RAttrValue.hxx>
0015 #include <ROOT/RPadPos.hxx>
0016
0017 #include <string>
0018
0019 namespace ROOT {
0020 namespace Experimental {
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 class RFrameTitle final : public RDrawable {
0032
0033 std::string fText;
0034
0035 protected:
0036
0037 bool IsFrameRequired() const final { return true; }
0038
0039 public:
0040
0041 RAttrText text{this, "text", 0.07};
0042 RAttrValue<RPadLength> margin{this, "margin", 0.02_normal};
0043 RAttrValue<RPadLength> height{this, "height", 0.05_normal};
0044
0045 RFrameTitle() : RDrawable("title") {}
0046
0047 RFrameTitle(const std::string &txt) : RFrameTitle() { fText = txt; }
0048
0049 RFrameTitle &SetText(const std::string &t)
0050 {
0051 fText = t;
0052 return *this;
0053 }
0054 const std::string &GetText() const { return fText; }
0055 };
0056
0057 }
0058 }
0059
0060 #endif