Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
18class TGWindow;
19class TGedEditor;
20class TGLViewer;
21class TGLSAViewer;
23
24class TEveScene;
25
26/******************************************************************************/
27// TEveViewer
28/******************************************************************************/
29
31{
32private:
33 TEveViewer(const TEveViewer&); // Not implemented
34 TEveViewer& operator=(const TEveViewer&); // Not implemented
35
36protected:
39
42 static void InitInternal();
43
44public:
45 TEveViewer(const char* n="TEveViewer", const char* t="");
46 ~TEveViewer() override;
47
48 void PreUndock() override;
49 void PostDock() override;
50
51 TGLViewer* GetGLViewer() const { return fGLViewer; }
52 void SetGLViewer(TGLViewer* viewer, TGFrame* frame);
53
54 TGLSAViewer* SpawnGLViewer(TGedEditor* ged=nullptr, 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 void RemoveElementLocal(TEveElement* el) override;
63 void RemoveElementsLocal() override;
64
65 TObject* GetEditorObject(const TEveException& eh="TEveViewer::GetEditorObject ") const override;
66
68
69 const TGPicture* GetListTreeIcon(Bool_t open=kFALSE) override;
70
71 ClassDefOverride(TEveViewer, 0); // Reve representation of TGLViewer.
72};
73
74
75/******************************************************************************/
76// TEveViewerList
77/******************************************************************************/
78
80{
81private:
82 TEveViewerList(const TEveViewerList&); // Not implemented
83 TEveViewerList& operator=(const TEveViewerList&); // Not implemented
84
85protected:
87
90
91 void HandleTooltip();
92
93public:
94 TEveViewerList(const char* n="TEveViewerList", const char* t="");
95 ~TEveViewerList() override;
96
97 void AddElement(TEveElement* el) override;
98 void RemoveElementLocal(TEveElement* el) override;
99 void RemoveElementsLocal() override;
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
125
128
130 void SwitchColorSet();
131
132 ClassDefOverride(TEveViewerList, 0); // List of Viewers providing common operations on TEveViewer collections.
133};
134
135#endif
#define b(i)
Definition RSha256.hxx:100
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
A list of TEveElements.
Base class for TEveUtil visualization elements, providing hierarchy management, rendering control and...
Definition TEveElement.h:36
Exception class thrown by TEve classes and macros.
Definition TEveUtil.h:102
Eve representation of TGLScene.
Definition TEveScene.h:27
List of Viewers providing common operations on TEveViewer collections.
Definition TEveViewer.h:80
void SwitchColorSet()
Switch background color.
void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint viewers that are tagged as changed.
Float_t fBrightness
Definition TEveViewer.h:88
~TEveViewerList() override
Destructor.
Float_t GetColorBrightness() const
Definition TEveViewer.h:126
Bool_t fShowTooltip
Definition TEveViewer.h:86
void RemoveElementsLocal() override
Decompoundofy children, call base-class version.
void AddElement(TEveElement *el) override
Call base-class implementation.
TEveViewerList & operator=(const TEveViewerList &)
void OnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::MouseOver() signal.
void SetColorBrightness(Float_t b)
Set color brightness.
void OnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::Clicked().
void SetShowTooltip(Bool_t x)
Definition TEveViewer.h:124
void OnUnMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::UnMouseOver().
void OnReClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::ReClicked().
Bool_t GetShowTooltip() const
Definition TEveViewer.h:123
void OnReMouseOver(TObject *obj, UInt_t state)
Slot for global TGLViewer::ReMouseOver().
void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals)
Repaint all viewers.
void SceneDestructing(TEveScene *scene)
Callback done from a TEveScene destructor allowing proper removal of the scene from affected viewers.
void RemoveElementLocal(TEveElement *el) override
Decompoundofy el, call base-class version.
void HandleTooltip()
Show / hide tooltip for various MouseOver events.
Bool_t fUseLightColorSet
Definition TEveViewer.h:89
virtual void Disconnect()
Disconnect from TGLViewer class-signals.
virtual void Connect()
Connect to TGLViewer class-signals.
void OnUnClicked(TObject *obj, UInt_t button, UInt_t state)
Slot for global TGLViewer::UnClicked().
Bool_t UseLightColorSet() const
Definition TEveViewer.h:129
void DeleteAnnotations()
Delete annotations from all viewers.
TEveViewerList(const TEveViewerList &)
Eve representation of TGLViewer.
Definition TEveViewer.h:31
void SetGLViewer(TGLViewer *viewer, TGFrame *frame)
Set TGLViewer that is represented by this object.
static Bool_t fgInitInternal
Definition TEveViewer.h:40
void SwitchStereo()
Switch stereo mode.
TGLSAViewer * SpawnGLViewer(TGedEditor *ged=nullptr, Bool_t stereo=kFALSE, Bool_t quad_buf=kTRUE)
Spawn new GLViewer and adopt it.
void RemoveElementsLocal() override
Remove all children, forwarded to GLViewer.
TObject * GetEditorObject(const TEveException &eh="TEveViewer::GetEditorObject ") const override
Object to be edited when this is selected, returns the TGLViewer.
TGLEmbeddedViewer * SpawnGLEmbeddedViewer(TGedEditor *ged=nullptr, Int_t border=0)
Spawn new GLViewer and adopt it.
TEveViewer(const TEveViewer &)
void Redraw(Bool_t resetCameras=kFALSE)
Redraw viewer immediately.
TGLViewer * GetGLViewer() const
Definition TEveViewer.h:51
virtual void AddScene(TEveScene *scene)
Add 'scene' to the list of scenes.
static Bool_t fgRecreateGlOnDockOps
Definition TEveViewer.h:41
Bool_t HandleElementPaste(TEveElement *el) override
Receive a pasted object.
TGLViewer * fGLViewer
Definition TEveViewer.h:37
void PreUndock() override
Virtual function called before a window is undocked.
const TGPicture * GetListTreeIcon(Bool_t open=kFALSE) override
Return TEveViewer icon.
static void InitInternal()
Initialize static data-members according to running conditions.
TGFrame * fGLViewerFrame
Definition TEveViewer.h:38
TEveViewer & operator=(const TEveViewer &)
void PostDock() override
Virtual function called after a window is docked.
~TEveViewer() override
Destructor.
void RemoveElementLocal(TEveElement *el) override
Remove element 'el' from the list of children and also remove appropriate GLScene from GLViewer's lis...
Encapsulates TGFrame into an eve-window.
Definition TEveWindow.h:336
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition TGFrame.h:80
Minimal GL-viewer that can be embedded in a standard ROOT frames.
The top level standalone GL-viewer - created via plugin manager.
Definition TGLSAViewer.h:38
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition TGLViewer.h:55
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition TGPicture.h:25
ROOT GUI Window base class.
Definition TGWindow.h:23
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