// @(#)root/eve:$Id: TEveViewer.h 26850 2008-12-11 21:45:13Z matevz $
// 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 TGLPhysicalShape;

class TEveScene;

/******************************************************************************/
// TEveViewer
/******************************************************************************/

class TEveViewer : public TEveWindowFrame
{
private:
   TEveViewer(const TEveViewer&);            // Not implemented
   TEveViewer& operator=(const TEveViewer&); // Not implemented

protected:
   TGLViewer *fGLViewer;
   TGFrame   *fGLViewerFrame;

public:
   TEveViewer(const Text_t* n="TEveViewer", const Text_t* t="");
   virtual ~TEveViewer();

   virtual void PreUndock();
   virtual void PostDock();

   TGLViewer* GetGLViewer() const { return fGLViewer; }
   void SetGLViewer(TGLViewer* viewer, TGFrame* frame);
   void SpawnGLViewer(TGedEditor* ged);
   void SpawnGLEmbeddedViewer(Int_t border=0);
   void Redraw(Bool_t resetCameras=kFALSE);

   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;

public:
   TEveViewerList(const Text_t* n="TEveViewerList", const Text_t* t="");
   virtual ~TEveViewerList() {}

   virtual void AddElement(TEveElement* el);
   virtual void RemoveElementLocal(TEveElement* el);
   virtual void RemoveElementsLocal();

   // --------------------------------

   virtual void Connect();

   void RepaintChangedViewers(Bool_t resetCameras, Bool_t dropLogicals);
   void RepaintAllViewers(Bool_t resetCameras, Bool_t dropLogicals);

   void SceneDestructing(TEveScene* scene);

   // --------------------------------

   void OnMouseOver(TGLPhysicalShape* shape, UInt_t state);
   void OnClicked(TObject *obj, UInt_t button, UInt_t state);

   // --------------------------------

   Bool_t GetShowTooltip()   const { return fShowTooltip; }
   void   SetShowTooltip(Bool_t x) { fShowTooltip = x; }

   ClassDef(TEveViewerList, 0); // List of Viewers providing common operations on TEveViewer collections.
};

#endif

Last change: Fri Dec 12 14:35:10 2008
Last generated: 2008-12-12 14:35

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.