Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
REveViewer.hxx
Go to the documentation of this file.
1 // @(#)root/eve7:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007, 2018
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT7_REveViewer
13 #define ROOT7_REveViewer
14 
15 #include <ROOT/REveElement.hxx>
16 
17 namespace ROOT {
18 namespace Experimental {
19 
20 class REveScene;
21 
22 ////////////////////////////////////////////////////////////////////////////////
23 /// REveViewer
24 /// Reve representation of TGLViewer.
25 ////////////////////////////////////////////////////////////////////////////////
26 
27 class REveViewer : public REveElement
28 {
29 private:
30  REveViewer(const REveViewer&); // Not implemented
31  REveViewer& operator=(const REveViewer&); // Not implemented
32 
33 public:
34  REveViewer(const std::string &n="REveViewer", const std::string &t="");
35  virtual ~REveViewer();
36 
37  void Redraw(Bool_t resetCameras=kFALSE);
38 
39  virtual void AddScene(REveScene* scene);
40  // XXX Missing RemoveScene() ????
41 
42  void RemoveElementLocal(REveElement *el) override;
43  void RemoveElementsLocal() override;
44 };
45 
46 
47 ////////////////////////////////////////////////////////////////////////////////
48 /// REveViewerList
49 /// List of Viewers providing common operations on REveViewer collections.
50 ////////////////////////////////////////////////////////////////////////////////
51 
52 class REveViewerList : public REveElement
53 {
54 private:
55  REveViewerList(const REveViewerList&); // Not implemented
56  REveViewerList& operator=(const REveViewerList&); // Not implemented
57 
58 protected:
59  Bool_t fShowTooltip;
60 
61  Float_t fBrightness;
62  Bool_t fUseLightColorSet;
63 
64  void HandleTooltip();
65 
66 public:
67  REveViewerList(const std::string &n="REveViewerList", const std::string &t="");
68  virtual ~REveViewerList();
69 
70  void AddElement(REveElement* el) override;
71  void RemoveElementLocal(REveElement* el) override;
72  void RemoveElementsLocal() override;
73 
74  // --------------------------------
75 
76  virtual void Connect();
77  virtual void Disconnect();
78 
79  void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals);
80  void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals);
81  void DeleteAnnotations();
82 
83  void SceneDestructing(REveScene* scene);
84 
85  // --------------------------------
86 
87  void OnMouseOver(TObject* obj, UInt_t state);
88  void OnReMouseOver(TObject* obj, UInt_t state);
89  void OnUnMouseOver(TObject* obj, UInt_t state);
90  void OnClicked(TObject *obj, UInt_t button, UInt_t state);
91  void OnReClicked(TObject *obj, UInt_t button, UInt_t state);
92  void OnUnClicked(TObject *obj, UInt_t button, UInt_t state);
93 
94  // --------------------------------
95 
96  Bool_t GetShowTooltip() const { return fShowTooltip; }
97  void SetShowTooltip(Bool_t x) { fShowTooltip = x; }
98 
99  Float_t GetColorBrightness() const { return fBrightness; }
100  void SetColorBrightness(Float_t b);
101 
102  Bool_t UseLightColorSet() const { return fUseLightColorSet; }
103  void SwitchColorSet();
104 };
105 
106 } // namespace Experimental
107 } // namespace ROOT
108 
109 #endif