0023361: Bug in gp_Trsf::Multiply
[occt.git] / src / ViewerTest / ViewerTest.cdl
CommitLineData
b311480e 1-- Created on: 1997-07-23
2-- Created by: Henri JEANNIN
3-- Copyright (c) 1997-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22
23
24package ViewerTest
25
26 ---Purpose:
27
28uses
29 Draw,
30 TCollection,
31 TColStd,
32 TopAbs,
33 TopTools,
34 TopoDS,
35 V3d,
36 AIS,
37 NIS,
38 MMgt
39
40is
41
42 class Tool;
43 ---Purpose: to build a context and set a given context as current
44 -- for ViewerTest.
45
46
47
48 class EventManager;
49 ---Purpose: used to manage mouse event (move,select,shiftselect)
50 -- By default the events are transmitted to interactive context.
51
52
53 class DoubleMapOfInteractiveAndName instantiates DoubleMap
54 from TCollection ( Transient from Standard,
55 AsciiString from TCollection,
56 MapTransientHasher from TColStd,
57 AsciiString from TCollection);
58
59
60 -- ----------------------------------------------------------------------
61 -- Package methods
62 -- ----------------------------------------------------------------------
63
64 Factory (theDI : out Interpretor from Draw);
65 ---Purpose: Loads all Draw commands of V2d & V3d. Used for plugin.
66
67 ---Category: Create the viewer....
68
69 ViewerInit ( thePxLeft, thePxTop : Integer from Standard = 0;
70 thePxWidth, thePxHeight : Integer from Standard = 0);
71 ---Purpose:
72 -- implemented in ViewerTest_ViewerCommands.cxx
73
74 ---Category: Selection in the viewer....
75
76
77 WClass returns TShared from MMgt is private;
78 ---C++: return const &
79 ---Purpose: Returns a window class that implements standard behavior of
80 -- all windows of the ViewerTest. This includes usual Open CASCADE
81 -- view conventions for mouse buttons (e.g. Ctrl+MB1 for zoom,
82 -- Ctrl+MB2 for pan, etc) and keyboard shortcuts.
83 -- This method is relevant for MS Windows only and respectively
84 -- returns WNT_WClass handle.
85
86 PickShape (aType : ShapeEnum from TopAbs;
87 MaxPick : Integer from Standard = 5) returns Shape from TopoDS;
88 ---Purpose: waits until a shape of type <aType> is picked in the AIS Viewer and returns it.
89 -- if <aType> == TopAbs_Shape, any shape can be picked...
90 -- MaxPick is the Max number before exiting, if no pick is successfull
91
92
93 PickShapes (aType : ShapeEnum from TopAbs;
94 thepicked : in out HArray1OfShape from TopTools;
95 MaxPick : Integer from Standard = 5)
96 returns Boolean from Standard;
97 ---Purpose: wait until the array is filled with picked shapes.
98 -- returns True if the array is filled.
99 -- exit if number of unsuccesfull picks = <MaxPick>
100
101 PickObject(Type : KindOfInteractive from AIS = AIS_KOI_None;
102 Signature : Integer from Standard = -1;
103 MaxPick : Integer from Standard = 5)
104 returns InteractiveObject from AIS;
105 ---Purpose: waits until an interactive object of a given Type
106 -- and signature is picked (defaut values authorize
107 -- selection of any Interactive Object)
108 -- exit if number of unsuccesfull picks = <MaxPick>
109
110 PickObjects(thepicked : in out HArray1OfTransient from TColStd;
111 Type : KindOfInteractive from AIS = AIS_KOI_None;
112 Signature : Integer from Standard = -1;
113 MaxPick : Integer from Standard = 5)
114 returns Boolean from Standard;
115 ---Purpose: selection of several interactive objects. Number is given
116 -- by the size of <thepicked>
117 -- exit if number of unsuccesfull picks = <MaxPick>
118
119
120 Commands (theCommands : in out Interpretor from Draw);
121 AviCommands(theCommands :in out Interpretor from Draw);
122 ViewerCommands(theCommands :in out Interpretor from Draw);
123 MyCommands (theCommands : in out Interpretor from Draw); -- My Own Com-s
124 RelationCommands(theCommands :in out Interpretor from Draw);
125 ObjectCommands(theCommands :in out Interpretor from Draw);
126 FilletCommands(theCommands :in out Interpretor from Draw);
127 VoxelCommands(theCommands :in out Interpretor from Draw);
3946774d 128 OpenGlCommands(theCommands :in out Interpretor from Draw);
7fd59977 129
130 GetMousePosition(xpix,ypix: out Integer from Standard);
131
132 GetViewerFromContext returns Viewer from V3d;
133
134 GetCollectorFromContext returns Viewer from V3d;
135
136 GetAISContext returns InteractiveContext from AIS;
137
138 GetNISContext returns InteractiveContext from NIS;
139 ---C++: return &
140
141 SetAISContext (aContext: InteractiveContext from AIS);
142
143 SetNISContext (aContext: InteractiveContext from NIS);
144
145 CurrentView returns View from V3d;
146
147 CurrentView (aViou:View from V3d);
148
149 Clear ;
150
151 ---Category: Change behaviour on move,select,... events.
152
153 SetEventManager (aMgr:EventManager from ViewerTest);
154 ---Purpose: puts <aMgr> as current eventmanager (the
155 -- move,select,...will be applied to <aMgr>
156
157 UnsetEventManager;
158 ---Purpose: removes the last EventManager from the list.
159
160 ResetEventManager;
161 ---Purpose: clear the list of EventManagers and
162 -- sets the default EventManager as current
163
164 CurrentEventManager returns EventManager from ViewerTest;
165
166
167 ---Category: privateMethods...
168
169
170 RemoveSelected;
171
172 StandardModeActivation(Mode : Integer from Standard);
173
174
175
176end;