File indexing completed on 2025-01-30 10:22:38
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef ROOT7_RPad
0010 #define ROOT7_RPad
0011
0012 #include "ROOT/RPadBase.hxx"
0013
0014 namespace ROOT {
0015 namespace Experimental {
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 class RPad: public RPadBase {
0026
0027 friend class RPadBase;
0028
0029
0030 RPadBase *fParent{nullptr};
0031
0032 RPadPos fPos;
0033 RPadExtent fSize;
0034
0035
0036 RPad() : RPadBase("pad") {}
0037
0038
0039 RPad(const RPadPos &pos, const RPadExtent &size) : RPad()
0040 {
0041 fPos = pos;
0042 fSize = size;
0043 }
0044
0045
0046 void SetParent(RPadBase *parent) { fParent = parent; }
0047
0048 protected:
0049
0050 std::unique_ptr<RDisplayItem> Display(const RDisplayContext &) final;
0051
0052
0053 public:
0054
0055 RAttrBorder border{this, "border"};
0056
0057
0058 RPad(TRootIOCtor*) : RPad() {}
0059
0060
0061 ~RPad() override;
0062
0063
0064 const RPadBase *GetParent() const { return fParent; }
0065
0066
0067 RPadBase *GetParent() { return fParent; }
0068
0069
0070 const RCanvas *GetCanvas() const override { return fParent ? fParent->GetCanvas() : nullptr; }
0071
0072
0073 RCanvas *GetCanvas() override { return fParent ? fParent->GetCanvas() : nullptr; }
0074
0075
0076 const RPadPos &GetPos() const { return fPos; }
0077
0078
0079 const RPadExtent &GetSize() const { return fSize; }
0080
0081
0082 void SetSize(const RPadExtent &sz) { fSize = sz; }
0083
0084
0085 void SetPos(const RPadPos &p) { fPos = p; }
0086 };
0087
0088 }
0089 }
0090
0091 #endif