Logo ROOT   6.14/05
Reference Guide
TPadPainter.hxx
Go to the documentation of this file.
1 /// \file ROOT/TPadPainter.hxx
2 /// \ingroup Gpad ROOT7
3 /// \author Sergey Linev
4 /// \date 2018-03-12
5 /// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6 /// is welcome!
7 
8 /*************************************************************************
9  * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
10  * All rights reserved. *
11  * *
12  * For the licensing terms see $ROOTSYS/LICENSE. *
13  * For the list of contributors see $ROOTSYS/README/CREDITS. *
14  *************************************************************************/
15 
16 #ifndef ROOT7_TPadPainter
17 #define ROOT7_TPadPainter
18 
19 #include "ROOT/TDisplayItem.hxx"
20 
21 #include <memory>
22 #include <string>
23 
24 namespace ROOT {
25 namespace Experimental {
26 
27 class TPadDisplayItem;
28 class TPadDrawable;
29 class TPadBase;
30 
31 namespace Internal {
32 
33 /** \class ROOT::Experimental::Internal::TPadPainter
34  Abstract interface for object painting on the pad/canvas.
35  */
36 
37 class TPadPainter {
38 
40 
41 protected:
42 
43  std::unique_ptr<TPadDisplayItem> fPadDisplayItem; ///<! display items for all drawables in the pad
44  std::string fCurrentDrawableId; ///<! current drawable id
45 
46  void PaintDrawables(const TPadBase &pad);
47 
48 public:
49 
50  /// Default constructor
51  TPadPainter() = default;
52 
53  /// Default destructor.
54  virtual ~TPadPainter();
55 
56  /// add display item to the canvas
57  virtual void AddDisplayItem(std::unique_ptr<TDisplayItem> &&item);
58 };
59 
60 } // namespace Internal
61 } // namespace Experimental
62 } // namespace ROOT
63 
64 #endif // ROOT7_TPadPainter
Draw a TPad, by drawing its contained graphical elements at the pad offset in the parent pad...
Definition: TPad.hxx:268
std::string fCurrentDrawableId
! current drawable id
Definition: TPadPainter.hxx:44
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
void PaintDrawables(const TPadBase &pad)
Definition: TPadPainter.cxx:27
std::unique_ptr< TPadDisplayItem > fPadDisplayItem
! display items for all drawables in the pad
Definition: TPadPainter.hxx:43
Base class for graphic containers for TDrawable-s.
Definition: TPad.hxx:41
Abstract interface for object painting on the pad/canvas.
Definition: TPadPainter.hxx:37
TPadPainter()=default
Default constructor.
virtual void AddDisplayItem(std::unique_ptr< TDisplayItem > &&item)
add display item to the canvas
Definition: TPadPainter.cxx:21
virtual ~TPadPainter()
Default destructor.
Definition: TPadPainter.cxx:15