Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TGLEmbeddedViewer.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Bertrand Bellenot 23/01/2008
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2008, 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_TGLEmbeddedViewer
13 #define ROOT_TGLEmbeddedViewer
14 
15 #include "TGFrame.h"
16 
17 #include "TGLViewer.h"
18 
19 class TGLRenderArea;
20 class TGLEventHandler;
21 class TGedEditor;
22 
23 class TGLEmbeddedViewer : public TGLViewer
24 {
25 private:
26  // GUI components
27  TGCompositeFrame *fFrame;
28  Int_t fBorder;
29 
30  void Init(const TGWindow *parent);
31  void CreateFrames();
32 
33  TGLEmbeddedViewer(const TGLEmbeddedViewer&); // Not implemented
34  TGLEmbeddedViewer& operator=(const TGLEmbeddedViewer&); // Not implemented
35 
36 public:
37  TGLEmbeddedViewer(const TGWindow *parent, TVirtualPad *pad=0, Int_t border=2);
38  TGLEmbeddedViewer(const TGWindow *parent, TVirtualPad *pad, TGedEditor *ged, Int_t border=2);
39  ~TGLEmbeddedViewer();
40 
41  virtual void CreateGLWidget();
42  virtual void DestroyGLWidget();
43 
44  virtual const char *GetName() const { return "GLViewer"; }
45 
46  TGCompositeFrame* GetFrame() const { return fFrame; }
47 
48  TGLOrthoCamera *GetOrthoXOYCamera() { return &fOrthoXOYCamera; }
49  TGLOrthoCamera *GetOrthoXOZCamera() { return &fOrthoXOZCamera; }
50  TGLOrthoCamera *GetOrthoZOYCamera() { return &fOrthoZOYCamera; }
51  TGLOrthoCamera *GetOrthoZOXCamera() { return &fOrthoZOXCamera; }
52 
53  ClassDef(TGLEmbeddedViewer, 0); // Embedded GL viewer.
54 };
55 
56 #endif