Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RPaveText.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_RPaveText
10#define ROOT7_RPaveText
11
12#include <ROOT/RPave.hxx>
13
14namespace ROOT {
15namespace Experimental {
16
17/** \class RPaveText
18\ingroup GrafROOT7
19\brief A RPave with text content
20\author Sergey Linev <S.Linev@gsi.de>
21\date 2020-06-19
22\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is
23welcome!
24*/
25
26class RPaveText : public RPave {
27
28 std::vector<std::string> fText; ///< list of text entries
29
30public:
31 RPaveText() : RPave("pavetext") {}
32
33 void AddLine(const std::string &txt) { fText.emplace_back(txt); }
34
35 auto NumLines() const { return fText.size(); }
36
37 const std::string &GetLine(int n) const { return fText[n]; }
38
39 void ClearLines() { fText.clear(); }
40};
41
42} // namespace Experimental
43} // namespace ROOT
44
45#endif
void AddLine(const std::string &txt)
Definition RPaveText.hxx:33
std::vector< std::string > fText
list of text entries
Definition RPaveText.hxx:28
const std::string & GetLine(int n) const
Definition RPaveText.hxx:37
RPave(const char *csstype)
Definition RPave.hxx:36
const Int_t n
Definition legend1.C:16
Namespace for ROOT features in testing.
Definition TROOT.h:100
Small utility to parse cmdline options.
Definition RExports.h:71