Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
17class TGLRnrCtx;
19
20#include <list>
21
23{
24public:
26
27 enum EState { kInvisible = 1, kDisabled = 2, kActive = 4,
29
30private:
31 TGLOverlayElement(const TGLOverlayElement&); // Not implemented
32 TGLOverlayElement& operator=(const TGLOverlayElement&); // Not implemented
33
34protected:
37
39
40public:
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{
67private:
68 TGLOverlayList(const TGLOverlayList&); // Not implemented
69 TGLOverlayList& operator=(const TGLOverlayList&); // Not implemented
70
71protected:
72 std::list<TGLOverlayElement*> fElements;
73
74public:
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
bool Bool_t
Definition RtypesCore.h:63
#define ClassDef(name, id)
Definition Rtypes.h:337
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
An overlay element.
Definition TGLOverlay.h:23
void SetState(EState s)
Definition TGLOverlay.h:57
virtual Bool_t Handle(TGLRnrCtx &rnrCtx, TGLOvlSelectRecord &selRec, Event_t *event)
Handle overlay event.
TGLOverlayElement(const TGLOverlayElement &)
void ProjectionMatrixPushIdentity()
TGLOverlayElement & operator=(const TGLOverlayElement &)
TGLOverlayElement(ERole r=kUser, EState s=kActive)
Definition TGLOverlay.h:41
ERole GetRole() const
Definition TGLOverlay.h:53
virtual ~TGLOverlayElement()
Definition TGLOverlay.h:43
virtual void Render(TGLRnrCtx &rnrCtx)=0
virtual Bool_t MouseEnter(TGLOvlSelectRecord &selRec)
Mouse has entered this element.
void SetRole(ERole r)
Definition TGLOverlay.h:54
virtual Bool_t MouseStillInside(TGLOvlSelectRecord &selRec)
EState GetState() const
Definition TGLOverlay.h:56
virtual void MouseLeave()
Mouse has left the element.
void SetBinaryState(Bool_t s)
Definition TGLOverlay.h:59
Manage a collection of overlay elements.
Definition TGLOverlay.h:66
TGLOverlayList & operator=(const TGLOverlayList &)
TGLOverlayList(const TGLOverlayList &)
std::list< TGLOverlayElement * > fElements
Definition TGLOverlay.h:72
virtual ~TGLOverlayList()
Definition TGLOverlay.h:76
Selection record for overlay objects.
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition TGLRnrCtx.h:41
Event structure.
Definition GuiTypes.h:174