File indexing completed on 2025-01-18 10:11:44
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TEveViewer
0013 #define ROOT_TEveViewer
0014
0015 #include "TEveElement.h"
0016 #include "TEveWindow.h"
0017
0018 class TGWindow;
0019 class TGedEditor;
0020 class TGLViewer;
0021 class TGLSAViewer;
0022 class TGLEmbeddedViewer;
0023
0024 class TEveScene;
0025
0026
0027
0028
0029
0030 class TEveViewer : public TEveWindowFrame
0031 {
0032 private:
0033 TEveViewer(const TEveViewer&);
0034 TEveViewer& operator=(const TEveViewer&);
0035
0036 protected:
0037 TGLViewer *fGLViewer;
0038 TGFrame *fGLViewerFrame;
0039
0040 static Bool_t fgInitInternal;
0041 static Bool_t fgRecreateGlOnDockOps;
0042 static void InitInternal();
0043
0044 public:
0045 TEveViewer(const char* n="TEveViewer", const char* t="");
0046 ~TEveViewer() override;
0047
0048 void PreUndock() override;
0049 void PostDock() override;
0050
0051 TGLViewer* GetGLViewer() const { return fGLViewer; }
0052 void SetGLViewer(TGLViewer* viewer, TGFrame* frame);
0053
0054 TGLSAViewer* SpawnGLViewer(TGedEditor* ged=nullptr, Bool_t stereo=kFALSE, Bool_t quad_buf=kTRUE);
0055 TGLEmbeddedViewer* SpawnGLEmbeddedViewer(TGedEditor* ged=nullptr, Int_t border=0);
0056
0057 void Redraw(Bool_t resetCameras=kFALSE);
0058 void SwitchStereo();
0059
0060 virtual void AddScene(TEveScene* scene);
0061
0062 void RemoveElementLocal(TEveElement* el) override;
0063 void RemoveElementsLocal() override;
0064
0065 TObject* GetEditorObject(const TEveException& eh="TEveViewer::GetEditorObject ") const override;
0066
0067 Bool_t HandleElementPaste(TEveElement* el) override;
0068
0069 const TGPicture* GetListTreeIcon(Bool_t open=kFALSE) override;
0070
0071 ClassDefOverride(TEveViewer, 0);
0072 };
0073
0074
0075
0076
0077
0078
0079 class TEveViewerList : public TEveElementList
0080 {
0081 private:
0082 TEveViewerList(const TEveViewerList&);
0083 TEveViewerList& operator=(const TEveViewerList&);
0084
0085 protected:
0086 Bool_t fShowTooltip;
0087
0088 Float_t fBrightness;
0089 Bool_t fUseLightColorSet;
0090
0091 void HandleTooltip();
0092
0093 public:
0094 TEveViewerList(const char* n="TEveViewerList", const char* t="");
0095 ~TEveViewerList() override;
0096
0097 void AddElement(TEveElement* el) override;
0098 void RemoveElementLocal(TEveElement* el) override;
0099 void RemoveElementsLocal() override;
0100
0101
0102
0103 virtual void Connect();
0104 virtual void Disconnect();
0105
0106 void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals);
0107 void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals);
0108 void DeleteAnnotations();
0109
0110 void SceneDestructing(TEveScene* scene);
0111
0112
0113
0114 void OnMouseOver(TObject* obj, UInt_t state);
0115 void OnReMouseOver(TObject* obj, UInt_t state);
0116 void OnUnMouseOver(TObject* obj, UInt_t state);
0117 void OnClicked(TObject *obj, UInt_t button, UInt_t state);
0118 void OnReClicked(TObject *obj, UInt_t button, UInt_t state);
0119 void OnUnClicked(TObject *obj, UInt_t button, UInt_t state);
0120
0121
0122
0123 Bool_t GetShowTooltip() const { return fShowTooltip; }
0124 void SetShowTooltip(Bool_t x) { fShowTooltip = x; }
0125
0126 Float_t GetColorBrightness() const { return fBrightness; }
0127 void SetColorBrightness(Float_t b);
0128
0129 Bool_t UseLightColorSet() const { return fUseLightColorSet; }
0130 void SwitchColorSet();
0131
0132 ClassDefOverride(TEveViewerList, 0);
0133 };
0134
0135 #endif