Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TGLManipSet.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_TGLManipSet
13#define ROOT_TGLManipSet
14
15#include "TGLOverlay.h"
16#include "TGLPShapeRef.h"
17
18class TGLManip;
19
21 public TGLPShapeRef
22{
23public:
25// clang++ <v20 (-Wshadow) complains about shadowing GuiTypes.h global enum ECursor. Let's silence warning:
26#if defined(__clang__) && __clang_major__ < 20
27#pragma clang diagnostic push
28#pragma clang diagnostic ignored "-Wshadow"
29#endif
31#if defined(__clang__) && __clang_major__ < 20
32#pragma clang diagnostic pop
33#endif
35
36private:
37 TGLManipSet(const TGLManipSet&) = delete;
39
40protected:
41 TGLManip *fManip[3]; ///<! manipulator store
42 EManip fType; ///<! current manipulator
43
44 Bool_t fDrawBBox; ///<! also draw bounding-box around physical
45
46public:
48 ~TGLManipSet() override;
49
50 void SetPShape(TGLPhysicalShape* shape) override;
51
52 Bool_t MouseEnter(TGLOvlSelectRecord& selRec) override;
54 Event_t* event) override;
55 void MouseLeave() override;
56
57 void Render(TGLRnrCtx& rnrCtx) override;
58
59 TGLManip* GetCurrentManip() const { return fManip[fType]; }
60
61 Int_t GetManipType() const { return fType; }
62 void SetManipType(Int_t type);
63 Bool_t GetDrawBBox() const { return fDrawBBox; }
64 void SetDrawBBox(Bool_t bb) { fDrawBBox = bb; }
65
66 ClassDefOverride(TGLManipSet, 0); // A collection of available manipulators.
67}; // endclass TGLManipSet
68
69
70#endif
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
bool Bool_t
Boolean (0=false, 1=true) (bool).
Definition RtypesCore.h:77
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
void MouseLeave() override
Mouse has left the element.
Bool_t Handle(TGLRnrCtx &rnrCtx, TGLOvlSelectRecord &selRec, Event_t *event) override
Handle overlay event.
TGLManip * fManip[3]
! manipulator store
Definition TGLManipSet.h:41
TGLManipSet(const TGLManipSet &)=delete
Bool_t MouseEnter(TGLOvlSelectRecord &selRec) override
Mouse has entered this element.
Int_t GetManipType() const
Definition TGLManipSet.h:61
Bool_t GetDrawBBox() const
Definition TGLManipSet.h:63
EManip fType
! current manipulator
Definition TGLManipSet.h:42
void SetManipType(Int_t type)
Set manipulator type, range checked.
void SetDrawBBox(Bool_t bb)
Definition TGLManipSet.h:64
Bool_t fDrawBBox
! also draw bounding-box around physical
Definition TGLManipSet.h:44
TGLManipSet & operator=(const TGLManipSet &)=delete
void Render(TGLRnrCtx &rnrCtx) override
Render the manipulator and bounding-box.
~TGLManipSet() override
Destructor.
TGLManip * GetCurrentManip() const
Definition TGLManipSet.h:59
void SetPShape(TGLPhysicalShape *shape) override
Set phys-shape, override of virtual from TGLPShapeRef.
Abstract base class for viewer manipulators, which allow direct in viewer manipulation of a (TGlPhysi...
Definition TGLManip.h:29
TGLOverlayElement(const TGLOverlayElement &)=delete
Selection record for overlay objects.
TGLPShapeRef(const TGLPShapeRef &)=delete
friend class TGLPhysicalShape
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:175