0027818: Visualization - provide an interface to define highlight presentation properties
[occt.git] / src / AIS / AIS_LocalStatus.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-01-20
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_LocalStatus_HeaderFile
18#define _AIS_LocalStatus_HeaderFile
19
8e5fb5ea 20#include <Graphic3d_HighlightStyle.hxx>
21#include <MMgt_TShared.hxx>
42cf5bc1 22#include <Standard.hxx>
23#include <Standard_Type.hxx>
42cf5bc1 24#include <Standard_Boolean.hxx>
25#include <Standard_Integer.hxx>
26#include <TColStd_ListOfInteger.hxx>
42cf5bc1 27class Standard_Transient;
28
29
30class AIS_LocalStatus;
31DEFINE_STANDARD_HANDLE(AIS_LocalStatus, MMgt_TShared)
32
33//! Stored Info about temporary objects.
34class AIS_LocalStatus : public MMgt_TShared
35{
36
37public:
38
39
8e5fb5ea 40 Standard_EXPORT AIS_LocalStatus (const Standard_Boolean theIsTemporary = Standard_True,
41 const Standard_Boolean theIsToDecompose = Standard_False,
42 const Standard_Integer theDisplayMode = -1,
43 const Standard_Integer theSelectionMode = -1,
44 const Standard_Integer theHilightMode = 0,
45 const Standard_Boolean theIsSubIntensity = 0,
46 const Handle(Graphic3d_HighlightStyle)& theStyle = NULL);
42cf5bc1 47
48 Standard_Boolean Decomposed() const;
49
50 Standard_Boolean IsTemporary() const;
51
52 Standard_Integer DisplayMode() const;
53
54 const TColStd_ListOfInteger& SelectionModes() const;
55
56 Standard_EXPORT Standard_Boolean IsActivated (const Standard_Integer aSelMode) const;
57
58 Standard_Integer HilightMode() const;
59
60 Standard_Boolean IsSubIntensityOn() const;
61
8e5fb5ea 62 const Handle(Graphic3d_HighlightStyle)& HilightStyle() const
63 {
64 return myHiStyle;
65 }
42cf5bc1 66
67 void SetDecomposition (const Standard_Boolean astatus);
68
69 void SetTemporary (const Standard_Boolean astatus);
70
71 void SetDisplayMode (const Standard_Integer aMode);
72
73 void SetFirstDisplay (const Standard_Boolean aStatus);
74
75 Standard_Boolean IsFirstDisplay() const;
76
77 Standard_EXPORT void AddSelectionMode (const Standard_Integer aMode);
78
79 Standard_EXPORT void RemoveSelectionMode (const Standard_Integer aMode);
80
81 Standard_EXPORT void ClearSelectionModes();
82
83 Standard_EXPORT Standard_Boolean IsSelModeIn (const Standard_Integer aMode) const;
84
85 void SetHilightMode (const Standard_Integer aMode);
86
8e5fb5ea 87 void SetHilightStyle (const Handle(Graphic3d_HighlightStyle)& theStyle)
88 {
89 myHiStyle = theStyle;
90 }
42cf5bc1 91
92 void SubIntensityOn();
93
94 void SubIntensityOff();
95
96 void SetPreviousState (const Handle(Standard_Transient)& aStatus);
97
98 const Handle(Standard_Transient)& PreviousState() const;
99
100
101
102
92efcf78 103 DEFINE_STANDARD_RTTIEXT(AIS_LocalStatus,MMgt_TShared)
42cf5bc1 104
42cf5bc1 105private:
42cf5bc1 106 Standard_Boolean myDecomposition;
107 Standard_Boolean myIsTemporary;
108 Standard_Integer myDMode;
109 Standard_Boolean myFirstDisplay;
110 Standard_Integer myHMode;
111 TColStd_ListOfInteger mySModes;
112 Standard_Boolean mySubIntensity;
42cf5bc1 113 Handle(Standard_Transient) myPreviousState;
8e5fb5ea 114 Handle(Graphic3d_HighlightStyle) myHiStyle;
42cf5bc1 115};
116
117
118#include <AIS_LocalStatus.lxx>
119
120
121
122
123
124#endif // _AIS_LocalStatus_HeaderFile