Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:36

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_RAttrMargins
0010 #define ROOT7_RAttrMargins
0011 
0012 #include <ROOT/RAttrAggregation.hxx>
0013 #include <ROOT/RAttrValue.hxx>
0014 #include <ROOT/RPadLength.hxx>
0015 
0016 namespace ROOT {
0017 namespace Experimental {
0018 
0019 /** \class RAttrMargins
0020 \ingroup GpadROOT7
0021 \author Sergey Linev <s.linev@gsi.de>
0022 \date 2020-02-20
0023 \brief A margins attributes. Only relative and pixel coordinates are allowed
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 RAttrMargins : public RAttrAggregation {
0028 
0029    R__ATTR_CLASS(RAttrMargins, "margins");
0030 
0031 public:
0032 
0033    RAttrValue<RPadLength> left{this, "left", 0._normal};     ///<! left margin
0034    RAttrValue<RPadLength> right{this, "right", 0._normal};   ///<! right margin
0035    RAttrValue<RPadLength> top{this, "top", 0._normal};       ///<! top margin
0036    RAttrValue<RPadLength> bottom{this, "bottom", 0._normal}; ///<! bottom margin
0037 
0038    RAttrMargins &operator=(const RPadLength &len)
0039    {
0040       left = len;
0041       right = len;
0042       top = len;
0043       bottom = len;
0044       return *this;
0045    }
0046 };
0047 
0048 } // namespace Experimental
0049 } // namespace ROOT
0050 
0051 #endif