Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RBox.hxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2021, 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_RBox
10#define ROOT7_RBox
11
13#include <ROOT/RAttrFill.hxx>
14#include <ROOT/RAttrBorder.hxx>
15#include <ROOT/RPadPos.hxx>
16
17#include <initializer_list>
18
19namespace ROOT {
20namespace Experimental {
21
22/** \class RBox
23\ingroup GrafROOT7
24\brief A simple box.
25\author Olivier Couet <Olivier.Couet@cern.ch>
26\date 2017-10-16
27\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
28*/
29
30class RBox : public ROnFrameDrawable {
31
32 RPadPos fP1, fP2; ///< box corners coordinates
33
34protected:
35 // constructor for derived classes
36 RBox(const char *csstype) : ROnFrameDrawable(csstype) {}
37
38public:
39
40 RAttrBorder border{this, "border"}; ///<! box border attributes
41 RAttrFill fill{this, "fill"}; ///<! box fill attributes
42
43 RBox() : RBox("box") {}
44
45 RBox(const RPadPos &p1, const RPadPos &p2) : RBox()
46 {
47 fP1 = p1;
48 fP2 = p2;
49 }
50
51 RBox &SetP1(const RPadPos &p1) { fP1 = p1; return *this; }
52 RBox &SetP2(const RPadPos &p2) { fP2 = p2; return *this; }
53
54 const RPadPos &GetP1() const { return fP1; }
55 const RPadPos &GetP2() const { return fP2; }
56};
57
58} // namespace Experimental
59} // namespace ROOT
60
61#endif
Drawing line attributes for different objects.
Drawing fill attributes for different objects.
Definition RAttrFill.hxx:26
RAttrFill fill
! box fill attributes
Definition RBox.hxx:41
RPadPos fP2
box corners coordinates
Definition RBox.hxx:32
RAttrBorder border
! box border attributes
Definition RBox.hxx:40
const RPadPos & GetP1() const
Definition RBox.hxx:54
RBox & SetP2(const RPadPos &p2)
Definition RBox.hxx:52
RBox & SetP1(const RPadPos &p1)
Definition RBox.hxx:51
RBox(const RPadPos &p1, const RPadPos &p2)
Definition RBox.hxx:45
const RPadPos & GetP2() const
Definition RBox.hxx:55
RBox(const char *csstype)
Definition RBox.hxx:36
ROnFrameDrawable(const ROnFrameDrawable &)=delete
A position (horizontal and vertical) in a RPad.
Definition RPadPos.hxx:28
Namespace for ROOT features in testing.
Definition TROOT.h:100
Small utility to parse cmdline options.
Definition RExports.h:71