Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TEveSecondarySelectable.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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_TEveSecondarySelectable
0013 #define ROOT_TEveSecondarySelectable
0014 
0015 #include "Rtypes.h"
0016 
0017 #include <set>
0018 
0019 class TGLSelectRecord;
0020 
0021 
0022 class TEveSecondarySelectable
0023 {
0024 private:
0025    TEveSecondarySelectable(const TEveSecondarySelectable&);            // Not implemented
0026    TEveSecondarySelectable& operator=(const TEveSecondarySelectable&); // Not implemented
0027 
0028 public:
0029    typedef std::set<Int_t>                SelectionSet_t;
0030    typedef SelectionSet_t::iterator       SelectionSet_i;
0031    typedef SelectionSet_t::const_iterator SelectionSet_ci;
0032 
0033 
0034 protected:
0035    Bool_t         fAlwaysSecSelect; // Always do secondary-selection in GL.
0036 
0037    SelectionSet_t fSelectedSet;     // Selected indices.
0038    SelectionSet_t fHighlightedSet;  // Highlighted indices.
0039 
0040    void ProcessGLSelectionInternal(TGLSelectRecord& rec, SelectionSet_t& sset);
0041 
0042 public:
0043    TEveSecondarySelectable();
0044    virtual ~TEveSecondarySelectable() {}
0045 
0046    Bool_t GetAlwaysSecSelect() const   { return fAlwaysSecSelect; }
0047    void   SetAlwaysSecSelect(Bool_t f) { fAlwaysSecSelect = f; }
0048 
0049    const SelectionSet_t& RefSelectedSet()    const { return fSelectedSet;    }
0050    const SelectionSet_t& RefHighlightedSet() const { return fHighlightedSet; }
0051 
0052    void   ProcessGLSelection(TGLSelectRecord& rec);
0053 
0054    ClassDef(TEveSecondarySelectable, 0); // Semi-abstract interface for classes supporting secondary-selection.
0055 };
0056 
0057 #endif