faec81e7a41fdbabd7e6f4e08836ae3e2b5b16c2
[occt.git] / src / AIS / AIS_GlobalStatus.hxx
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
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _AIS_GlobalStatus_HeaderFile
18 #define _AIS_GlobalStatus_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
22
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>
29
30
31 class AIS_GlobalStatus;
32 DEFINE_STANDARD_HANDLE(AIS_GlobalStatus, MMgt_TShared)
33
34 //! Stores  information  about objects in graphic context:
35 //! - Status Of Display : in the main viewer
36 //! hidden in the main viewer
37 //! - Displayed Modes
38 //! - Active Selection Modes
39 //! - is the Interactive Object Current ?
40 //! - Layer Index
41 class AIS_GlobalStatus : public MMgt_TShared
42 {
43
44 public:
45
46   
47   Standard_EXPORT AIS_GlobalStatus();
48   
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);
50   
51     void SetGraphicStatus (const AIS_DisplayStatus aStat);
52   
53     void AddDisplayMode (const Standard_Integer aMode);
54   
55     void AddSelectionMode (const Standard_Integer aMode);
56   
57     void SetLayerIndex (const Standard_Integer AnIndex);
58   
59     void SetHilightStatus (const Standard_Boolean aStat);
60   
61     void SetHilightColor (const Quantity_NameOfColor aHiCol);
62   
63     Standard_Boolean IsSubIntensityOn() const;
64   
65     void SubIntensityOn();
66   
67     void SubIntensityOff();
68   
69   Standard_EXPORT void RemoveDisplayMode (const Standard_Integer aMode);
70   
71   Standard_EXPORT void RemoveSelectionMode (const Standard_Integer aMode);
72   
73   Standard_EXPORT void ClearSelectionModes();
74   
75     AIS_DisplayStatus GraphicStatus() const;
76   
77   //! keeps the information of displayed modes in the
78   //! main viewer.
79     const TColStd_ListOfInteger& DisplayedModes() const;
80   
81   //! keeps the active selection modes of the object
82   //! in the main viewer.
83     const TColStd_ListOfInteger& SelectionModes() const;
84   
85     Standard_Boolean IsHilighted() const;
86   
87     Quantity_NameOfColor HilightColor() const;
88   
89   Standard_EXPORT Standard_Boolean IsDModeIn (const Standard_Integer aMode) const;
90   
91   Standard_EXPORT Standard_Boolean IsSModeIn (const Standard_Integer aMode) const;
92
93
94
95
96   DEFINE_STANDARD_RTTIEXT(AIS_GlobalStatus,MMgt_TShared)
97
98 protected:
99
100
101
102
103 private:
104
105
106   AIS_DisplayStatus myStatus;
107   TColStd_ListOfInteger myDispModes;
108   TColStd_ListOfInteger mySelModes;
109   Standard_Integer myLayerIndex;
110   Standard_Boolean myIsHilit;
111   Quantity_NameOfColor myHiCol;
112   Standard_Boolean mySubInt;
113
114
115 };
116
117
118 #include <AIS_GlobalStatus.lxx>
119
120
121
122
123
124 #endif // _AIS_GlobalStatus_HeaderFile