1 -- Created by: Tanya COOL
2 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
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.
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.
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.
20 private class GlobalStatus from AIS2D inherits TShared from MMgt
22 ---Purpose: Stores information about objects in graphic context:
23 -- - Status Of Display : in the main viewer
27 -- - Active Selection Modes
28 -- - is the Interactive Object Current ?
34 ListOfInteger from TColStd,
35 PToListOfInt from AIS2D,
36 DisplayStatus from AIS2D,
37 NameOfColor from Quantity
41 Create returns mutable GlobalStatus from AIS2D;
42 ---Purpose: Initialize GlobalStatus the default properties
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
53 SetGraphicStatus( me: mutable; aStat : DisplayStatus from AIS2D );
56 ---Purpose: Sets the graphic status <aStat>
58 AddDisplayMode( me: mutable; aMode: Integer from Standard );
60 ---Purpose: Adds the display mode <aMode> to the list of display modes
62 RemoveDisplayMode( me: mutable; aMode: Integer from Standard);
64 ---Purpose: Removes the display mode <aMode> from the list of display modes
66 IsDModeIn( me; aMode: Integer from Standard ) returns Boolean from Standard;
68 ---Purpose: Returns True if the list of display modes
69 -- contains the display mode <aMode>
71 AddSelectionMode( me: mutable; aMode: Integer from Standard );
73 ---Purpose: Adds the selection mode <aMode> to the list of selection modes
75 RemoveSelectionMode( me: mutable; aMode: Integer from Standard );
77 ---Purpose: Removes the selection mode <aMode> from the list of selection modes
79 ClearSelectionModes( me: mutable );
81 ---Purpose: Removes all selection modes from the list of selection modes
83 IsSModeIn( me; aMode: Integer from Standard ) returns Boolean from Standard;
85 ---Purpose: Returns True if the list of selection modes
86 -- contains the selection mode <aMode>
88 SetLayerIndex( me: mutable; anIndex: Integer from Standard );
91 ---Purpose: Sets the layer index <anIndex>
93 SetHighlightStatus( me: mutable; aStat: Boolean from Standard );
96 ---Purpose: Sets the highlight status
98 SetHighlightColor( me: mutable; aHiCol: NameOfColor from Quantity );
101 ---Purpose: Sets the color of highight
103 IsSubIntensityOn( me ) returns Boolean from Standard;
106 ---Purpose: Return True if SubIntensity is on
108 SubIntensityOn( me: mutable );
111 ---Purpose: Sets the SubIntensity
113 SubIntensityOff( me: mutable );
116 ---Purpose: Unsets the SubIntensity
118 GraphicStatus( me ) returns DisplayStatus from AIS2D;
121 ---Purpose: Indicates the display status
123 DisplayedModes( me: mutable ) returns PToListOfInt from AIS2D;
126 ---Purpose: keeps the information of displayed modes in the
128 -- (The convention is that the object is displayed
129 -- with the mode 0 in the collector...)
131 SelectionModes( me: mutable ) returns PToListOfInt from AIS2D;
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).
139 IsHighlight(me) returns Boolean from Standard;
142 ---Purpose: Returns True if highlight is on
144 HighlightColor( me ) returns NameOfColor from Quantity;
147 ---Purpose: Returns the color of highlight
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;