Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RAttrMargins.hxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
3 * All rights reserved. *
4 * *
5 * For the licensing terms see $ROOTSYS/LICENSE. *
6 * For the list of contributors see $ROOTSYS/README/CREDITS. *
7 *************************************************************************/
8
9#ifndef ROOT7_RAttrMargins
10#define ROOT7_RAttrMargins
11
12#include <ROOT/RAttrBase.hxx>
13#include <ROOT/RAttrValue.hxx>
14#include <ROOT/RPadLength.hxx>
15
16namespace ROOT {
17namespace Experimental {
18
19/** \class RAttrMargins
20\ingroup GpadROOT7
21\author Sergey Linev <s.linev@gsi.de>
22\date 2020-02-20
23\brief A margins attributes. Only relative and pixel coordinates are allowed
24\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
25*/
26
27class RAttrMargins : public RAttrBase {
28
29 RAttrValue<RPadLength> fLeft{this, "left", 0._normal};
30 RAttrValue<RPadLength> fRight{this, "right", 0._normal};
31 RAttrValue<RPadLength> fTop{this, "top", 0._normal};
32 RAttrValue<RPadLength> fBottom{this, "bottom", 0._normal};
33
35
36public:
37
38 RAttrMargins &SetLeft(const RPadLength &len) { fLeft = len; return *this; }
39 RPadLength GetLeft() const { return fLeft; }
40
41 RAttrMargins &SetRight(const RPadLength &len) { fRight = len; return *this; }
42 RPadLength GetRight() const { return fRight; }
43
44 RAttrMargins &SetTop(const RPadLength &len) { fTop = len; return *this; }
45 RPadLength GetTop() const { return fTop; }
46
47 RAttrMargins &SetBottom(const RPadLength &len) { fBottom = len; return *this; }
48 RPadLength GetBottom() const { return fBottom; }
49};
50
51} // namespace Experimental
52} // namespace ROOT
53
54#endif
Base class for all attributes, used with RDrawable.
Definition RAttrBase.hxx:31
A margins attributes. Only relative and pixel coordinates are allowed.
RAttrValue< RPadLength > fRight
R__ATTR_CLASS(RAttrMargins, "margin")
RAttrValue< RPadLength > fLeft
RAttrMargins & SetTop(const RPadLength &len)
RAttrMargins & SetRight(const RPadLength &len)
RAttrMargins & SetLeft(const RPadLength &len)
RAttrValue< RPadLength > fBottom
RAttrValue< RPadLength > fTop
RAttrMargins & SetBottom(const RPadLength &len)
Template class to access single value from drawable or other attributes.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...