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 #ifndef _AIS_GlobalStatus_HeaderFile
18 #define _AIS_GlobalStatus_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <AIS_DisplayStatus.hxx>
24 #include <TColStd_ListOfInteger.hxx>
25 #include <Standard_Integer.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Quantity_NameOfColor.hxx>
28 #include <MMgt_TShared.hxx>
31 class AIS_GlobalStatus;
32 DEFINE_STANDARD_HANDLE(AIS_GlobalStatus, MMgt_TShared)
34 //! Stores information about objects in graphic context:
35 //! - Status Of Display : in the main viewer
36 //! hidden in the main viewer
38 //! - Active Selection Modes
39 //! - is the Interactive Object Current ?
41 class AIS_GlobalStatus : public MMgt_TShared
47 Standard_EXPORT AIS_GlobalStatus();
49 Standard_EXPORT AIS_GlobalStatus(const AIS_DisplayStatus aStat, const Standard_Integer aDispMode, const Standard_Integer aSelMode, const Standard_Boolean ishilighted = Standard_False, const Quantity_NameOfColor TheHiCol = Quantity_NOC_WHITE, const Standard_Integer aLayerIndex = 0);
51 void SetGraphicStatus (const AIS_DisplayStatus aStat);
53 void AddDisplayMode (const Standard_Integer aMode);
55 void AddSelectionMode (const Standard_Integer aMode);
57 void SetLayerIndex (const Standard_Integer AnIndex);
59 void SetHilightStatus (const Standard_Boolean aStat);
61 void SetHilightColor (const Quantity_NameOfColor aHiCol);
63 Standard_Boolean IsSubIntensityOn() const;
65 void SubIntensityOn();
67 void SubIntensityOff();
69 Standard_EXPORT void RemoveDisplayMode (const Standard_Integer aMode);
71 Standard_EXPORT void RemoveSelectionMode (const Standard_Integer aMode);
73 Standard_EXPORT void ClearSelectionModes();
75 AIS_DisplayStatus GraphicStatus() const;
77 //! keeps the information of displayed modes in the
79 const TColStd_ListOfInteger& DisplayedModes() const;
81 //! keeps the active selection modes of the object
82 //! in the main viewer.
83 const TColStd_ListOfInteger& SelectionModes() const;
85 Standard_Boolean IsHilighted() const;
87 Quantity_NameOfColor HilightColor() const;
89 Standard_EXPORT Standard_Boolean IsDModeIn (const Standard_Integer aMode) const;
91 Standard_EXPORT Standard_Boolean IsSModeIn (const Standard_Integer aMode) const;
93 //! Returns layer index.
94 Standard_Integer GetLayerIndex() const
101 DEFINE_STANDARD_RTTIEXT(AIS_GlobalStatus,MMgt_TShared)
111 AIS_DisplayStatus myStatus;
112 TColStd_ListOfInteger myDispModes;
113 TColStd_ListOfInteger mySelModes;
114 Standard_Integer myLayerIndex;
115 Standard_Boolean myIsHilit;
116 Quantity_NameOfColor myHiCol;
117 Standard_Boolean mySubInt;
123 #include <AIS_GlobalStatus.lxx>
129 #endif // _AIS_GlobalStatus_HeaderFile