// @(#)root/eve:$Id$
// Author: Matevz Tadel 2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TEveSecondarySelectable
#define ROOT_TEveSecondarySelectable

#include "Rtypes.h"

#include <set>

class TGLSelectRecord;


class TEveSecondarySelectable
{
private:
   TEveSecondarySelectable(const TEveSecondarySelectable&);            // Not implemented
   TEveSecondarySelectable& operator=(const TEveSecondarySelectable&); // Not implemented

public:
   typedef std::set<Int_t>                SelectionSet_t;
   typedef SelectionSet_t::iterator       SelectionSet_i;
   typedef SelectionSet_t::const_iterator SelectionSet_ci;


protected:
   Bool_t         fAlwaysSecSelect; // Always do secondary-selection in GL.

   SelectionSet_t fSelectedSet;     // Selected indices.
   SelectionSet_t fHighlightedSet;  // Highlighted indices.

   void ProcessGLSelectionInternal(TGLSelectRecord& rec, SelectionSet_t& sset);

public:
   TEveSecondarySelectable();
   virtual ~TEveSecondarySelectable() {}

   Bool_t GetAlwaysSecSelect() const   { return fAlwaysSecSelect; }
   void   SetAlwaysSecSelect(Bool_t f) { fAlwaysSecSelect = f; }

   const SelectionSet_t& RefSelectedSet()    const { return fSelectedSet;    }
   const SelectionSet_t& RefHighlightedSet() const { return fHighlightedSet; }

   void   ProcessGLSelection(TGLSelectRecord& rec);

   ClassDef(TEveSecondarySelectable, 0); // Semi-abstract interface for classes supporting secondary-selection.
};

#endif
 TEveSecondarySelectable.h:1
 TEveSecondarySelectable.h:2
 TEveSecondarySelectable.h:3
 TEveSecondarySelectable.h:4
 TEveSecondarySelectable.h:5
 TEveSecondarySelectable.h:6
 TEveSecondarySelectable.h:7
 TEveSecondarySelectable.h:8
 TEveSecondarySelectable.h:9
 TEveSecondarySelectable.h:10
 TEveSecondarySelectable.h:11
 TEveSecondarySelectable.h:12
 TEveSecondarySelectable.h:13
 TEveSecondarySelectable.h:14
 TEveSecondarySelectable.h:15
 TEveSecondarySelectable.h:16
 TEveSecondarySelectable.h:17
 TEveSecondarySelectable.h:18
 TEveSecondarySelectable.h:19
 TEveSecondarySelectable.h:20
 TEveSecondarySelectable.h:21
 TEveSecondarySelectable.h:22
 TEveSecondarySelectable.h:23
 TEveSecondarySelectable.h:24
 TEveSecondarySelectable.h:25
 TEveSecondarySelectable.h:26
 TEveSecondarySelectable.h:27
 TEveSecondarySelectable.h:28
 TEveSecondarySelectable.h:29
 TEveSecondarySelectable.h:30
 TEveSecondarySelectable.h:31
 TEveSecondarySelectable.h:32
 TEveSecondarySelectable.h:33
 TEveSecondarySelectable.h:34
 TEveSecondarySelectable.h:35
 TEveSecondarySelectable.h:36
 TEveSecondarySelectable.h:37
 TEveSecondarySelectable.h:38
 TEveSecondarySelectable.h:39
 TEveSecondarySelectable.h:40
 TEveSecondarySelectable.h:41
 TEveSecondarySelectable.h:42
 TEveSecondarySelectable.h:43
 TEveSecondarySelectable.h:44
 TEveSecondarySelectable.h:45
 TEveSecondarySelectable.h:46
 TEveSecondarySelectable.h:47
 TEveSecondarySelectable.h:48
 TEveSecondarySelectable.h:49
 TEveSecondarySelectable.h:50
 TEveSecondarySelectable.h:51
 TEveSecondarySelectable.h:52
 TEveSecondarySelectable.h:53
 TEveSecondarySelectable.h:54
 TEveSecondarySelectable.h:55
 TEveSecondarySelectable.h:56
 TEveSecondarySelectable.h:57