b311480e |
1 | -- Created by: Tanya COOL |
2 | -- Copyright (c) 2000-2012 OPEN CASCADE SAS |
3 | -- |
4 | -- The content of this file is subject to the Open CASCADE Technology Public |
5 | -- License Version 6.5 (the "License"). You may not use the content of this file |
6 | -- except in compliance with the License. Please obtain a copy of the License |
7 | -- at http://www.opencascade.org and read it completely before using this file. |
8 | -- |
9 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
10 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
11 | -- |
12 | -- The Original Code and all software distributed under the License is |
13 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
14 | -- Initial Developer hereby disclaims all such warranties, including without |
15 | -- limitation, any warranties of merchantability, fitness for a particular |
16 | -- purpose or non-infringement. Please see the License for the specific terms |
17 | -- and conditions governing the rights and limitations under the License. |
18 | |
7fd59977 |
19 | |
20 | private class GlobalStatus from AIS2D inherits TShared from MMgt |
21 | |
22 | ---Purpose: Stores information about objects in graphic context: |
23 | -- - Status Of Display : in the main viewer |
24 | -- in the collector |
25 | -- fully Erased |
26 | -- - Displayed Modes |
27 | -- - Active Selection Modes |
28 | -- - is the Interactive Object Current ? |
29 | -- - Layer Index |
30 | |
31 | |
32 | uses |
33 | |
34 | ListOfInteger from TColStd, |
35 | PToListOfInt from AIS2D, |
36 | DisplayStatus from AIS2D, |
37 | NameOfColor from Quantity |
38 | |
39 | is |
40 | |
41 | Create returns mutable GlobalStatus from AIS2D; |
42 | ---Purpose: Initialize GlobalStatus the default properties |
43 | |
44 | Create( aStat : DisplayStatus from AIS2D; |
45 | aDMode : Integer from Standard; |
46 | aSMode : Integer from Standard; |
47 | isHighlight : Boolean from Standard=Standard_False; |
48 | aHighlCol : NameOfColor from Quantity = Quantity_NOC_WHITE; |
49 | aLayerIndex : Integer from Standard = 0) |
50 | returns mutable GlobalStatus from AIS2D; |
51 | ---Purpose: Initialize GlobalStatus the concrete properties |
52 | |
53 | SetGraphicStatus( me: mutable; aStat : DisplayStatus from AIS2D ); |
54 | ---C++: inline |
55 | ---Level: Internal |
56 | ---Purpose: Sets the graphic status <aStat> |
57 | |
58 | AddDisplayMode( me: mutable; aMode: Integer from Standard ); |
59 | ---Level: Internal |
60 | ---Purpose: Adds the display mode <aMode> to the list of display modes |
61 | |
62 | RemoveDisplayMode( me: mutable; aMode: Integer from Standard); |
63 | ---Level: Internal |
64 | ---Purpose: Removes the display mode <aMode> from the list of display modes |
65 | |
66 | IsDModeIn( me; aMode: Integer from Standard ) returns Boolean from Standard; |
67 | ---Level: Internal |
68 | ---Purpose: Returns True if the list of display modes |
69 | -- contains the display mode <aMode> |
70 | |
71 | AddSelectionMode( me: mutable; aMode: Integer from Standard ); |
72 | ---Level: Internal |
73 | ---Purpose: Adds the selection mode <aMode> to the list of selection modes |
74 | |
75 | RemoveSelectionMode( me: mutable; aMode: Integer from Standard ); |
76 | ---Level: Internal |
77 | ---Purpose: Removes the selection mode <aMode> from the list of selection modes |
78 | |
79 | ClearSelectionModes( me: mutable ); |
80 | ---Level: Internal |
81 | ---Purpose: Removes all selection modes from the list of selection modes |
82 | |
83 | IsSModeIn( me; aMode: Integer from Standard ) returns Boolean from Standard; |
84 | ---Level: Internal |
85 | ---Purpose: Returns True if the list of selection modes |
86 | -- contains the selection mode <aMode> |
87 | |
88 | SetLayerIndex( me: mutable; anIndex: Integer from Standard ); |
89 | ---C++: inline |
90 | ---Level: Internal |
91 | ---Purpose: Sets the layer index <anIndex> |
92 | |
93 | SetHighlightStatus( me: mutable; aStat: Boolean from Standard ); |
94 | ---C++: inline |
95 | ---Level: Internal |
96 | ---Purpose: Sets the highlight status |
97 | |
98 | SetHighlightColor( me: mutable; aHiCol: NameOfColor from Quantity ); |
99 | ---C++: inline |
100 | ---Level: Internal |
101 | ---Purpose: Sets the color of highight |
102 | |
103 | IsSubIntensityOn( me ) returns Boolean from Standard; |
104 | ---C++: inline |
105 | ---Level: Internal |
106 | ---Purpose: Return True if SubIntensity is on |
107 | |
108 | SubIntensityOn( me: mutable ); |
109 | ---C++: inline |
110 | ---Level: Internal |
111 | ---Purpose: Sets the SubIntensity |
112 | |
113 | SubIntensityOff( me: mutable ); |
114 | ---C++: inline |
115 | ---Level: Internal |
116 | ---Purpose: Unsets the SubIntensity |
117 | |
118 | GraphicStatus( me ) returns DisplayStatus from AIS2D; |
119 | ---C++: inline |
120 | ---Level: Internal |
121 | ---Purpose: Indicates the display status |
122 | |
123 | DisplayedModes( me: mutable ) returns PToListOfInt from AIS2D; |
124 | ---C++: inline |
125 | ---Level: Internal |
126 | ---Purpose: keeps the information of displayed modes in the |
127 | -- main viewer. |
128 | -- (The convention is that the object is displayed |
129 | -- with the mode 0 in the collector...) |
130 | |
131 | SelectionModes( me: mutable ) returns PToListOfInt from AIS2D; |
132 | ---C++: inline |
133 | ---Level: Internal |
134 | ---Purpose: keeps the active selection modes of the object |
135 | -- in the main viewer. |
136 | -- (The convention is that the active selection mode |
137 | -- for an object in the collector is the mode 0). |
138 | |
139 | IsHighlight(me) returns Boolean from Standard; |
140 | ---C++: inline |
141 | ---Level: Internal |
142 | ---Purpose: Returns True if highlight is on |
143 | |
144 | HighlightColor( me ) returns NameOfColor from Quantity; |
145 | ---C++: inline |
146 | ---Level: Internal |
147 | ---Purpose: Returns the color of highlight |
148 | |
149 | fields |
150 | |
151 | myStatus : DisplayStatus from AIS2D; |
152 | myDispModes : ListOfInteger from TColStd; |
153 | mySelModes : ListOfInteger from TColStd; |
154 | myLayerIndex : Integer from Standard; |
155 | myIsHighl : Boolean from Standard; |
156 | myHiCol : NameOfColor from Quantity; |
157 | mySubInt : Boolean from Standard; |
158 | |
159 | end GlobalStatus; |