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
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.
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.
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.
44 ---Purpose: to build a context and set a given context as current
50 ---Purpose: used to manage mouse event (move,select,shiftselect)
51 -- By default the events are transmitted to interactive context.
54 class DoubleMapOfInteractiveAndName instantiates DoubleMap
55 from TCollection ( Transient from Standard,
56 AsciiString from TCollection,
57 MapTransientHasher from TColStd,
58 AsciiString from TCollection);
61 -- ----------------------------------------------------------------------
63 -- ----------------------------------------------------------------------
65 Factory (theDI : out Interpretor from Draw);
66 ---Purpose: Loads all Draw commands of V2d & V3d. Used for plugin.
68 ---Category: Create the viewer....
70 ViewerInit ( thePxLeft, thePxTop : Integer from Standard = 0;
71 thePxWidth, thePxHeight : Integer from Standard = 0);
73 -- implemented in ViewerTest_ViewerCommands.cxx
75 ---Category: Selection in the viewer....
78 WClass returns TShared from MMgt is private;
79 ---C++: return const &
80 ---Purpose: Returns a window class that implements standard behavior of
81 -- all windows of the ViewerTest. This includes usual Open CASCADE
82 -- view conventions for mouse buttons (e.g. Ctrl+MB1 for zoom,
83 -- Ctrl+MB2 for pan, etc) and keyboard shortcuts.
84 -- This method is relevant for MS Windows only and respectively
85 -- returns WNT_WClass handle.
87 PickShape (aType : ShapeEnum from TopAbs;
88 MaxPick : Integer from Standard = 5) returns Shape from TopoDS;
89 ---Purpose: waits until a shape of type <aType> is picked in the AIS Viewer and returns it.
90 -- if <aType> == TopAbs_Shape, any shape can be picked...
91 -- MaxPick is the Max number before exiting, if no pick is successfull
94 PickShapes (aType : ShapeEnum from TopAbs;
95 thepicked : in out HArray1OfShape from TopTools;
96 MaxPick : Integer from Standard = 5)
97 returns Boolean from Standard;
98 ---Purpose: wait until the array is filled with picked shapes.
99 -- returns True if the array is filled.
100 -- exit if number of unsuccesfull picks = <MaxPick>
102 PickObject(Type : KindOfInteractive from AIS = AIS_KOI_None;
103 Signature : Integer from Standard = -1;
104 MaxPick : Integer from Standard = 5)
105 returns InteractiveObject from AIS;
106 ---Purpose: waits until an interactive object of a given Type
107 -- and signature is picked (defaut values authorize
108 -- selection of any Interactive Object)
109 -- exit if number of unsuccesfull picks = <MaxPick>
111 PickObjects(thepicked : in out HArray1OfTransient from TColStd;
112 Type : KindOfInteractive from AIS = AIS_KOI_None;
113 Signature : Integer from Standard = -1;
114 MaxPick : Integer from Standard = 5)
115 returns Boolean from Standard;
116 ---Purpose: selection of several interactive objects. Number is given
117 -- by the size of <thepicked>
118 -- exit if number of unsuccesfull picks = <MaxPick>
121 Commands (theCommands : in out Interpretor from Draw);
122 AviCommands(theCommands :in out Interpretor from Draw);
123 ViewerCommands(theCommands :in out Interpretor from Draw);
124 MyCommands (theCommands : in out Interpretor from Draw); -- My Own Com-s
125 RelationCommands(theCommands :in out Interpretor from Draw);
126 ObjectCommands(theCommands :in out Interpretor from Draw);
127 FilletCommands(theCommands :in out Interpretor from Draw);
128 VoxelCommands(theCommands :in out Interpretor from Draw);
129 OpenGlCommands(theCommands :in out Interpretor from Draw);
131 GetMousePosition(xpix,ypix: out Integer from Standard);
133 GetViewerFromContext returns Viewer from V3d;
135 GetCollectorFromContext returns Viewer from V3d;
137 GetAISContext returns InteractiveContext from AIS;
138 ---C++: return const &
139 GetNISContext returns InteractiveContext from NIS;
142 SetAISContext (aContext: InteractiveContext from AIS);
144 SetNISContext (aContext: InteractiveContext from NIS);
146 CurrentView returns View from V3d;
147 ---C++: return const &
149 CurrentView (aViou:View from V3d);
153 ---Category: Change behaviour on move,select,... events.
155 SetEventManager (aMgr:EventManager from ViewerTest);
156 ---Purpose: puts <aMgr> as current eventmanager (the
157 -- move,select,...will be applied to <aMgr>
160 ---Purpose: removes the last EventManager from the list.
163 ---Purpose: clear the list of EventManagers and
164 -- sets the default EventManager as current
166 CurrentEventManager returns EventManager from ViewerTest;
169 ---Category: privateMethods...
174 StandardModeActivation(Mode : Integer from Standard);
176 GetColorFromName(name: CString from Standard)
177 returns NameOfColor from Quantity;