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 <Graphic3d_HighlightStyle.hxx>
25 #include <TColStd_ListOfInteger.hxx>
26 #include <Standard_Integer.hxx>
27 #include <Standard_Boolean.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 Standard_Integer aLayerIndex = 0);
51 void SetGraphicStatus (const AIS_DisplayStatus aStat);
53 void AddSelectionMode (const Standard_Integer aMode);
55 //! Sets display mode.
56 void SetDisplayMode (const Standard_Integer theMode);
58 //! Returns the display mode.
59 Standard_Integer DisplayMode() const;
61 void SetLayerIndex (const Standard_Integer AnIndex);
63 void SetHilightStatus (const Standard_Boolean aStat);
65 //! Changes applied highlight style for a particular object
66 void SetHilightStyle (const Handle(Graphic3d_HighlightStyle)& theStyle)
71 //! Returns applied highlight style for a particular object
72 const Handle(Graphic3d_HighlightStyle)& HilightStyle() const
77 Standard_Boolean IsSubIntensityOn() const;
79 void SubIntensityOn();
81 void SubIntensityOff();
83 Standard_EXPORT void RemoveSelectionMode (const Standard_Integer aMode);
85 Standard_EXPORT void ClearSelectionModes();
87 AIS_DisplayStatus GraphicStatus() const;
89 //! keeps the active selection modes of the object
90 //! in the main viewer.
91 const TColStd_ListOfInteger& SelectionModes() const;
93 Standard_Boolean IsHilighted() const;
95 Standard_EXPORT Standard_Boolean IsSModeIn (const Standard_Integer aMode) const;
97 //! Returns layer index.
98 Standard_Integer GetLayerIndex() const
105 DEFINE_STANDARD_RTTIEXT(AIS_GlobalStatus,MMgt_TShared)
115 AIS_DisplayStatus myStatus;
116 Standard_Integer myDispMode;
117 TColStd_ListOfInteger mySelModes;
118 Standard_Integer myLayerIndex;
119 Standard_Boolean myIsHilit;
120 Handle(Graphic3d_HighlightStyle) myHiStyle;
121 Standard_Boolean mySubInt;
127 #include <AIS_GlobalStatus.lxx>
133 #endif // _AIS_GlobalStatus_HeaderFile