File indexing completed on 2025-01-18 10:10:36
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef ROOT7_RAxisDrawable
0010 #define ROOT7_RAxisDrawable
0011
0012 #include <ROOT/RDrawable.hxx>
0013 #include <ROOT/RAttrAxis.hxx>
0014 #include <ROOT/RPadPos.hxx>
0015 #include <ROOT/RPadLength.hxx>
0016 #include <ROOT/RLogger.hxx>
0017
0018 #include <vector>
0019 #include <string>
0020
0021 namespace ROOT {
0022 namespace Experimental {
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 class RAxisDrawable : public RDrawable {
0033
0034 RPadPos fPos;
0035 bool fVertical{false};
0036 RPadLength fLength;
0037 std::vector<std::string> fLabels;
0038
0039 public:
0040
0041 RAttrAxis axis{this, "axis"};
0042
0043 RAxisDrawable() : RDrawable("axis") {}
0044
0045 RAxisDrawable(const RPadPos &pos, bool vertical, const RPadLength &len) : RAxisDrawable()
0046 {
0047 SetPos(pos);
0048 SetVertical(vertical);
0049 SetLength(len);
0050 }
0051
0052 RAxisDrawable &SetPos(const RPadPos &pos) { fPos = pos; return *this; }
0053 RAxisDrawable &SetVertical(bool vertical = true) { fVertical = vertical; return *this; }
0054 RAxisDrawable &SetLength(const RPadLength &len) { fLength = len; return *this; }
0055 RAxisDrawable &SetLabels(const std::vector<std::string> &lbls) { fLabels = lbls; return *this; }
0056
0057 bool IsVertical() const { return fVertical; }
0058 const RPadPos& GetPos() const { return fPos; }
0059 const RPadLength& GetLength() const { return fLength; }
0060 const std::vector<std::string> &GetLabels() const { return fLabels; }
0061 };
0062
0063
0064
0065 }
0066 }
0067
0068 #endif