0026641: Visualization, TKOpenGl - handle correctly transformation persistence within...
[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>
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
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
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
1d92133e 93 //! Returns layer index.
94 Standard_Integer GetLayerIndex() const
95 {
96 return myLayerIndex;
97 }
42cf5bc1 98
99
100
92efcf78 101 DEFINE_STANDARD_RTTIEXT(AIS_GlobalStatus,MMgt_TShared)
42cf5bc1 102
103protected:
104
105
106
107
108private:
109
110
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;
118
119
120};
121
122
123#include <AIS_GlobalStatus.lxx>
124
125
126
127
128
129#endif // _AIS_GlobalStatus_HeaderFile