#ifndef ROOT_TGLOverlay_H
#define ROOT_TGLOverlay_H
#include <GuiTypes.h>
class TGLRnrCtx;
class TGLOvlSelectRecord;
#include <list>
class TGLOverlayElement
{
public:
enum ERole { kUser, kViewer, kAnnotation, kAll };
enum EState { kInvisible = 1, kDisabled = 2, kActive = 4,
kAllVisible = kDisabled | kActive };
private:
TGLOverlayElement(const TGLOverlayElement&);
TGLOverlayElement& operator=(const TGLOverlayElement&);
protected:
ERole fRole;
EState fState;
void ProjectionMatrixPushIdentity();
public:
TGLOverlayElement(ERole r=kUser, EState s=kActive) :
fRole(r), fState(s) {}
virtual ~TGLOverlayElement() {}
virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
virtual Bool_t MouseStillInside(TGLOvlSelectRecord& selRec);
virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
Event_t* event);
virtual void MouseLeave();
virtual void Render(TGLRnrCtx& rnrCtx) = 0;
ERole GetRole() const { return fRole; }
void SetRole(ERole r) { fRole = r; }
EState GetState() const { return fState; }
void SetState(EState s) { fState = s; }
void SetBinaryState(Bool_t s) { SetState(s ? kActive : kInvisible); }
ClassDef(TGLOverlayElement, 0)
};
class TGLOverlayList
{
private:
TGLOverlayList(const TGLOverlayList&);
TGLOverlayList& operator=(const TGLOverlayList&);
protected:
std::list<TGLOverlayElement*> fElements;
public:
TGLOverlayList() : fElements() {}
virtual ~TGLOverlayList() {}
ClassDef(TGLOverlayList, 0)
};
#endif