1 -- File: ViewerTest.cdl
2 -- Created: Wed Jul 23 14:11:55 1997
3 -- Author: Henri JEANNIN
4 -- <hjn@entrax.paris3.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1997
28 ---Purpose: to build a context and set a given context as current
34 ---Purpose: used to manage mouse event (move,select,shiftselect)
35 -- By default the events are transmitted to interactive context.
38 class DoubleMapOfInteractiveAndName instantiates DoubleMap
39 from TCollection ( Transient from Standard,
40 AsciiString from TCollection,
41 MapTransientHasher from TColStd,
42 AsciiString from TCollection);
45 -- ----------------------------------------------------------------------
47 -- ----------------------------------------------------------------------
49 Factory (theDI : out Interpretor from Draw);
50 ---Purpose: Loads all Draw commands of V2d & V3d. Used for plugin.
52 ---Category: Create the viewer....
54 ViewerInit ( thePxLeft, thePxTop : Integer from Standard = 0;
55 thePxWidth, thePxHeight : Integer from Standard = 0);
57 -- implemented in ViewerTest_ViewerCommands.cxx
59 ---Category: Selection in the viewer....
62 WClass returns TShared from MMgt is private;
63 ---C++: return const &
64 ---Purpose: Returns a window class that implements standard behavior of
65 -- all windows of the ViewerTest. This includes usual Open CASCADE
66 -- view conventions for mouse buttons (e.g. Ctrl+MB1 for zoom,
67 -- Ctrl+MB2 for pan, etc) and keyboard shortcuts.
68 -- This method is relevant for MS Windows only and respectively
69 -- returns WNT_WClass handle.
71 PickShape (aType : ShapeEnum from TopAbs;
72 MaxPick : Integer from Standard = 5) returns Shape from TopoDS;
73 ---Purpose: waits until a shape of type <aType> is picked in the AIS Viewer and returns it.
74 -- if <aType> == TopAbs_Shape, any shape can be picked...
75 -- MaxPick is the Max number before exiting, if no pick is successfull
78 PickShapes (aType : ShapeEnum from TopAbs;
79 thepicked : in out HArray1OfShape from TopTools;
80 MaxPick : Integer from Standard = 5)
81 returns Boolean from Standard;
82 ---Purpose: wait until the array is filled with picked shapes.
83 -- returns True if the array is filled.
84 -- exit if number of unsuccesfull picks = <MaxPick>
86 PickObject(Type : KindOfInteractive from AIS = AIS_KOI_None;
87 Signature : Integer from Standard = -1;
88 MaxPick : Integer from Standard = 5)
89 returns InteractiveObject from AIS;
90 ---Purpose: waits until an interactive object of a given Type
91 -- and signature is picked (defaut values authorize
92 -- selection of any Interactive Object)
93 -- exit if number of unsuccesfull picks = <MaxPick>
95 PickObjects(thepicked : in out HArray1OfTransient from TColStd;
96 Type : KindOfInteractive from AIS = AIS_KOI_None;
97 Signature : Integer from Standard = -1;
98 MaxPick : Integer from Standard = 5)
99 returns Boolean from Standard;
100 ---Purpose: selection of several interactive objects. Number is given
101 -- by the size of <thepicked>
102 -- exit if number of unsuccesfull picks = <MaxPick>
105 Commands (theCommands : in out Interpretor from Draw);
106 AviCommands(theCommands :in out Interpretor from Draw);
107 ViewerCommands(theCommands :in out Interpretor from Draw);
108 MyCommands (theCommands : in out Interpretor from Draw); -- My Own Com-s
109 RelationCommands(theCommands :in out Interpretor from Draw);
110 ObjectCommands(theCommands :in out Interpretor from Draw);
111 FilletCommands(theCommands :in out Interpretor from Draw);
112 VoxelCommands(theCommands :in out Interpretor from Draw);
114 GetMousePosition(xpix,ypix: out Integer from Standard);
116 GetViewerFromContext returns Viewer from V3d;
118 GetCollectorFromContext returns Viewer from V3d;
120 GetAISContext returns InteractiveContext from AIS;
122 GetNISContext returns InteractiveContext from NIS;
125 SetAISContext (aContext: InteractiveContext from AIS);
127 SetNISContext (aContext: InteractiveContext from NIS);
129 CurrentView returns View from V3d;
131 CurrentView (aViou:View from V3d);
135 ---Category: Change behaviour on move,select,... events.
137 SetEventManager (aMgr:EventManager from ViewerTest);
138 ---Purpose: puts <aMgr> as current eventmanager (the
139 -- move,select,...will be applied to <aMgr>
142 ---Purpose: removes the last EventManager from the list.
145 ---Purpose: clear the list of EventManagers and
146 -- sets the default EventManager as current
148 CurrentEventManager returns EventManager from ViewerTest;
151 ---Category: privateMethods...
156 StandardModeActivation(Mode : Integer from Standard);