Logo ROOT   6.12/07
Reference Guide
TGLManipSet.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Matevz Tadel, Feb 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, 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_TGLManipSet
13 #define ROOT_TGLManipSet
14 
15 #include <TObject.h>
16 #include "TGLOverlay.h"
17 #include "TGLPShapeRef.h"
18 
19 class TGLManip;
20 
22  public TGLPShapeRef
23 {
24 public:
26 
27 private:
28  TGLManipSet(const TGLManipSet&); // Not implemented
29  TGLManipSet& operator=(const TGLManipSet&); // Not implemented
30 
31 protected:
32  TGLManip *fManip[3]; //! manipulator store
33  EManip fType; //! current manipulator
34 
35  Bool_t fDrawBBox; //! also draw bounding-box around physical
36 
37 public:
38  TGLManipSet();
39  virtual ~TGLManipSet();
40 
41  virtual void SetPShape(TGLPhysicalShape* shape);
42 
43  virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
44  virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
45  Event_t* event);
46  virtual void MouseLeave();
47 
48  virtual void Render(TGLRnrCtx& rnrCtx);
49 
50  TGLManip* GetCurrentManip() const { return fManip[fType]; }
51 
52  Int_t GetManipType() const { return fType; }
53  void SetManipType(Int_t type);
54  Bool_t GetDrawBBox() const { return fDrawBBox; }
55  void SetDrawBBox(Bool_t bb) { fDrawBBox = bb; }
56 
57  ClassDef(TGLManipSet, 0); // A collection of available manipulators.
58 }; // endclass TGLManipSet
59 
60 
61 #endif
Abstract base class for viewer manipulators, which allow direct in viewer manipulation of a (TGlPhysi...
Definition: TGLManip.h:28
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:40
TGLManipSet & operator=(const TGLManipSet &)
Bool_t GetDrawBBox() const
Definition: TGLManipSet.h:54
virtual void SetPShape(TGLPhysicalShape *shape)
Set phys-shape, override of virtual from TGLPShapeRef.
Definition: TGLManipSet.cxx:64
virtual void MouseLeave()
Mouse has left the element.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
Combine all available manipulators in a collection.
Definition: TGLManipSet.h:21
An overlay element.
Definition: TGLOverlay.h:22
Concrete physical shape - a GL drawable.
Bool_t fDrawBBox
current manipulator
Definition: TGLManipSet.h:35
#define ClassDef(name, id)
Definition: Rtypes.h:320
virtual Bool_t MouseEnter(TGLOvlSelectRecord &selRec)
Mouse has entered this element.
Definition: TGLManipSet.cxx:75
virtual Bool_t Handle(TGLRnrCtx &rnrCtx, TGLOvlSelectRecord &selRec, Event_t *event)
Handle overlay event.
Definition: TGLManipSet.cxx:87
Int_t GetManipType() const
Definition: TGLManipSet.h:52
TGLManip * GetCurrentManip() const
Definition: TGLManipSet.h:50
Base class for references to TGLPysicalShape that need to be notified when the shape is destroyed...
Definition: TGLPShapeRef.h:19
void SetDrawBBox(Bool_t bb)
Definition: TGLManipSet.h:55
int type
Definition: TGX11.cxx:120
virtual void Render(TGLRnrCtx &rnrCtx)
Render the manipulator and bounding-box.
void SetManipType(Int_t type)
Set manipulator type, range checked.
TGLManipSet()
also draw bounding-box around physical
Definition: TGLManipSet.cxx:39
TGLManip * fManip[3]
Definition: TGLManipSet.h:32
Selection record for overlay objects.
EManip fType
manipulator store
Definition: TGLManipSet.h:33
virtual ~TGLManipSet()
Destructor.
Definition: TGLManipSet.cxx:54