1 // Created on: 1997-01-24
2 // Created by: Robert COUBLANC
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <AIS_GlobalStatus.ixx>
18 #include <TColStd_ListIteratorOfListOfInteger.hxx>
20 AIS_GlobalStatus::AIS_GlobalStatus():
21 myStatus(AIS_DS_None),
23 myIsHilit(Standard_False),
24 myHiCol(Quantity_NOC_WHITE),
25 mySubInt(Standard_False)
29 AIS_GlobalStatus::AIS_GlobalStatus(const AIS_DisplayStatus DS,
30 const Standard_Integer DMode,
31 const Standard_Integer SMode,
32 const Standard_Boolean /*ishilighted*/,
33 const Quantity_NameOfColor TheHiCol,
34 const Standard_Integer Layer):
37 myIsHilit(Standard_False),
39 mySubInt(Standard_False)
41 myDispModes.Append(DMode);
42 mySelModes.Append(SMode);
45 void AIS_GlobalStatus::RemoveDisplayMode(const Standard_Integer aMode)
47 TColStd_ListIteratorOfListOfInteger anIt (myDispModes);
48 for (; anIt.More(); anIt.Next())
50 if (anIt.Value() == aMode)
52 myDispModes.Remove (anIt);
58 void AIS_GlobalStatus::RemoveSelectionMode(const Standard_Integer aMode)
60 TColStd_ListIteratorOfListOfInteger anIt (mySelModes);
61 for (; anIt.More(); anIt.Next())
63 if (anIt.Value() == aMode)
65 mySelModes.Remove (anIt);
71 void AIS_GlobalStatus::ClearSelectionModes()
76 Standard_Boolean AIS_GlobalStatus::IsDModeIn(const Standard_Integer aMode) const
78 TColStd_ListIteratorOfListOfInteger anIt (myDispModes);
79 for (; anIt.More(); anIt.Next())
81 if (anIt.Value() == aMode)
86 return Standard_False;
89 Standard_Boolean AIS_GlobalStatus::IsSModeIn(const Standard_Integer aMode) const
91 TColStd_ListIteratorOfListOfInteger anIt (mySelModes);
92 for (; anIt.More(); anIt.Next())
94 if (anIt.Value() == aMode)
99 return Standard_False;