Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:58

0001 // @(#)root/eve:$Id$
0002 // Author: Matevz Tadel 2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGLCameraGuide
0013 #define ROOT_TGLCameraGuide
0014 
0015 #include "TGLOverlay.h"
0016 
0017 class TGLCameraGuide : public TGLOverlayElement
0018 {
0019 private:
0020    TGLCameraGuide(const TGLCameraGuide&) = delete;
0021    TGLCameraGuide& operator=(const TGLCameraGuide&) = delete;
0022 
0023 protected:
0024    Float_t fXPos;
0025    Float_t fYPos;
0026    Float_t fSize;
0027 
0028    Int_t   fSelAxis;
0029    Bool_t  fInDrag;
0030 
0031 public:
0032    TGLCameraGuide(Float_t x, Float_t y, Float_t s,
0033                   ERole role=kUser, EState state=kActive);
0034    ~TGLCameraGuide() override {}
0035 
0036    void SetX(Float_t x) { fXPos = x; }
0037    void SetY(Float_t y) { fYPos = y; }
0038    void SetXY(Float_t x, Float_t y) { fXPos = x; fYPos = y; }
0039    void SetSize(Float_t s) { fSize = s; }
0040 
0041    Bool_t MouseEnter(TGLOvlSelectRecord& selRec) override;
0042    Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
0043                          Event_t* event) override;
0044    void   MouseLeave() override;
0045 
0046    void Render(TGLRnrCtx& rnrCtx) override;
0047 
0048    ClassDefOverride(TGLCameraGuide, 0); // Short description.
0049 };
0050 
0051 #endif