CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CmsAnnotation.h
Go to the documentation of this file.
1 #ifndef Fireworks_Core_CmsAnnotation_h
2 #define Fireworks_Core_CmsAnnotation_h
3 
4 #include "TGLOverlay.h"
5 
6 class TGLViewer;
7 class FWConfiguration;
8 
9 class CmsAnnotation : public TGLOverlayElement {
10 private:
11  enum EDrag { kMove, kResize, kNone};
12 
13 public:
14  CmsAnnotation(TGLViewerBase *parent, Float_t posx, Float_t posy);
15  virtual ~CmsAnnotation();
16 
17  // ---------- member, functions -------------------------
18 
19  //configuration management interface
20  virtual void addTo(FWConfiguration&) const;
21  virtual void setFrom(const FWConfiguration&);
22 
23  virtual void Render(TGLRnrCtx& rnrCtx);
24 
25  virtual Bool_t MouseEnter(TGLOvlSelectRecord& selRec);
26  virtual Bool_t Handle(TGLRnrCtx& rnrCtx, TGLOvlSelectRecord& selRec,
27  Event_t* event);
28  virtual void MouseLeave();
29 
30  Float_t getSize() const { return fSize; }
31  void setSize(Float_t x) { fSize = x; }
32 
33  bool getVisible() const;
34  void setVisible(bool x);
35 
36  bool getAllowDestroy() const { return fAllowDestroy; }
37  void setAllowDestroy(bool x) { fAllowDestroy = x; }
38 
39 private:
40  CmsAnnotation(const CmsAnnotation&); // stop default
41  const CmsAnnotation& operator=(const CmsAnnotation&); // stop default
42 
43  Float_t fPosX; // x position [0, 1]
44  Float_t fPosY; // y position [0, 1]
45 
46  Int_t fMouseX, fMouseY;
48 
49  TGLViewer *fParent;
50 
51  Float_t fSize;
52  Float_t fSizeDrag;
53 
54  bool fActive;
56 };
57 
58 #endif
virtual void MouseLeave()
list parent
Definition: dbtoconf.py:74
bool getVisible() const
virtual void setFrom(const FWConfiguration &)
void setSize(Float_t x)
Definition: CmsAnnotation.h:31
void setAllowDestroy(bool x)
Definition: CmsAnnotation.h:37
const CmsAnnotation & operator=(const CmsAnnotation &)
bool getAllowDestroy() const
Definition: CmsAnnotation.h:36
virtual void Render(TGLRnrCtx &rnrCtx)
TGLViewer * fParent
Definition: CmsAnnotation.h:49
Float_t getSize() const
Definition: CmsAnnotation.h:30
virtual void addTo(FWConfiguration &) const
CmsAnnotation(TGLViewerBase *parent, Float_t posx, Float_t posy)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
EDrag fDrag
last mouse position
Definition: CmsAnnotation.h:47
virtual Bool_t Handle(TGLRnrCtx &rnrCtx, TGLOvlSelectRecord &selRec, Event_t *event)
virtual Bool_t MouseEnter(TGLOvlSelectRecord &selRec)
x
Definition: VDTMath.h:216
virtual ~CmsAnnotation()
void setVisible(bool x)
Float_t fSizeDrag
relative size to viewport width
Definition: CmsAnnotation.h:52