Logo ROOT  
Reference Guide
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&) = delete;
31  REveViewer& operator=(const REveViewer&) = delete;
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&) = delete;
56  REveViewerList& operator=(const REveViewerList&) = delete;
57 
58 protected:
60 
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; }
101 
102  Bool_t UseLightColorSet() const { return fUseLightColorSet; }
103  void SwitchColorSet();
104 };
105 
106 } // namespace Experimental
107 } // namespace ROOT
108 
109 #endif
n
const Int_t n
Definition: legend1.C:16
ROOT::Experimental::REveViewerList::GetShowTooltip
Bool_t GetShowTooltip() const
Definition: REveViewer.hxx:108
ROOT::Experimental::REveViewerList::fBrightness
Float_t fBrightness
Definition: REveViewer.hxx:73
ROOT::Experimental::REveViewer::REveViewer
REveViewer(const REveViewer &)=delete
ROOT::Experimental::REveViewer::Redraw
void Redraw(Bool_t resetCameras=kFALSE)
Redraw viewer immediately.
Definition: REveViewer.cxx:47
ROOT::Experimental::REveViewer::RemoveElementsLocal
void RemoveElementsLocal() override
Remove all children, forwarded to GLViewer.
Definition: REveViewer.cxx:89
ROOT::Experimental::REveViewerList::OnUnClicked
void OnUnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::UnClicked().
Definition: REveViewer.cxx:406
ROOT::Experimental::REveViewerList::SwitchColorSet
void SwitchColorSet()
Switch background color.
Definition: REveViewer.cxx:425
ROOT::Experimental::REveViewerList::RemoveElementLocal
void RemoveElementLocal(REveElement *el) override
Decompoundofy el, call base-class version.
Definition: REveViewer.cxx:138
ROOT::Experimental::REveViewerList::RepaintAllViewers
void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint all viewers.
Definition: REveViewer.cxx:231
ROOT::Experimental::REveViewerList::OnClicked
void OnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::Clicked().
Definition: REveViewer.cxx:372
Float_t
float Float_t
Definition: RtypesCore.h:57
ROOT::Experimental::REveViewerList::REveViewerList
REveViewerList(const REveViewerList &)=delete
ROOT::Experimental::REveViewerList::AddElement
void AddElement(REveElement *el) override
Call base-class implementation.
Definition: REveViewer.cxx:130
x
Double_t x[n]
Definition: legend1.C:17
ROOT::Experimental::REveViewerList::DeleteAnnotations
void DeleteAnnotations()
Delete annotations from all viewers.
Definition: REveViewer.cxx:248
ROOT::Experimental::REveViewerList::Connect
virtual void Connect()
Connect to TGLViewer class-signals.
Definition: REveViewer.cxx:164
ROOT::Experimental::REveViewerList::RepaintChangedViewers
void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint viewers that are tagged as changed.
Definition: REveViewer.cxx:212
ROOT::Experimental::REveElement
Definition: REveElement.hxx:79
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
b
#define b(i)
Definition: RSha256.hxx:118
bool
ROOT::Experimental::REveViewerList::OnMouseOver
void OnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::MouseOver() signal.
Definition: REveViewer.cxx:306
ROOT::Experimental::REveViewerList::SetShowTooltip
void SetShowTooltip(Bool_t x)
Definition: REveViewer.hxx:109
ROOT::Experimental::REveViewerList::OnUnMouseOver
void OnUnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::UnMouseOver().
Definition: REveViewer.cxx:350
ROOT::Experimental::REveViewerList::fUseLightColorSet
Bool_t fUseLightColorSet
Definition: REveViewer.hxx:74
ROOT::Experimental::REveScene
Definition: REveScene.hxx:45
ROOT::Experimental::REveViewerList::UseLightColorSet
Bool_t UseLightColorSet() const
Definition: REveViewer.hxx:114
REveElement.hxx
ROOT::Experimental::REveViewerList::~REveViewerList
virtual ~REveViewerList()
Destructor.
Definition: REveViewer.cxx:120
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
ROOT::Experimental::REveViewerList::Disconnect
virtual void Disconnect()
Disconnect from TGLViewer class-signals.
Definition: REveViewer.cxx:188
ROOT::Experimental::REveViewerList::OnReClicked
void OnReClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::ReClicked().
Definition: REveViewer.cxx:389
ROOT::Experimental::REveViewerList::operator=
REveViewerList & operator=(const REveViewerList &)=delete
ROOT::Experimental::REveViewerList::SetColorBrightness
void SetColorBrightness(Float_t b)
Set color brightness.
Definition: REveViewer.cxx:417
unsigned int
ROOT::Experimental::REveViewerList::HandleTooltip
void HandleTooltip()
Show / hide tooltip for various MouseOver events.
Definition: REveViewer.cxx:275
ROOT::Experimental::REveViewer::operator=
REveViewer & operator=(const REveViewer &)=delete
ROOT::Experimental::REveViewer::RemoveElementLocal
void RemoveElementLocal(REveElement *el) override
Remove element 'el' from the list of children and also remove appropriate GLScene from GLViewer's lis...
Definition: REveViewer.cxx:78
ROOT::Experimental::REveViewerList::OnReMouseOver
void OnReMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::ReMouseOver().
Definition: REveViewer.cxx:328
TObject
Definition: TObject.h:37
ROOT::Experimental::REveViewer::AddScene
virtual void AddScene(REveScene *scene)
Add 'scene' to the list of scenes.
Definition: REveViewer.cxx:56
ROOT::Experimental::REveViewerList
REveViewerList List of Viewers providing common operations on REveViewer collections.
Definition: REveViewer.hxx:64
ROOT::Experimental::REveViewerList::SceneDestructing
void SceneDestructing(REveScene *scene)
Callback done from a REveScene destructor allowing proper removal of the scene from affected viewers.
Definition: REveViewer.cxx:260
ROOT::Experimental::REveViewerList::fShowTooltip
Bool_t fShowTooltip
Definition: REveViewer.hxx:71
ROOT::Experimental::REveViewerList::GetColorBrightness
Float_t GetColorBrightness() const
Definition: REveViewer.hxx:111
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Experimental::REveViewer::~REveViewer
virtual ~REveViewer()
Destructor.
Definition: REveViewer.cxx:41
ROOT::Experimental::REveViewerList::RemoveElementsLocal
void RemoveElementsLocal() override
Decompoundofy children, call base-class version.
Definition: REveViewer.cxx:149