Salome HOME
7b3d9480b194a234a77bcbb476c60f94497e6220
[modules/kernel.git] / src / OCCViewer / OCCViewer_Selector.cxx
1 using namespace std;
2 //  File      : OCCViewer_Selector.cxx
3 //  Created   : Wed Mar 20 10:57:47 2002
4 //  Author    : Nicolas REJNERI
5 //  Project   : SALOME
6 //  Module    : OCCViewer
7 //  Copyright : Open CASCADE 2002
8 //  $Header$
9
10
11 /*!
12   \class OCCViewer_Selector OCCViewer_Selector.h
13   \brief Base class for object selection in Open CASCADE Viewer.
14 */
15
16 #include "OCCViewer_Selector.h"
17
18 /*!
19     Constructor
20 */
21 OCCViewer_Selector::OCCViewer_Selector() :
22   myNumSelected (0),
23   myEnableSelection( true ),
24   myEnableMultipleSelection( true )
25 {
26 }
27
28 /*!
29     Destructor
30 */
31 OCCViewer_Selector::~OCCViewer_Selector()
32 {
33 }
34
35 /*!
36     Enables/disables selection
37 */
38 void OCCViewer_Selector::enableSelection( bool bEnable )
39 {
40   myEnableSelection = bEnable;
41 }
42
43 /*!
44     Enables/disables multiple selection i.e
45     selection of several objects at the same time.
46     If enabled, non-multiple selection is enabled as well.
47 */
48 void OCCViewer_Selector::enableMultipleSelection( bool bEnable )
49 {
50   myEnableMultipleSelection = bEnable;
51   if ( bEnable ) myEnableSelection = bEnable;
52 }