0026199: Visualization - use NCollection_IndexedMap instead of NCollection_Sequence...
[occt.git] / src / TPrsStd / TPrsStd_AISViewer.cdl
1 -- Created on: 1998-09-30
2 -- Created by: Denis PASCAL
3 -- Copyright (c) 1998-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 class AISViewer from TPrsStd inherits Attribute from TDF
18
19         ---Purpose: The groundwork to define an interactive viewer attribute.
20 -- This attribute stores an interactive context at the root label.
21 -- You can only have one instance of this class per data framework. 
22
23 uses Attribute          from TDF,
24      Label              from TDF,
25      GUID               from Standard,
26      DataSet            from TDF,
27      RelocationTable    from TDF,
28      InteractiveContext from AIS,
29      Viewer             from V3d,
30      ExtendedString     from TCollection
31
32 is    
33
34    ---Purpose: class methods
35     --         =============
36
37     GetID (myclass)   
38     ---C++: return const &  
39     returns GUID from Standard;    
40
41     Has (myclass; acces : Label from TDF)
42     ---Purpose:  returns True if   there is an AISViewer attribute  in
43     --          <acces> Data Framework.
44     returns Boolean from Standard;
45
46     New (myclass; access : Label from TDF; selector : InteractiveContext from AIS)
47     ---Purpose: create and set an  AISViewer at. Raise an exception if
48     --          Has.
49     returns AISViewer from TPrsStd; 
50
51     New (myclass; acces : Label from TDF; viewer : Viewer from V3d)   
52     ---Purpose:  create  and set an   AISAttribute at root  label. The
53     --          interactive context is  build.  Raise an exception  if
54     --          Has.
55     returns AISViewer from TPrsStd;    
56     
57     Find (myclass; acces : Label from TDF; A : in out  AISViewer from TPrsStd)
58     returns Boolean from Standard;    
59 ---Purpose:
60 -- Finds the viewer attribute at the label access, the
61 -- root of the data framework. Calling this function can be used to initialize an AIS viewer
62     Find (myclass; acces : Label from TDF; IC : in out InteractiveContext from AIS)    
63     returns Boolean from Standard;      
64
65     Find (myclass; acces : Label from TDF; V : in out  Viewer from V3d)
66     returns Boolean from Standard;    
67
68     Update (myclass; acces : Label from TDF);
69
70     
71     ---Purpose: AISViewer methods
72     --          =================
73
74     Create
75     returns AISViewer from TPrsStd; 
76     
77     Update (me);
78 ---Purpose: Updates the viewer at the label access.
79 --  access is the root of the data framework.
80     
81     SetInteractiveContext (me : mutable; ctx : InteractiveContext from AIS);  
82 ---Purpose: Sets the interactive context ctx for this attribute.    
83     GetInteractiveContext (me)
84     returns InteractiveContext from AIS;
85 ---Purpose: Returns the interactive context in this attribute.   
86     
87     ---Category: TDF_Attribute methods
88     --           =====================
89     
90     ID (me)  
91     ---C++: return const & 
92     returns GUID from Standard;
93     
94     Restore(me: mutable; with : Attribute from TDF);
95     
96     NewEmpty(me)
97     returns Attribute from TDF;
98     
99     Paste (me; into : Attribute from TDF;
100                RT   : RelocationTable from TDF); 
101                
102 fields
103
104     myInteractiveContext : InteractiveContext from AIS;
105 end AISViewer;
106