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
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class AISViewer from TPrsStd inherits Attribute from TDF
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.
23 uses Attribute from TDF,
27 RelocationTable from TDF,
28 InteractiveContext from AIS,
30 ExtendedString from TCollection
34 ---Purpose: class methods
38 ---C++: return const &
39 returns GUID from Standard;
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;
46 New (myclass; access : Label from TDF; selector : InteractiveContext from AIS)
47 ---Purpose: create and set an AISViewer at. Raise an exception if
49 returns AISViewer from TPrsStd;
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
55 returns AISViewer from TPrsStd;
57 Find (myclass; acces : Label from TDF; A : in out AISViewer from TPrsStd)
58 returns Boolean from Standard;
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;
65 Find (myclass; acces : Label from TDF; V : in out Viewer from V3d)
66 returns Boolean from Standard;
68 Update (myclass; acces : Label from TDF);
71 ---Purpose: AISViewer methods
75 returns AISViewer from TPrsStd;
78 ---Purpose: Updates the viewer at the label access.
79 -- access is the root of the data framework.
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.
87 ---Category: TDF_Attribute methods
88 -- =====================
91 ---C++: return const &
92 returns GUID from Standard;
94 Restore(me: mutable; with : Attribute from TDF);
97 returns Attribute from TDF;
99 Paste (me; into : Attribute from TDF;
100 RT : RelocationTable from TDF);
104 myInteractiveContext : InteractiveContext from AIS;