forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TEveViewer.h
135 lines (95 loc) · 4.15 KB
/
TEveViewer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// @(#)root/eve:$Id$
// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
/*************************************************************************
* Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifndef ROOT_TEveViewer
#define ROOT_TEveViewer
#include "TEveElement.h"
#include "TEveWindow.h"
class TGWindow;
class TGedEditor;
class TGLViewer;
class TGLSAViewer;
class TGLEmbeddedViewer;
class TEveScene;
/******************************************************************************/
// TEveViewer
/******************************************************************************/
class TEveViewer : public TEveWindowFrame
{
private:
TEveViewer(const TEveViewer&); // Not implemented
TEveViewer& operator=(const TEveViewer&); // Not implemented
protected:
TGLViewer *fGLViewer;
TGFrame *fGLViewerFrame;
static Bool_t fgInitInternal;
static Bool_t fgRecreateGlOnDockOps;
static void InitInternal();
public:
TEveViewer(const char* n="TEveViewer", const char* t="");
virtual ~TEveViewer();
virtual void PreUndock();
virtual void PostDock();
TGLViewer* GetGLViewer() const { return fGLViewer; }
void SetGLViewer(TGLViewer* viewer, TGFrame* frame);
TGLSAViewer* SpawnGLViewer(TGedEditor* ged=0, Bool_t stereo=kFALSE, Bool_t quad_buf=kTRUE);
TGLEmbeddedViewer* SpawnGLEmbeddedViewer(TGedEditor* ged=0, Int_t border=0);
void Redraw(Bool_t resetCameras=kFALSE);
void SwitchStereo();
virtual void AddScene(TEveScene* scene);
virtual void RemoveElementLocal(TEveElement* el);
virtual void RemoveElementsLocal();
virtual TObject* GetEditorObject(const TEveException& eh="TEveViewer::GetEditorObject ") const;
virtual Bool_t HandleElementPaste(TEveElement* el);
virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE);
ClassDef(TEveViewer, 0); // Reve representation of TGLViewer.
};
/******************************************************************************/
// TEveViewerList
/******************************************************************************/
class TEveViewerList : public TEveElementList
{
private:
TEveViewerList(const TEveViewerList&); // Not implemented
TEveViewerList& operator=(const TEveViewerList&); // Not implemented
protected:
Bool_t fShowTooltip;
Float_t fBrightness;
Bool_t fUseLightColorSet;
void HandleTooltip();
public:
TEveViewerList(const char* n="TEveViewerList", const char* t="");
virtual ~TEveViewerList();
virtual void AddElement(TEveElement* el);
virtual void RemoveElementLocal(TEveElement* el);
virtual void RemoveElementsLocal();
// --------------------------------
virtual void Connect();
virtual void Disconnect();
void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals);
void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals);
void DeleteAnnotations();
void SceneDestructing(TEveScene* scene);
// --------------------------------
void OnMouseOver(TObject* obj, UInt_t state);
void OnReMouseOver(TObject* obj, UInt_t state);
void OnUnMouseOver(TObject* obj, UInt_t state);
void OnClicked(TObject *obj, UInt_t button, UInt_t state);
void OnReClicked(TObject *obj, UInt_t button, UInt_t state);
void OnUnClicked(TObject *obj, UInt_t button, UInt_t state);
// --------------------------------
Bool_t GetShowTooltip() const { return fShowTooltip; }
void SetShowTooltip(Bool_t x) { fShowTooltip = x; }
Float_t GetColorBrightness() const { return fBrightness; }
void SetColorBrightness(Float_t b);
Bool_t UseLightColorSet() const { return fUseLightColorSet; }
void SwitchColorSet();
ClassDef(TEveViewerList, 0); // List of Viewers providing common operations on TEveViewer collections.
};
#endif