Back to home page

EIC code displayed by LXR

 
 

    


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

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_RPaveText
0010 #define ROOT7_RPaveText
0011 
0012 #include <ROOT/RPave.hxx>
0013 
0014 namespace ROOT {
0015 namespace Experimental {
0016 
0017 /** \class RPaveText
0018 \ingroup GrafROOT7
0019 \brief A RPave with text content
0020 \author Sergey Linev <S.Linev@gsi.de>
0021 \date 2020-06-19
0022 \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is
0023 welcome!
0024 */
0025 
0026 class RPaveText : public RPave {
0027 
0028    std::vector<std::string> fText; ///< list of text entries
0029 
0030 public:
0031    RPaveText() : RPave("pavetext") {}
0032 
0033    void AddLine(const std::string &txt) { fText.emplace_back(txt); }
0034 
0035    auto NumLines() const { return fText.size(); }
0036 
0037    const std::string &GetLine(int n) const { return fText[n]; }
0038 
0039    void ClearLines() { fText.clear(); }
0040 };
0041 
0042 } // namespace Experimental
0043 } // namespace ROOT
0044 
0045 #endif