Logo ROOT  
Reference Guide
RObjectDrawable.hxx
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2017, 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_RObjectDrawable
10#define ROOT7_RObjectDrawable
11
12#include <ROOT/RDrawable.hxx>
13
14class TObject;
15
16namespace ROOT {
17namespace Experimental {
18
19class RPadBase;
20
21/** \class RObjectDrawable
22\ingroup GpadROOT7
23\brief Provides v7 drawing facilities for TObject types (TGraph etc).
24\author Sergey Linev
25\date 2017-05-31
26\warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback is welcome!
27*/
28
29class RObjectDrawable final : public RDrawable {
30
31 Internal::RIOShared<TObject> fObj; ///< The object to be painted
32
33 std::string fOpts; ///< drawing options
34
35protected:
36
37 void CollectShared(Internal::RIOSharedVector_t &vect) final { vect.emplace_back(&fObj); }
38
39 std::unique_ptr<RDisplayItem> Display(const RDisplayContext &) override;
40
41 void PopulateMenu(RMenuItems &) final;
42
43 void Execute(const std::string &) final;
44
45public:
46 RObjectDrawable() : RDrawable("tobject") {}
47
48 RObjectDrawable(const std::shared_ptr<TObject> &obj, const std::string &opt) : RDrawable("tobject"), fObj(obj), fOpts(opt) {}
49
50};
51
52} // namespace Experimental
53} // namespace ROOT
54
55
56#endif
Base class for drawable entities: objects that can be painted on a RPad.
Definition: RDrawable.hxx:102
List of items for object context menu.
Definition: RMenuItems.hxx:153
Provides v7 drawing facilities for TObject types (TGraph etc).
std::string fOpts
drawing options
Internal::RIOShared< TObject > fObj
The object to be painted.
void PopulateMenu(RMenuItems &) final
void Execute(const std::string &) final
void CollectShared(Internal::RIOSharedVector_t &vect) final
std::unique_ptr< RDisplayItem > Display(const RDisplayContext &) override
Creates display item for drawable By default item contains drawable data itself.
RObjectDrawable(const std::shared_ptr< TObject > &obj, const std::string &opt)
Mother of all ROOT objects.
Definition: TObject.h:37
std::vector< RIOSharedBase * > RIOSharedVector_t
Definition: RDrawable.hxx:51
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: StringConv.hxx:21