00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGLOverlay_H
00013 #define ROOT_TGLOverlay_H
00014
00015 #include <GuiTypes.h>
00016
00017 class TGLRnrCtx;
00018 class TGLOvlSelectRecord;
00019
00020 #include <list>
00021
00022 class TGLOverlayElement
00023 {
00024 public:
00025 enum ERole { kUser, kViewer, kAnnotation, kAll };
00026
00027 enum EState { kInvisible = 1, kDisabled = 2, kActive = 4,
00028 kAllVisible = kDisabled | kActive };
00029
00030 private:
00031 TGLOverlayElement(const TGLOverlayElement&);
00032 TGLOverlayElement& operator=(const TGLOverlayElement&);
00033
00034 protected:
00035 ERole fRole;
00036 EState fState;
00037
00038 void ProjectionMatrixPushIdentity();
00039
00040 public:
00041 TGLOverlayElement(ERole r=kUser, EState s=kActive) :
00042 fRole(r), fState(s) {}
00043 virtual ~TGLOverlayElement() {}
00044
00045 virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
00046 virtual Bool_t MouseStillInside(TGLOvlSelectRecord& selRec);
00047 virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
00048 Event_t* event);
00049 virtual void MouseLeave();
00050
00051 virtual void Render(TGLRnrCtx& rnrCtx) = 0;
00052
00053 ERole GetRole() const { return fRole; }
00054 void SetRole(ERole r) { fRole = r; }
00055
00056 EState GetState() const { return fState; }
00057 void SetState(EState s) { fState = s; }
00058
00059 void SetBinaryState(Bool_t s) { SetState(s ? kActive : kInvisible); }
00060
00061 ClassDef(TGLOverlayElement, 0)
00062 };
00063
00064
00065 class TGLOverlayList
00066 {
00067 private:
00068 TGLOverlayList(const TGLOverlayList&);
00069 TGLOverlayList& operator=(const TGLOverlayList&);
00070
00071 protected:
00072 std::list<TGLOverlayElement*> fElements;
00073
00074 public:
00075 TGLOverlayList() : fElements() {}
00076 virtual ~TGLOverlayList() {}
00077
00078
00079
00080
00081
00082
00083 ClassDef(TGLOverlayList, 0)
00084 };
00085
00086
00087 #endif