Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
17namespace ROOT {
18namespace Experimental {
19
20class REveScene;
21
22////////////////////////////////////////////////////////////////////////////////
23/// REveViewer
24/// Reve representation of TGLViewer.
25////////////////////////////////////////////////////////////////////////////////
26
27class REveViewer : public REveElement
28{
29public:
32
33private:
34 REveViewer(const REveViewer&) = delete;
35 REveViewer& operator=(const REveViewer&) = delete;
36
39 bool fBlackBackground{false};
40
41 bool fMandatory{true};
42 std::string fPostStreamFlag;
43
44public:
45 REveViewer(const std::string &n="REveViewer", const std::string &t="");
46 ~REveViewer() override;
47
48 void Redraw(Bool_t resetCameras=kFALSE);
49
50 virtual void AddScene(REveScene* scene);
51 // XXX Missing RemoveScene() ????
52
55
56 void SetAxesType(int);
57 void SetBlackBackground(bool);
58
59 void DisconnectClient();
60 void ConnectClient();
61
62 void SetMandatory(bool x);
63 bool GetMandatory() { return fMandatory; }
64
65 void RemoveElementLocal(REveElement *el) override;
66 void RemoveElementsLocal() override;
67 Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override;
68};
69
70
71////////////////////////////////////////////////////////////////////////////////
72/// REveViewerList
73/// List of Viewers providing common operations on REveViewer collections.
74////////////////////////////////////////////////////////////////////////////////
75
77{
78private:
81
82protected:
84
87
88 void HandleTooltip();
89
90public:
91 REveViewerList(const std::string &n="REveViewerList", const std::string &t="");
92 ~REveViewerList() override;
93
94 void AddElement(REveElement* el) override;
95 void RemoveElementLocal(REveElement* el) override;
96 void RemoveElementsLocal() override;
97
98 // --------------------------------
99
100 virtual void Connect();
101 virtual void Disconnect();
102
103 void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals);
104 void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals);
105 void DeleteAnnotations();
106
107 void SceneDestructing(REveScene* scene);
108
109 // --------------------------------
110
111 void OnMouseOver(TObject* obj, UInt_t state);
112 void OnReMouseOver(TObject* obj, UInt_t state);
113 void OnUnMouseOver(TObject* obj, UInt_t state);
114 void OnClicked(TObject *obj, UInt_t button, UInt_t state);
115 void OnReClicked(TObject *obj, UInt_t button, UInt_t state);
116 void OnUnClicked(TObject *obj, UInt_t button, UInt_t state);
117
118 // --------------------------------
119
122
125
127 void SwitchColorSet();
128 // Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override;
129};
130
131} // namespace Experimental
132} // namespace ROOT
133
134#endif
#define b(i)
Definition RSha256.hxx:100
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
Eve representation of TGLScene.
REveViewerList List of Viewers providing common operations on REveViewer collections.
void RemoveElementsLocal() override
Decompoundofy children, call base-class version.
void OnUnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::UnClicked().
REveViewerList & operator=(const REveViewerList &)=delete
void AddElement(REveElement *el) override
Call base-class implementation.
~REveViewerList() override
Destructor.
void OnReClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::ReClicked().
void OnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::Clicked().
void HandleTooltip()
Show / hide tooltip for various MouseOver events.
void SceneDestructing(REveScene *scene)
Callback done from a REveScene destructor allowing proper removal of the scene from affected viewers.
void OnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::MouseOver() signal.
void SetColorBrightness(Float_t b)
Set color brightness.
void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint all viewers.
void OnUnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::UnMouseOver().
virtual void Disconnect()
Disconnect from TGLViewer class-signals.
void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint viewers that are tagged as changed.
void OnReMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::ReMouseOver().
void SwitchColorSet()
Switch background color.
REveViewerList(const REveViewerList &)=delete
virtual void Connect()
Connect to TGLViewer class-signals.
void DeleteAnnotations()
Delete annotations from all viewers.
void RemoveElementLocal(REveElement *el) override
Decompoundofy el, call base-class version.
REveViewer Reve representation of TGLViewer.
void RemoveElementLocal(REveElement *el) override
Remove element 'el' from the list of children and also remove appropriate GLScene from GLViewer's lis...
void DisconnectClient()
Function called from MIR when user closes one of the viewer window.
void ConnectClient()
Function called from MIR when user wants to stream unsubscribed view.
~REveViewer() override
Destructor.
void RemoveElementsLocal() override
Remove all children, forwarded to GLViewer.
REveViewer(const REveViewer &)=delete
void SetCameraType(ECameraType t)
REveViewer & operator=(const REveViewer &)=delete
Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override
Stream Camera Info.
ECameraType GetCameraType() const
void Redraw(Bool_t resetCameras=kFALSE)
Redraw viewer immediately.
virtual void AddScene(REveScene *scene)
Add 'scene' to the list of scenes.
Mother of all ROOT objects.
Definition TObject.h:41
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...