0027915: Foundation Classes - remove the class NCollection_QuickSort
[occt.git] / src / AIS / AIS_GlobalStatus.hxx
CommitLineData
42cf5bc1 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>
8e5fb5ea 24#include <Graphic3d_HighlightStyle.hxx>
42cf5bc1 25#include <TColStd_ListOfInteger.hxx>
26#include <Standard_Integer.hxx>
27#include <Standard_Boolean.hxx>
42cf5bc1 28#include <MMgt_TShared.hxx>
29
30
31class AIS_GlobalStatus;
32DEFINE_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
41class AIS_GlobalStatus : public MMgt_TShared
42{
43
44public:
45
46
47 Standard_EXPORT AIS_GlobalStatus();
48
8e5fb5ea 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);
42cf5bc1 50
51 void SetGraphicStatus (const AIS_DisplayStatus aStat);
52
42cf5bc1 53 void AddSelectionMode (const Standard_Integer aMode);
3db69e41 54
55 //! Sets display mode.
56 void SetDisplayMode (const Standard_Integer theMode);
57
58 //! Returns the display mode.
59 Standard_Integer DisplayMode() const;
42cf5bc1 60
61 void SetLayerIndex (const Standard_Integer AnIndex);
62
63 void SetHilightStatus (const Standard_Boolean aStat);
8e5fb5ea 64
65 //! Changes applied highlight style for a particular object
66 void SetHilightStyle (const Handle(Graphic3d_HighlightStyle)& theStyle)
67 {
68 myHiStyle = theStyle;
69 }
70
71 //! Returns applied highlight style for a particular object
72 const Handle(Graphic3d_HighlightStyle)& HilightStyle() const
73 {
74 return myHiStyle;
75 }
76
42cf5bc1 77 Standard_Boolean IsSubIntensityOn() const;
78
79 void SubIntensityOn();
80
81 void SubIntensityOff();
82
42cf5bc1 83 Standard_EXPORT void RemoveSelectionMode (const Standard_Integer aMode);
84
85 Standard_EXPORT void ClearSelectionModes();
86
87 AIS_DisplayStatus GraphicStatus() const;
88
42cf5bc1 89 //! keeps the active selection modes of the object
90 //! in the main viewer.
91 const TColStd_ListOfInteger& SelectionModes() const;
92
93 Standard_Boolean IsHilighted() const;
8e5fb5ea 94
42cf5bc1 95 Standard_EXPORT Standard_Boolean IsSModeIn (const Standard_Integer aMode) const;
96
1d92133e 97 //! Returns layer index.
98 Standard_Integer GetLayerIndex() const
99 {
100 return myLayerIndex;
101 }
42cf5bc1 102
103
104
92efcf78 105 DEFINE_STANDARD_RTTIEXT(AIS_GlobalStatus,MMgt_TShared)
42cf5bc1 106
107protected:
108
109
110
111
112private:
113
114
115 AIS_DisplayStatus myStatus;
3db69e41 116 Standard_Integer myDispMode;
42cf5bc1 117 TColStd_ListOfInteger mySelModes;
118 Standard_Integer myLayerIndex;
119 Standard_Boolean myIsHilit;
8e5fb5ea 120 Handle(Graphic3d_HighlightStyle) myHiStyle;
42cf5bc1 121 Standard_Boolean mySubInt;
122
123
124};
125
126
127#include <AIS_GlobalStatus.lxx>
128
129
130
131
132
133#endif // _AIS_GlobalStatus_HeaderFile