ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TGLOverlay.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_TGLOverlay_H
13 #define ROOT_TGLOverlay_H
14 
15 #include <GuiTypes.h>
16 
17 class TGLRnrCtx;
18 class TGLOvlSelectRecord;
19 
20 #include <list>
21 
23 {
24 public:
26 
27  enum EState { kInvisible = 1, kDisabled = 2, kActive = 4,
29 
30 private:
31  TGLOverlayElement(const TGLOverlayElement&); // Not implemented
32  TGLOverlayElement& operator=(const TGLOverlayElement&); // Not implemented
33 
34 protected:
37 
39 
40 public:
42  fRole(r), fState(s) {}
43  virtual ~TGLOverlayElement() {}
44 
45  virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
47  virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
48  Event_t* event);
49  virtual void MouseLeave();
50 
51  virtual void Render(TGLRnrCtx& rnrCtx) = 0;
52 
53  ERole GetRole() const { return fRole; }
54  void SetRole(ERole r) { fRole = r; }
55 
56  EState GetState() const { return fState; }
57  void SetState(EState s) { fState = s; }
58 
60 
61  ClassDef(TGLOverlayElement, 0) // Base class for GL overlay elements.
62 };
63 
64 
66 {
67 private:
68  TGLOverlayList(const TGLOverlayList&); // Not implemented
69  TGLOverlayList& operator=(const TGLOverlayList&); // Not implemented
70 
71 protected:
72  std::list<TGLOverlayElement*> fElements;
73 
74 public:
76  virtual ~TGLOverlayList() {}
77 
78  // void AddElement(TGLOverlayElement* element);
79  // void RemoveElement(TGLOverlayElement* element);
80 
81  // TGLOverlayElement* SelectElement(TGLSelectRecord& selRec, Int_t nameOff);
82 
83  ClassDef(TGLOverlayList, 0) // Collection of overlay elements to draw/select together.
84 };
85 
86 
87 #endif
void SetBinaryState(Bool_t s)
Definition: TGLOverlay.h:59
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:40
TGLOverlayElement(ERole r=kUser, EState s=kActive)
Definition: TGLOverlay.h:41
void ProjectionMatrixPushIdentity()
EState GetState() const
Definition: TGLOverlay.h:56
virtual ~TGLOverlayElement()
Definition: TGLOverlay.h:43
TGLOverlayList & operator=(const TGLOverlayList &)
bool Bool_t
Definition: RtypesCore.h:59
TGLOverlayElement & operator=(const TGLOverlayElement &)
An overlay element.
Definition: TGLOverlay.h:22
#define ClassDef(name, id)
Definition: Rtypes.h:254
void SetState(EState s)
Definition: TGLOverlay.h:57
virtual Bool_t MouseStillInside(TGLOvlSelectRecord &selRec)
Definition: TGLOverlay.cxx:30
virtual void MouseLeave()
Mouse has left the element.
Definition: TGLOverlay.cxx:56
ROOT::R::TRInterface & r
Definition: Object.C:4
virtual void Render(TGLRnrCtx &rnrCtx)=0
Manage a collection of overlay elements.
Definition: TGLOverlay.h:65
void SetRole(ERole r)
Definition: TGLOverlay.h:54
virtual Bool_t Handle(TGLRnrCtx &rnrCtx, TGLOvlSelectRecord &selRec, Event_t *event)
Handle overlay event.
Definition: TGLOverlay.cxx:46
virtual ~TGLOverlayList()
Definition: TGLOverlay.h:76
ERole GetRole() const
Definition: TGLOverlay.h:53
std::list< TGLOverlayElement * > fElements
Definition: TGLOverlay.h:72
TGLOverlayElement(const TGLOverlayElement &)
Selection record for overlay objects.
virtual Bool_t MouseEnter(TGLOvlSelectRecord &selRec)
Mouse has entered this element.
Definition: TGLOverlay.cxx:25