Logo ROOT   master
Reference Guide
TEveViewer.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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 ROOT_TEveViewer
13 #define ROOT_TEveViewer
14 
15 #include "TEveElement.h"
16 #include "TEveWindow.h"
17 
18 class TGWindow;
19 class TGedEditor;
20 class TGLViewer;
21 class TGLSAViewer;
22 class TGLEmbeddedViewer;
23 
24 class TEveScene;
25 
26 /******************************************************************************/
27 // TEveViewer
28 /******************************************************************************/
29 
31 {
32 private:
33  TEveViewer(const TEveViewer&); // Not implemented
34  TEveViewer& operator=(const TEveViewer&); // Not implemented
35 
36 protected:
39 
42  static void InitInternal();
43 
44 public:
45  TEveViewer(const char* n="TEveViewer", const char* t="");
46  virtual ~TEveViewer();
47 
48  virtual void PreUndock();
49  virtual void PostDock();
50 
51  TGLViewer* GetGLViewer() const { return fGLViewer; }
52  void SetGLViewer(TGLViewer* viewer, TGFrame* frame);
53 
54  TGLSAViewer* SpawnGLViewer(TGedEditor* ged=0, Bool_t stereo=kFALSE, Bool_t quad_buf=kTRUE);
56 
57  void Redraw(Bool_t resetCameras=kFALSE);
58  void SwitchStereo();
59 
60  virtual void AddScene(TEveScene* scene);
61 
62  virtual void RemoveElementLocal(TEveElement* el);
63  virtual void RemoveElementsLocal();
64 
65  virtual TObject* GetEditorObject(const TEveException& eh="TEveViewer::GetEditorObject ") const;
66 
68 
69  virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE);
70 
71  ClassDef(TEveViewer, 0); // Reve representation of TGLViewer.
72 };
73 
74 
75 /******************************************************************************/
76 // TEveViewerList
77 /******************************************************************************/
78 
80 {
81 private:
82  TEveViewerList(const TEveViewerList&); // Not implemented
83  TEveViewerList& operator=(const TEveViewerList&); // Not implemented
84 
85 protected:
87 
90 
91  void HandleTooltip();
92 
93 public:
94  TEveViewerList(const char* n="TEveViewerList", const char* t="");
95  virtual ~TEveViewerList();
96 
97  virtual void AddElement(TEveElement* el);
98  virtual void RemoveElementLocal(TEveElement* el);
99  virtual void RemoveElementsLocal();
100 
101  // --------------------------------
102 
103  virtual void Connect();
104  virtual void Disconnect();
105 
106  void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals);
107  void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals);
108  void DeleteAnnotations();
109 
110  void SceneDestructing(TEveScene* scene);
111 
112  // --------------------------------
113 
114  void OnMouseOver(TObject* obj, UInt_t state);
115  void OnReMouseOver(TObject* obj, UInt_t state);
116  void OnUnMouseOver(TObject* obj, UInt_t state);
117  void OnClicked(TObject *obj, UInt_t button, UInt_t state);
118  void OnReClicked(TObject *obj, UInt_t button, UInt_t state);
119  void OnUnClicked(TObject *obj, UInt_t button, UInt_t state);
120 
121  // --------------------------------
122 
123  Bool_t GetShowTooltip() const { return fShowTooltip; }
125 
128 
130  void SwitchColorSet();
131 
132  ClassDef(TEveViewerList, 0); // List of Viewers providing common operations on TEveViewer collections.
133 };
134 
135 #endif
virtual void PostDock()
Virtual function called after a window is docked.
Definition: TEveViewer.cxx:123
virtual void RemoveElementLocal(TEveElement *el)
Remove element 'el' from the list of children and also remove appropriate GLScene from GLViewer's lis...
Definition: TEveViewer.cxx:279
void OnUnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::UnMouseOver().
Definition: TEveViewer.cxx:583
void SetShowTooltip(Bool_t x)
Definition: TEveViewer.h:124
Eve representation of TGLScene.
Definition: TEveScene.h:26
List of Viewers providing common operations on TEveViewer collections.
Definition: TEveViewer.h:79
virtual void RemoveElementsLocal()
Remove all children, forwarded to GLViewer.
Definition: TEveViewer.cxx:288
float Float_t
Definition: RtypesCore.h:55
unsigned int UInt_t
Definition: CPyCppyy.h:44
virtual Bool_t HandleElementPaste(TEveElement *el)
Receive a pasted object.
Definition: TEveViewer.cxx:309
virtual ~TEveViewer()
Destructor.
Definition: TEveViewer.cxx:79
TGFrame * fGLViewerFrame
Definition: TEveViewer.h:38
int Int_t
Definition: CPyCppyy.h:43
void SetColorBrightness(Float_t b)
Set color brightness.
Definition: TEveViewer.cxx:650
virtual void Disconnect()
Disconnect from TGLViewer class-signals.
Definition: TEveViewer.cxx:413
void Redraw(Bool_t resetCameras=kFALSE)
Redraw viewer immediately.
Definition: TEveViewer.cxx:222
bool Bool_t
Definition: RtypesCore.h:61
void OnUnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::UnClicked().
Definition: TEveViewer.cxx:639
void HandleTooltip()
Show / hide tooltip for various MouseOver events.
Definition: TEveViewer.cxx:508
static Bool_t fgInitInternal
Definition: TEveViewer.h:40
virtual TObject * GetEditorObject(const TEveException &eh="TEveViewer::GetEditorObject ") const
Object to be edited when this is selected, returns the TGLViewer.
Definition: TEveViewer.cxx:297
void SwitchColorSet()
Switch background color.
Definition: TEveViewer.cxx:658
A list of TEveElements.
Definition: TEveElement.h:428
Minimal GL-viewer that can be embedded in a standard ROOT frames.
virtual void RemoveElementLocal(TEveElement *el)
Decompoundofy el, call base-class version.
Definition: TEveViewer.cxx:367
void SetGLViewer(TGLViewer *viewer, TGFrame *frame)
Set TGLViewer that is represented by this object.
Definition: TEveViewer.cxx:143
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:322
Float_t fBrightness
Definition: TEveViewer.h:88
void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint all viewers.
Definition: TEveViewer.cxx:457
Bool_t fShowTooltip
Definition: TEveViewer.h:86
void OnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::Clicked().
Definition: TEveViewer.cxx:605
The top level standalone GL-viewer - created via plugin manager.
Definition: TGLSAViewer.h:37
virtual void RemoveElementsLocal()
Decompoundofy children, call base-class version.
Definition: TEveViewer.cxx:376
TEveViewerList(const TEveViewerList &)
Float_t GetColorBrightness() const
Definition: TEveViewer.h:126
Bool_t GetShowTooltip() const
Definition: TEveViewer.h:123
TGLEmbeddedViewer * SpawnGLEmbeddedViewer(TGedEditor *ged=0, Int_t border=0)
Spawn new GLViewer and adopt it.
Definition: TEveViewer.cxx:200
Bool_t fUseLightColorSet
Definition: TEveViewer.h:89
Bool_t UseLightColorSet() const
Definition: TEveViewer.h:129
void OnReMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::ReMouseOver().
Definition: TEveViewer.cxx:561
static void InitInternal()
Initialize static data-members according to running conditions.
Definition: TEveViewer.cxx:92
void OnReClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::ReClicked().
Definition: TEveViewer.cxx:622
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition: TGLViewer.h:53
void SwitchStereo()
Switch stereo mode.
Definition: TEveViewer.cxx:233
void DeleteAnnotations()
Delete annotations from all viewers.
Definition: TEveViewer.cxx:475
const Bool_t kFALSE
Definition: RtypesCore.h:90
TGLViewer * GetGLViewer() const
Definition: TEveViewer.h:51
void OnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::MouseOver() signal.
Definition: TEveViewer.cxx:539
virtual const TGPicture * GetListTreeIcon(Bool_t open=kFALSE)
Return TEveViewer icon.
Definition: TEveViewer.cxx:134
Mother of all ROOT objects.
Definition: TObject.h:37
void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint viewers that are tagged as changed.
Definition: TEveViewer.cxx:437
void SceneDestructing(TEveScene *scene)
Callback done from a TEveScene destructor allowing proper removal of the scene from affected viewers...
Definition: TEveViewer.cxx:488
virtual void AddElement(TEveElement *el)
Call base-class implementation.
Definition: TEveViewer.cxx:358
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
Exception class thrown by TEve classes and macros.
Definition: TEveUtil.h:101
TGLViewer * fGLViewer
Definition: TEveViewer.h:37
virtual void Connect()
Connect to TGLViewer class-signals.
Definition: TEveViewer.cxx:389
virtual void PreUndock()
Virtual function called before a window is undocked.
Definition: TEveViewer.cxx:105
const Bool_t kTRUE
Definition: RtypesCore.h:89
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition: TEveElement.h:33
virtual ~TEveViewerList()
Destructor.
Definition: TEveViewer.cxx:348
const Int_t n
Definition: legend1.C:16
Encapsulates TGFrame into an eve-window.
Definition: TEveWindow.h:335
TEveViewer(const TEveViewer &)
Eve representation of TGLViewer.
Definition: TEveViewer.h:30
TEveViewer & operator=(const TEveViewer &)
TEveViewerList & operator=(const TEveViewerList &)
static Bool_t fgRecreateGlOnDockOps
Definition: TEveViewer.h:41
TGLSAViewer * SpawnGLViewer(TGedEditor *ged=0, Bool_t stereo=kFALSE, Bool_t quad_buf=kTRUE)
Spawn new GLViewer and adopt it.
Definition: TEveViewer.cxx:155
virtual void AddScene(TEveScene *scene)
Add 'scene' to the list of scenes.
Definition: TEveViewer.cxx:261