Salome HOME
Update copyright information
[modules/visu.git] / idl / VISU_Gen.idl
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : VISU_Gen.idl
23 //  Author : Alexey Petrov
24
25 /*! \file VISU_Gen.idl This file conatins a set of interfaces of the %VISU module.
26  *     This module provides various forms of data visualization in %SALOME application.
27  *     These forms include data tables, XY plots, 3d representations
28  *     and combination of these forms.
29  */
30
31 #ifndef __VISU_GEN__
32 #define __VISU_GEN__
33
34 #include "SALOME_Exception.idl"
35 #include "SALOME_GenericObj.idl"
36 #include "SALOME_Component.idl"
37 #include "SALOMEDS.idl"
38 #include "SALOMEDS_Attributes.idl"
39 #include "MED.idl"
40
41 /*!
42   The main package of interfaces of the post-processing module %VISU.
43 */
44 module VISU {
45   //-------------------------------------------------------
46   typedef string IdType;
47
48   typedef sequence<string> string_array;
49   typedef sequence<double> double_array;
50
51   /*!
52    * This enumeration contains a set of elements defining the type
53    * of the scaling, which can be applied on different presentations.
54    */
55   enum Scaling{ LINEAR, /*!< Linear type of scaling. */
56                 LOGARITHMIC /*!< Logarithmic type of scaling. */
57               };
58
59   /*!
60    * This enumeration contains a set of elements defining
61    * what kind of value will be extracted from gauss points data.
62    */
63   enum GaussMetric {
64     AVERAGE, /*!< Average value (default). */
65     MINIMUM, /*!< Minimum value. */
66     MAXIMUM  /*!< Maximum value. */
67   };
68
69   /*!
70    * This enumeration contains a set of elements defining the
71    * type of the %entity (topological units) constituting a mesh.
72    */
73   enum Entity {
74     NODE, /*!< Node corresponds to a geometrical point. */
75     EDGE, /*!< Edge corresponds to a geometrical line connecting two points. */
76     FACE, /*!< Face corresponds to a geometrical plane bounded by several lines. */
77     CELL, /*!< Cell is a volumic element of a mesh */
78     NONE  /*!< Indicates undefined entity value */
79   };
80
81   /*!
82    * Marker type (used for point rendering)
83    */
84   enum MarkerType {
85     MT_NONE,
86     MT_POINT,
87     MT_PLUS,
88     MT_STAR,
89     MT_O,
90     MT_X,
91     MT_O_POINT,
92     MT_O_PLUS,
93     MT_O_STAR,
94     MT_O_X,
95     MT_USER,
96     MT_POINT_SPRITE /*!< VISU specific */
97   };
98
99   /*!
100    * Marker scale (used for point rendering)
101    */
102   enum MarkerScale {
103     MS_NONE,
104     MS_10,
105     MS_15,
106     MS_20,
107     MS_25,
108     MS_30,
109     MS_35,
110     MS_40,
111     MS_45,
112     MS_50,
113     MS_55,
114     MS_60,
115     MS_65,
116     MS_70
117   };
118
119   /*!
120    * Tables' sort order
121    */
122   enum SortOrder {
123     AscendingOrder, /*!< The table items are sorted ascending */
124     DescendingOrder /*!< The table items are sorted descending */
125   };
126
127   /*!
128    * Tables' sort policy (specifies how empty cells are taken into account when sorting)
129    */
130   enum SortPolicy {
131     EmptyLowest,    /*!< Empty cells are considered as lowest values */
132     EmptyHighest,   /*!< Empty cells are considered as highest values */
133     EmptyFirst,     /*!< Empty cells are always first */
134     EmptyLast,      /*!< Empty cells are always last */
135     EmptyIgnore     /*!< Empty cells are ignored (stay at initial positions) */
136   };
137
138   /*!
139    * This enumeration contains a set of elements defining the type of the %VISU object.
140    * This enumeration is used for navigation between a set of %VISU interfaces.
141    */
142   enum VISUType {
143     TNONE, /*!< Not a %VISU object */
144     TCURVE, /*!< Curve line object for construction of 2D XY plots */
145     TTABLE, /*!< Table containing numerical data */
146     TCONTAINER, /*!< Container object used for storing a set of curve lines */
147     TMESH, /*!< Meshing object */
148     TSCALARMAP, /*!< Scalarmap 3D presentation object */
149     TISOSURFACES, /*!< Iso surface 3D presentation object */
150     TDEFORMEDSHAPE, /*!< Deformed shape 3D presentation object */
151     TSCALARMAPONDEFORMEDSHAPE, /*!< Scalar map on deformed shape 3D presentation object. It is obsolete. Use TDEFORMEDSHAPEANDSCALARMAP instead */
152     TDEFORMEDSHAPEANDSCALARMAP, /*!< Deformed shape and scalar map 3D presentation object */
153     TGAUSSPOINTS, /*!< Gauss Points 3D presentation object */
154     TPLOT3D, /*!< Plot3D 3D presentation object */
155     TPOINTMAP3D, /*!< 3D presentation for table object */
156     TCUTPLANES, /*!< Cut planes 3D presentation object */
157     TCUTLINES, /*!< Cut lines 3D presentation object */
158     TCUTSEGMENT, /*!< Cut segment 3D presentation object */
159     TVECTORS, /*!< Vectors 3D presentation object */
160     TSTREAMLINES, /*!< Streamlines 3D presentation object */
161     TVISUGEN, /*!< %VISU generator used for performing operations with different %VISU objects */
162     TVIEWMANAGER, /*!< View manager used for performing operations with different views */
163     TRESULT, /*!< The data on which different presentations are based */
164     TXYPLOT, /*!< 2D XY plot consisting of one or several curve lines */
165     TTABLEVIEW, /*!< Table view is used for displaying data tables */
166     TVIEW3D, /*!< 3D view is used for displaying 3D graphical presentations */
167     TGAUSSVIEW, /*!< 3D view is used for displaying Gauss Points graphical presentations */
168     TENTITY, /*!< An element composing a mesh: node, edge, face or cell */
169     TFAMILY, /*!< The whole mesh can be divided into one or several submeshes, called families, which are defined by the user. Each family in its turn is composed of entities of a definite type. */
170     TGROUP, /*!< A group of families */
171     TFIELD, /*!< Field represents the results of calculations (it can be scalar or vector values), grouped together under one physical concept. */
172     TTIMESTAMP, /*!<Time stamp represents a subfield: the results of calculations are taken in one definite moment. */
173     TANIMATION, /*!< Represents Animation object. */
174     TEVOLUTION, /*!< Represents Evolution object. */
175     TCOLOREDPRS3DHOLDER, /*!< Colored 3D presentation holder */
176     TCOLOREDPRS3DCACHE, /*!< Colored 3D presentation cache */
177     TPART, /*!< MULTIPR: part of a mesh */
178     TALL
179   };
180
181   /* Clipping planes management */
182   struct ClippingPlane {
183     double X;
184     double Y;
185     double Z;
186     double dX;
187     double dY;
188     double dZ;
189     boolean isAuto;
190     string name;
191   };
192
193   interface Base {
194     /*!
195      * Returns ID of the object.
196      */
197     IdType GetID();
198
199     /*!
200      * Returns the type of the presentable object
201      */
202     VISUType GetType();
203   };
204
205   /*!
206    *  \brief Removable object interface
207    *
208    *  Removable object interface is the root class of all removable objects.
209    */
210   interface RemovableObject : Base {
211     /*!
212      *  Remove object from study.
213      */
214     void RemoveFromStudy();
215   };
216
217   /*! \brief Presentable object interface
218    *
219    * Presentable object interface is the root class of all presentable objects.
220    */
221   interface PrsObject : RemovableObject {
222   };
223
224   //-------------------------------------------------------
225   /*! \brief Interface of curve representation.
226    *
227    * Manages presentation parameters of one curve.
228    * It can be used for presentation of a set of curves using a combined presentation.
229    */
230   interface Curve : PrsObject {
231     /*!
232      * Sets the title of the curve.
233      * \param theTitle This string parameter defines the title of this curve.
234      */
235     void SetTitle(in string theTitle);
236
237     /*!
238      * Gets the title of the curve.
239      * \return String value corresponding to the title of the curve.
240      */
241     string GetTitle();
242
243     /*!
244      * Sets the color of the curve.
245      * \param theColor The color of the curve. This parameter is taken
246      *                 from the <VAR>Orientation</VAR> enumeration.
247      */
248     void SetColor(in SALOMEDS::Color theColor);
249
250     /*!
251      * Gets the color of the curve.
252      * \return Color of the curve. The returned value will correspond
253      *         to one of the elements the <VAR>Color</VAR> enumeration.
254      */
255     SALOMEDS::Color GetColor();
256
257     /*!
258      * This enumeration contains a set of elements defining the
259      * presentation type of markers (data points) with help of
260      * which the curve is constructed on the graphics.
261      */
262     enum MarkerType { NONE,
263                       CIRCLE,
264                       RECTANGLE,
265                       DIAMOND,
266                       DTRIANGLE,
267                       UTRIANGLE,
268                       LTRIANGLE,
269                       RTRIANGLE,
270                       CROSS,
271                       XCROSS
272     };
273
274     /*!
275      * Sets the presentation type of markers (data points) with help of
276      * which the curve is constructed on the graphics.
277      * \param theType This parameter defines the type of marker with help
278      *                of which the curve is constructed on the graphics.
279      *                It is taken from <VAR>MarkerType</VAR> enumeration.
280      */
281     void SetMarker(in MarkerType theType);
282
283     /*!
284      * Gets the presentation type of markers (data points) with
285      * help of which the curve is constructed on the graphics.
286      * \return The type of marker with help of which the curve is constructed
287      *         on the graphics. The returned value will correspond to
288      *         one of the elements the <VAR>MarkerType</VAR> enumeration.
289      */
290     MarkerType GetMarker();
291
292     /*!
293      * This enumeration contains a set of elements defining the
294      * type of presentation of a curve line on the graphics.
295      */
296     enum LineType{ VOIDLINE, SOLIDLINE, DASHLINE, DOTLINE, DASHDOTLINE, DASHDOTDOTLINE};
297
298     /*!
299      * Sets the type of presentation of curve lines on the graphics.
300      * \param theType This parameter defines the type of presentation of curve lines on the graphics.
301      * \param theLineWidth Long value defining the width of the curve line.
302      */
303     void SetLine(in LineType theType, in long theLineWidth);
304
305     /*!
306      * Gets the type of representation of curve lines on the graphics.
307      * \return The type of representation of curve lines on the graphics.
308      */
309     LineType GetLine();
310
311     /*!
312      * Gets the width of the curve line.
313      * \return Long value corresponding to the width of the curve line.
314      */
315     long GetLineWidth();
316
317     /*! Sets scaling coefficient of the curve.
318      * \param coef Double value defining the scale.
319      */
320     void SetScale(in double theCoef);
321
322     /*! Gets the scale coefficient of the curve lines.
323      */
324     double GetScale();
325
326     /*! Sets scaling coefficient of the curve to 1.0.
327      */
328     void RemoveScale();
329
330     /*!
331      * Switches on/off displaying of the deviation labels 
332      * on the curve.
333      * \param flag is used to switch on/off the deviation 
334      * labels on the curve.
335      */
336     void ShowDeviation(in boolean flag);
337   };
338
339   //-------------------------------------------------------
340   /*! \brief %Container presentable object interface
341    *
342    * This class is provided in order to create one presentation using several presentable objects.
343    * This can provide a combination of a set of curves to display them in XY plot view.
344    */
345   interface Container : PrsObject {
346     /*!
347      * Adds a curve into the container.
348      * \param theCurve The added curve.
349      */
350     void AddCurve(in Curve theCurve);
351
352     /*!
353      * Removes a curve from the container.
354      * \param theCurve The removed curve.
355      */
356     void RemoveCurve(in Curve theCurve);
357
358     /*!
359      * Gets the number of curves which are stored in the container.
360      * \return A long value corresponding to the number of curves which are stored in the container.
361      */
362     long GetNbCurves();
363
364     /*!
365      * Removes all curves from the container.
366      */
367     void Clear();
368   };
369
370   //-------------------------------------------------------
371   interface Result;
372   /*! \brief 3D presentation interface
373    *
374    * This is a root class for all 3D presentations, which can be displayed in %VISU module.
375    */
376   interface Prs3d : PrsObject, SALOME::GenericObj
377   {
378     /*!
379      * Move the 3D presentation according to the given offset parameters
380      */
381     void SetOffset(in float theDx, in float theDy, in float theDz);
382
383     /*!
384      * Gets offset parameters for the 3D presentation
385      */
386     void GetOffset(out float theDx, out float theDy, out float theDz);
387
388     /*!
389      * Set standard point marker for the object
390      * \param theType standard marker type
391      * \param theScale standard marker scale
392      */
393     void SetMarkerStd(in MarkerType theType, in MarkerScale theScale);
394
395     /*!
396      * Set custom point marker for the object. The texture can be added
397      * by LoadTexture() function
398      * \param theTextureId texture ID
399      */
400     void SetMarkerTexture(in long theTextureId);
401
402     /*!
403      * Get type of the point marker assigned to the object
404      * \return current marker type (MT_NONE if no marker is set)
405      */
406     MarkerType GetMarkerType();
407
408     /*!
409      * Get scale of the point marker assigned to the object
410      * \return current marker scale (MS_NONE if no marker is set)
411      */
412     MarkerScale GetMarkerScale();
413
414     /*!
415      * Get texture idenifier of the point marker assigned to the object
416      * \return marker texture ID (0 if no marker set)
417      */
418     long GetMarkerTexture();
419
420     /*!
421      * Gets memory size actually used by the presentation (Mb).
422      */
423     float GetMemorySize();
424   };
425
426   /*!
427    * This enumeration contains a set of elements defining the
428    * type of presentation of the mesh.
429    */
430   enum PresentationType{ POINT,
431                          WIREFRAME,
432                          SHADED,
433                          INSIDEFRAME,
434                          SURFACEFRAME,
435                          FEATURE_EDGES,
436                          SHRINK
437   };
438
439   /*!
440    * This enumeration contains a set of elements defining the
441    * type of presentation of the 2D quadratic mesh elements.
442    */
443   enum Quadratic2DPresentationType{
444     LINES,
445     ARCS
446   };
447
448   /*! \brief Interface of the mesh.
449    *
450    * Manages presentation parameters of a 3D presentation of a mesh.
451    * This object can be used for presentation of set of curves using Container class.
452    */
453   interface Mesh : Prs3d {
454     /*!
455      * Sets the color of mesh cells.
456      * \param theColor The color of the cells. This parameter is taken from <VAR>Color</VAR> enumeration.
457      */
458     void SetCellColor(in SALOMEDS::Color theColor);
459
460     /*!
461      * Gets the color of mesh cells.
462      */
463     SALOMEDS::Color GetCellColor();
464
465     /*!
466      * Sets the color of mesh nodes.
467      * \param theColor The color of the nodes. This parameter is taken from <VAR>Color</VAR> enumeration.
468      */
469     void SetNodeColor(in SALOMEDS::Color theColor);
470
471     /*!
472      * Gets the color of mesh nodes.
473      */
474     SALOMEDS::Color GetNodeColor();
475
476     /*!
477      * Sets the color of mesh links.
478      * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
479      */
480     void SetLinkColor(in SALOMEDS::Color theColor);
481
482     /*!
483      * Gets the color of mesh links.
484      */
485     SALOMEDS::Color GetLinkColor();
486
487     /*!
488      * Sets the type of representation of a mesh.
489      * \param theType The of representation of a mesh. This parameter is
490      *                taken from <VAR>PresentationType</VAR> enumeration.
491      */
492     void SetPresentationType(in PresentationType theType);
493
494     /*!
495      * Gets the type of representation of the mesh.
496      * \return The type of representation of the mesh.
497      */
498     PresentationType GetPresentationType();
499
500
501     /*!
502      * Sets the type of representation of a 2D quadratic mesh elements.
503      * \param theType The type of representation of 2D quadratic mesh elements.
504      *                This parameter is taken from
505      *                      <VAR>Quadratic2DPresentationType</VAR> enumeration.
506      */
507     void SetQuadratic2DPresentationType(in Quadratic2DPresentationType theType);
508
509     /*!
510      * Gets the type of representation of the 2D quadratic mesh elements.
511      * \return The type of representation of the 2D quadratic mesh elements.
512      */
513     Quadratic2DPresentationType GetQuadratic2DPresentationType();
514
515     /*!
516      * Switches shrink mode of presentation
517      * Note: SetPresentationType(SHRINK) is same as SetShrink(True)
518      */
519     void SetShrink(in boolean toShrink);
520
521     /*!
522      * Returns current state of shrink mode
523      */
524     boolean IsShrank();
525   };
526
527
528   //-------------------------------------------------------
529   /*! \brief Basic Interface for the %Colored 3D Presentations
530    *
531    * This interface is responsable for coloring of 3D field presentations
532    * according the scalar values applied to different cells.
533    * As well it contains presentation parameters of the scalar bar. The scalar
534    * bar is displayed along with each colored field presentation and serves for
535    * consulting the correspondance between colors and data values.
536    */
537   interface ColoredPrs3dBase : Prs3d
538   {
539     /*!
540      * Sets scalar range - min and max boundaries of the scalar bar.
541      * \param theMin  Min boundary of the scalar bar.
542      * \param theMax  Max boundary of the scalar bar.
543      */
544     void SetRange(in double theMin, in double theMax);
545
546     /*!
547      * Gets the min boundary of the scalar bar.
548      */
549     double GetMin();
550
551     /*!
552      * Gets the max boundary of the scalar bar.
553      */
554     double GetMax();
555
556     /*!
557      * Sets scalar range that corresponds to the source data.
558      */
559     void SetSourceRange();
560
561     /*!
562      * Gets the min boundary of the scalar bar from source data.
563      */
564     double GetSourceMin();
565
566     /*!
567      * Gets the max boundary of the scalar bar from source data.
568      */
569     double GetSourceMax();
570
571     /*!
572      * Defines whether the scalar range corresponds to the source data or not.
573      */
574     boolean IsRangeFixed();
575
576     /*! \brief Position of the scalar bar.
577      *
578      * Sets the position of the scalar bar origin on the screen.
579      * \param X   Horizontal position. The value can be between 0 and 1.
580      * \param Y   Vertical position. The value can be between 0 and 1.
581      */
582     void SetPosition(in double X, in double Y);
583
584     /*!
585      * Gets horizontal position of the scalar bar origin.
586      */
587     double GetPosX();
588
589     /*!
590      * Gets vertical position of the scalar bar origin.
591      */
592     double GetPosY();
593
594     /*! \brief Size of this presentable object.
595      *
596      * Sets the size of the scalar bar.
597      * \param theWidth  Width of this presentable object. The value can be between 0 and 1.
598      * \param theHeight  Height of this presentable object. The value can be between 0 and 1.
599      */
600     void SetSize(in double theWidth, in double theHeight);
601
602     /*!
603      * Gets the width of this presentable object.
604      * \return A double value corresponding to the width of this presentable object.
605      */
606     double GetWidth();
607
608     /*!
609      * Gets the height of this presentable object.
610      * \return A double value corresponding to the height of this presentable object.
611      */
612     double GetHeight();
613
614     /*!
615      * Sets the number of colors which will be used for presentation of this presentable object.
616      * \param theNbColors A long value defining the number of colors.
617      */
618     void SetNbColors(in long theNbColors);
619
620     /*!
621      * Gets the number of colors which will be used for visualization of this presentable object.
622      * \return A long value corresponding to the number of colors which
623      *         will be used for visualization of this presentable object.
624      */
625     long GetNbColors();
626     /*!
627      * Sets the number of labels which will be used for indication of color gradation
628      * of the scalar bar.
629      * \param theNbLabels A long value defining the number of labels.
630      */
631     void SetLabels(in long theNbLabels);
632
633     /*!
634      * Gets the number of labels which will be used for indication of color gradation of the scalar bar.
635      * \return A long value corresponding to the number of labels which will
636      *         be used for indication of color gradation of the scalar bar.
637      */
638     long GetLabels();
639
640     /*! %Orientation of the scalar bar (to provide backward compatibility). */
641     enum Orientation {
642       HORIZONTAL, /*!< Horizontal orientation of the scalar bar.*/
643       VERTICAL    /*!< Vertical orientation of the scalar bar.*/
644     };
645
646     /*!
647      * Sets the type of orientation of the scalar bar (to provide backward compatibility).
648      * \param theOrientation This parameter defines the orientation of the scalar bar.
649      *                       It is taken from the <VAR>Orientaton</VAR> enumeration.
650      */
651     void SetBarOrientation(in Orientation theOrientation);
652
653     /*!
654      * Gets the type of orientation of the scalar bar (to provide backward compatibility).
655      */
656     Orientation GetBarOrientation();
657   };
658
659   /*! \brief Additional Interface for the %Colored 3D Presentations
660    *
661    */
662
663   interface ColoredPrs3d : ColoredPrs3dBase
664   {
665     /*!
666      * Sets the title of the scalar bar. By default - the name of the selected result is used.
667      * \param theName String parameter defining the name of the scalar bar.
668      */
669     void SetTitle(in string theName);
670
671     /*!
672      * Gets the title of the scalar bar.
673      */
674     string GetTitle();
675
676     /*! Sets the method of coloring of the elements composing a 3D presentation.
677      */
678     void SetScalarMode(in long theScalarMode);
679
680     /*! Gets the method of coloring of the elements composing a 3D presentation.
681      */
682     long GetScalarMode();
683
684     /*!
685      * Set the visibility of a distribution curve.
686      * \param theIs is used to switch on/off the visibility of a distribution curve.
687      */
688     void SetIsDistributionVisible(in boolean theIs);
689
690     //! Gets current visibility of a distribution curve
691     boolean GetIsDistributionVisible();
692
693     //! Gets current filtering by scalars mode
694     boolean IsScalarFilterUsed();
695
696     void UseScalarFiltering( in boolean theUseScalarFilter );
697
698     /*!
699      * Sets scalar range - min and max boundaries of the scalar bar.
700      * \param theMin  Min boundary of the scalar bar.
701      * \param theMax  Max boundary of the scalar bar.
702      * \param theIsFilter  if true then filter by scalars.
703      */
704     void SetScalarFilterRange( in double theMin, in double theMax );
705
706     double GetScalarFilterMin();
707
708     double GetScalarFilterMax();
709
710     /*!
711      * Add group as geometry of presentation.
712      * \param theMeshName  - mesh name
713      * \param theGroupName - group name
714      */
715     void AddMeshOnGroup(in string theGroupName);
716
717     /*!
718      * PrsMerger method:
719      * Remove all groups.(The scalar map will be placed on all mesh).
720      */
721     void RemoveAllGeom();
722   };
723
724
725   //-------------------------------------------------------
726   interface View3D;
727   interface ColoredPrs3dCache;
728
729
730   //-------------------------------------------------------
731   /*! \brief %ColoredPrs3dHolder interface.
732    * Interface of 3d presentation's holder, which represents colored 3d presentations,
733    * created on fields. It is publishing in the object browser in a separate folder
734    * and can be controled by viewer's slider.
735    */
736   interface ColoredPrs3dHolder : PrsObject, SALOME::GenericObj
737   {
738     /*!
739      * Presentation input parameters.
740      */
741     struct BasicInput
742     {
743       Result myResult;
744       string myMeshName;
745       Entity myEntity;
746       string myFieldName;
747       long myTimeStampNumber;
748     };
749
750     /*!
751      * Apply input parameters to last visited presentation in the cache.
752      */
753     boolean Apply(in ColoredPrs3d thePrs3d,
754                   in BasicInput theInput,
755                   in View3D theView3D);
756
757     /*!
758      * Gets the last visited presentation in the cache.
759      */
760     ColoredPrs3d GetDevice();
761
762     /*!
763      * Gets type of the managed presentations.
764      */
765     VISUType GetPrsType();
766
767     /*! Defines timestamp representation.
768      */
769     struct TimeStampInfo
770     {
771       string myTime;
772       long myNumber;
773     };
774
775     /*! Defines representation range of timestamps.
776      */
777     typedef sequence<TimeStampInfo> TimeStampsRange;
778
779     /*!
780      * Gets TimeStampsRange information from the last visited presentation.
781      */
782     TimeStampsRange GetTimeStampsRange();
783
784     /*!
785      * Gets input parameters of the last visited presentation.
786      */
787     BasicInput GetBasicInput();
788
789     /*!
790      * Gets a %ColoredPrs3dCache, to which the holder belongs
791      */
792     ColoredPrs3dCache GetCache();
793
794     /*!
795      * Gets memory size actually used by the holder (Mb).
796      */
797     float GetMemorySize();
798   };
799
800
801   //-------------------------------------------------------
802   /*! \brief %ColoredPrs3dCache interface.
803    * This interface is responsible for memory management of 3d presentations.
804    * One cache corresponds to one study.
805    */
806   interface ColoredPrs3dCache : RemovableObject, SALOME::GenericObj
807   {
808     /*! This enumeration contains the cache memory modes. */
809     enum MemoryMode {
810       MINIMAL, /*!< Minimal memory mode (default behaviour). */
811       LIMITED  /*!< Limited memory mode (fixed memory size for presentations). */
812     };
813
814     /*! This enumeration defines how to enlarge the cache limited memory. */
815     enum EnlargeType {
816       NO_ENLARGE, /*!< No need to enlarge (default behaviour). */
817       ENLARGE,    /*!< Enlarge limited memory. */
818       IMPOSSIBLE  /*!< Impossible to enlarge (not enough free memory). */
819     };
820
821     /*! Sets a memory mode.*/
822     void SetMemoryMode(in MemoryMode theMode);
823
824     /*! Gets a memory mode.*/
825     MemoryMode GetMemoryMode();
826
827     /*! Sets a memory size for limited mode (Mb). */
828     void SetLimitedMemory(in float theMemorySize);
829
830     /*! Gets a memory size for limited mode (Mb). */
831     float GetLimitedMemory();
832
833     /*!
834      * Gets memory size actually used by the cache system (Mb).
835      */
836     float GetMemorySize();
837
838     /*! Creates %ColoredPrs3dHolder.*/
839     ColoredPrs3dHolder CreateHolder(in VISUType theType,
840                                     in ColoredPrs3dHolder::BasicInput theInput);
841
842     /*! Gets a memory which is required to create a holder. */
843     EnlargeType GetRequiredMemory(in VISUType theType,
844                                   in ColoredPrs3dHolder::BasicInput theInput,
845                                   out float theRequiredMemory);
846   };
847
848
849   //-------------------------------------------------------
850   /*! \brief Interface of the %Scalar Map
851    *
852    * This interface is responsable for coloring of 3D field presentations
853    * according the scalar values applied to different cells.
854    * As well it contains presentation parameters of the scalar bar. The scalar
855    * bar is displayed along with each colored field presentation and serves for
856    * consulting the correspondance between colors and data values.
857    */
858
859   interface ScaledPrs3d {
860     /*!
861      * Sets the type of scaling of the values reflected by the scalar bar.
862      * \param theScaling The value of this parameter is taken from the <VAR>Scaling</VAR> enumeration.
863      */
864     void SetScaling(in Scaling theScaling);
865
866     /*!
867      * Gets the type of scaling of the values reflected by this presentation.
868      */
869     Scaling GetScaling();
870   };
871
872   interface ScalarMap : ColoredPrs3d, ScaledPrs3d {
873
874     /*!
875      * Returns visibility state of scalar bar
876      */
877     boolean IsBarVisible();
878
879     /*!
880      * Sets visibility state of scalar bar
881      */
882     void SetBarVisible(in boolean theVisible);
883
884     /*!
885      * Sets the gauss metric for the presentation.
886      * \param theGaussMetric The value of this parameter is taken from the <VAR>GaussMetric</VAR> enumeration.
887      */
888     void SetGaussMetric(in GaussMetric theGaussMetric);
889
890     /*!
891      * Gets the gauss metric of the presentation.
892      */
893     GaussMetric GetGaussMetric();
894
895     /*!
896      * Sets the color of mesh links.
897      * \param theColor The color of the links. This parameter is taken from <VAR>Color</VAR> enumeration.
898      */
899     void SetLinkColor(in SALOMEDS::Color theColor);
900
901     /*!
902      * Gets the color of mesh links.
903      */
904     SALOMEDS::Color GetLinkColor();
905   };
906
907   //-------------------------------------------------------
908   /*! \brief Gauss Points presentation interface
909    *
910    * Presentation parameters of the Gauss Points presentation.
911    */
912   //-------------------------------------------------------
913   interface GaussPoints : ColoredPrs3d
914   {
915     //! Set flag indicating which scalar bar is active.
916     void SetIsActiveLocalScalarBar(in boolean theFlag);
917
918     //! Get flag indicating which scalar bar is active.
919     boolean GetIsActiveLocalScalarBar();
920
921     //! Set flag indicating visibility of global scalar bar.
922     void SetIsDispGlobalScalarBar(in boolean theFlag);
923
924     //! Get flag indicating visibility of global scalar bar.
925     boolean GetIsDispGlobalScalarBar();
926
927     //! Set value of the distance between global and local scalar bars.
928     void SetSpacing(in double theSpacing);
929
930     //! Get value of the distance between global and local scalar bars.
931     double GetSpacing();
932
933     /*!
934      * Returns visibility state of scalar bar
935      */
936     boolean IsBarVisible();
937
938     /*!
939      * Sets visibility state of scalar bar
940      */
941     void SetBarVisible(in boolean theVisible);
942
943     /*!
944      * Set the Multicolored mode.
945      * \param theIsColored is used to switch between Results and Geometry modes.
946      * Multiple colors are using when the presentation is
947      * drawing in the Results mode, one color - in the Geometry mode.
948      */
949     void SetIsColored(in boolean theIsColored);
950
951     //! Gets current color mode
952     boolean GetIsColored();
953
954     /*! Sets the color of this presentation in case of IsColored switched off.
955      * \param theColor The color of this presentation. This parameter
956      *                 is taken from the <VAR>Color</VAR> enumeration.
957      */
958     void SetColor(in SALOMEDS::Color theColor);
959
960     /*!
961      * When the Bicolor parameter is set to true, scalar bars are
962      * drawing with two colors : red color correspoonds to positive
963      * scalar values, blue color - to negative values.
964      */
965     void SetBiColor(in boolean theIsBiColor);
966
967     //! Get the Bicolor mode.
968     boolean GetBiColor();
969
970     //! Checks whether the Gauss Points will be deformed or not
971     boolean GetIsDeformed();
972
973     //! Apply deformation on the Gauss Points
974     void SetIsDeformed(in boolean theIsDeformed);
975
976     /*!
977      *  Sets the scale factor for scalar values
978      *  (how much corresponding mesh elements should be translated).
979      *  \param theScaleFactor The scaling factor.
980      */
981     void SetScaleFactor(in double theScaleFactor);
982
983     /*!
984      *  Gets the scale factor for scalar values.
985      *  (how much corresponding mesh elements is translated)
986      */
987     double GetScaleFactor();
988
989     /*!
990      * This enumeration contains a set of elements defining the type of representation of the vector head.
991      */
992     enum PrimitiveType {
993       SPRITE,
994       POINT,
995       SPHERE
996     };
997
998     //! Set type of the primitives which is used for drawing the Gauss Points
999     void SetPrimitiveType(in PrimitiveType thePrimitiveType);
1000
1001     //! Get type of the primitives which is used for drawing the Gauss Points
1002     PrimitiveType GetPrimitiveType();
1003
1004     //! Sets Point Sprite clamp
1005     void SetClamp(in double theClamp);
1006
1007     //! Gets Point Sprite clamp
1008     double GetClamp();
1009
1010     //! Sets minimum size of Point Sprites
1011     void SetMinSize(in double theMinSize);
1012
1013     //! Gets minimum size of Point Sprites
1014     double GetMinSize();
1015
1016     //! Sets maximum size of Point Sprites
1017     void SetMaxSize(in double theMaxSize);
1018
1019     //! Gets maximum size of Point Sprites
1020     double GetMaxSize();
1021
1022     //! Sets magnification for Point Sprites
1023     void SetMagnification(in double theMagnification);
1024
1025     //! Gets magnification for Point Sprites
1026     double GetMagnification();
1027
1028     //! Sets the increment of changing Magnification parameter
1029     void SetMagnificationIncrement(in double theIncrement);
1030
1031     //! Gets the increment of changing Magnification parameter
1032     double GetMagnificationIncrement();
1033
1034     //! Sets Point Sprites size
1035     void SetGeomSize(in double theGeomSize);
1036
1037     //! Sets size of Point Sprite
1038     double GetGeomSize();
1039
1040     //! Get path to the image using for Main Point Sprite texture
1041     string GetMainTexture();
1042
1043     //! Get path to the image using for Alpha Point Sprite texture
1044     string GetAlphaTexture();
1045
1046     //! Points Main and AlphaMask images to be used by Point Sprites
1047     void SetTextures(in string theMainTexture, in string theAlphaTexture);
1048
1049     //! Sets Point Sprite Alpha threshold
1050     void SetAlphaThreshold(in double theAlphaThreshold);
1051
1052     //! Gets Point Sprite Alpha threshold
1053     double GetAlphaThreshold();
1054
1055     //! Sets resolution of the Geometrical Sphere
1056     void SetResolution(in long theResolution);
1057
1058     //! Sets resolution of the Geometrical Sphere
1059     long GetResolution();
1060
1061     //! Sets how many faces of can be drawn in the Geometrical Sphere primitive mode
1062     void SetFaceLimit(in long theFaceLimit);
1063
1064     //! Defines how many faces of can be drawn in the Geometrical Sphere primitive mode
1065     long GetFaceLimit();
1066
1067
1068   };
1069
1070
1071   /*! \brief MonoColor presentation presentation interface
1072    *
1073    * Presentation parameters of the MonoColor presentation.
1074    */
1075   interface MonoColorPrs : ScalarMap {
1076
1077     /*! This boolean method returns True if this deformed shape presentation is colored.
1078      */
1079     boolean IsColored();
1080
1081     /*! Shows this presentation in colored mode.
1082      * \param theColored If this boolean parameter is True this presentable
1083      *                   object will be shown in colored mode.
1084      */
1085     void ShowColored(in boolean theColored);
1086
1087     /*! Gets the color of this presentable object.
1088      * \return The color of this presentable object.
1089      */
1090     SALOMEDS::Color GetColor();
1091
1092     /*! Sets the color of this presentation.
1093      * \param theColor The color of this presentation. This parameter
1094      *                 is taken from the <VAR>Color</VAR> enumeration.
1095      */
1096     void SetColor(in SALOMEDS::Color theColor);
1097   };
1098
1099
1100   /*! \brief Deformed shape presentation interface
1101    *
1102    * Presentation parameters of the deformed shape presentation.
1103    */
1104   interface DeformedShape : MonoColorPrs
1105   {
1106     /*!
1107      * Sets the scale of the presentatable object.
1108      * \param theScale Double value defining the scale of this presentable object.
1109      */
1110     void SetScale(in double theScale);
1111
1112     /*!
1113      * Gets the scale of the presentatable object.
1114      */
1115     double GetScale();
1116
1117   };
1118
1119   //-------------------------------------------------------
1120   /*! \brief Deformation interface
1121    *
1122    * This is base interface for building of the deformed presentations
1123    */
1124   interface Deformation{
1125     /*!
1126      * Sets the scale of the presentatable object.
1127      * \param theScale Double value defining the scale of this presentable object.
1128      */
1129     void SetScale(in double theScale);
1130
1131     /*!
1132      * Gets the scale of the presentatable object.
1133      */
1134     double GetScale();
1135
1136     /*!
1137      * Sets the vectorial field
1138      * \param theEntity    - entity of vectorial field
1139      * \param theFieldName - the name of vectorial field
1140      */
1141     void SetVectorialField(in Entity theEntity,
1142                            in string theFieldName);
1143
1144     /*!
1145      * Get vectorial entity
1146      */
1147     Entity GetVectorialFieldEntity();
1148
1149     /*!
1150      * Get scalar field name
1151      */
1152     string GetVectorialFieldName();
1153
1154   };
1155
1156   //-------------------------------------------------------
1157   /*! \brief OptionalDeformation interface
1158    *
1159    * This is interface for switch on/off of the deformation of the presentation
1160    */
1161   interface OptionalDeformation : Deformation{
1162
1163     /*!
1164      * Sets the deformation flag of the presentatable object.
1165      * \param theFlag Boolean value defining the deformation flag of this presentable object.
1166      */
1167     void UseDeformation(in boolean theFlag);
1168
1169     /*!
1170      * Gets the deformation flag of the presentatable object.
1171      */
1172     boolean IsDeformed();
1173   };
1174
1175   //-------------------------------------------------------
1176   /*! \brief Scalar Map on Deformed shape presentation interface
1177    *
1178    * Presentation parameters of the scalar map on deformed shape presentation.
1179    */
1180   interface DeformedShapeAndScalarMap : ScalarMap {
1181
1182     /*!
1183      * Sets the scale of the presentatable object.
1184      * \param theScale Double value defining the scale of this presentable object.
1185      */
1186     void SetScale(in double theScale);
1187
1188     /*!
1189      * Gets the scale of the presentatable object.
1190      */
1191     double GetScale();
1192
1193     /*!
1194      * Sets the scalar field
1195      * \param theEntity    - entity of scalar field
1196      * \param theFieldName - the name of scalar field
1197      * \param theTimeStampNumber - the timestamp number for the scalar field
1198      */
1199     void SetScalarField(in Entity theEntity,
1200                         in string theFieldName,
1201                         in long theTimeStampNumber);
1202
1203
1204     /*!
1205      * Get scalar entity
1206      */
1207     Entity GetScalarEntity();
1208
1209     /*!
1210      * Get scalar field name
1211      */
1212     string GetScalarFieldName();
1213
1214     /*!
1215      * Get timestamp number for the scalar field
1216      */
1217     long GetScalarTimeStampNumber();
1218   };
1219
1220
1221   //-------------------------------------------------------
1222   /*!
1223    *  \brief Plot3D interface
1224    *
1225    *  Presentation parameters of Plot3D presentation. This type of presentation
1226    *  consists of deforming initial planar mesh according to values assigned to the mesh elements.
1227    *  If mesh not planar but volumic one, it is possible to generate intermediate planar mesh.
1228    */
1229   interface Plot3dBase {
1230     /*!
1231      *  Sets the scale factor for scalar values
1232      *  (how much corresponding mesh elements should be translated).
1233      *  \param theScaleFactor The scaling factor.
1234      */
1235     void SetScaleFactor (in double theScaleFactor);
1236
1237     /*!
1238      *  Gets the scale factor for scalar values.
1239      *  (how much corresponding mesh elements is translated)
1240      */
1241     double GetScaleFactor();
1242
1243     /*!
1244      *  Sets presentation type: contour or surface.
1245      *  \param theIsContourPrs Define, whether presentation type is contour.
1246      */
1247     void SetContourPrs (in boolean theIsContourPrs );
1248
1249     /*!
1250      *  Returns true if presentation type is contour.
1251      */
1252     boolean GetIsContourPrs();
1253
1254     /*!
1255      *  Sets the number of contours.
1256      *  \param theNb The number of contours.
1257      */
1258     void SetNbOfContours (in long theNb);
1259
1260     /*!
1261      *  Gets the number of contours.
1262      */
1263     long GetNbOfContours();
1264   };
1265
1266   interface Plot3D : ScalarMap, Plot3dBase {
1267     /*!
1268      *  This enumeration contains a set of elements defining
1269      *  the type of orientation in 3D space of the cutting plane.
1270      */
1271     enum Orientation { XY,   /*!< The object is located in the plane formed by X and Y axis. */
1272                        YZ,   /*!< The object is located in the plane formed by Y and Z axis. */
1273                        ZX }; /*!< The object is located in the plane formed by Z and X axis. */
1274
1275     /*!
1276      *  Sets the orientation in 3D space of cutting plane for the presentation.
1277      *  \param theOrientation This parameter defines the type of orientation of cutting plane
1278      *         in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1279      *  \param theXAngle The angle of rotation of the cutting plane
1280      *         around the first axis of the chosen orientation.
1281      *  \param theXAngle The angle of rotation of the cutting plane
1282      *         around the second axis of the chosen orientation.
1283      */
1284     void SetOrientation (in Orientation theOrientation, in double theXAngle, in double theYAngle);
1285
1286     /*!
1287      *  Gets the type of orientation in 3D space of cutting plane.
1288      */
1289     Orientation GetOrientationType();
1290
1291     /*!
1292      *  Gets rotation angle of the cutting plane
1293      *  around the first axis of the chosen orientation.
1294      */
1295     double GetRotateX();
1296
1297     /*!
1298      *  Gets rotation angle of the cutting plane
1299      *  around the second axis of the chosen orientation.
1300      */
1301     double GetRotateY();
1302
1303     /*!
1304      *  Sets the position of a cutting plane.
1305      *  \param thePlanePosition The position of the cutting plane.
1306      *  \param theIsRelative Define, whether the input position is relative.
1307      */
1308     void SetPlanePosition (in double  thePlanePosition,
1309                            in boolean theIsRelative);
1310
1311     /*!
1312      *  Gets the position of the cutting plane
1313      */
1314     double GetPlanePosition();
1315
1316     /*!
1317      *  Returns true if a position of cutting plane is relative
1318      */
1319     boolean IsPositionRelative();
1320   };
1321
1322  //-------------------------------------------------------
1323   /*! \brief %Table representation interface
1324    *
1325    * Presentation parameters of the %Table view.
1326    */
1327   interface Table : PrsObject {
1328     /*!
1329      * Sets the title of the table.
1330      * \param theTitle String parameter defining the title of this table.
1331      */
1332     void SetTitle(in string theTitle);
1333
1334     /*!
1335      * Gets the title of the table.
1336      * \return A string value containing the title of the table.
1337     */
1338     string GetTitle();
1339
1340     /*!
1341      * This enumeration contains a set of elements defining the orientation of the table.
1342      */
1343     enum Orientation {
1344       HORIZONTAL, /*!< Horizontal orientation of the table. */
1345       VERTIACAL   /*!< Vertical orientation of the table. */
1346     };
1347
1348     /*!
1349      * Sets orientation of the table.
1350      * \param theOrientation This input parameter defines the orientation of the table.
1351      *                       It is taken from the <VAR>Orientation</VAR> enumeration.
1352      */
1353     void SetOrientation(in Orientation theOrientation);
1354
1355     /*!
1356      * Gets orientation of the table.
1357      * \return Orientation of the table. The returned value will correspond
1358      *         to one of the elements the <VAR>Orientation</VAR> enumeration.
1359      */
1360     Orientation GetOrientation();
1361
1362     /*!
1363      * Gets the number of rows of the table.
1364      * \return Long value corresponding to the number of rows of the table
1365      */
1366     long GetNbRows();
1367
1368     /*!
1369      * Gets the number of columns of the table.
1370      * \return Long value corresponding to the number of columns of the table
1371      */
1372     long GetNbColumns();
1373
1374     /*!
1375      * Sorts the specified row of the table.
1376      * \param theRow Index of the row to sort
1377      * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1378      * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1379      */
1380     void SortRow(in long theRow, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1381
1382     /*!
1383      * Sorts the specified column of the table.
1384      * \param theRow Index of the column to sort
1385      * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1386      * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1387      */
1388     void SortColumn(in long theColumn, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1389
1390     /*!
1391      * Sorts the table by the specified row.
1392      * \param theRow Index of the row, by which the table has to be sort
1393      * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1394      * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1395      */
1396     void SortByRow(in long theRow, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1397
1398     /*!
1399      * Sorts the table by the specified column.
1400      * \param theColumn Index of the column, by which the table has to be sort
1401      * \param theSortOrder Sort order (see <VAR>SortOrder</VAR> enumeration)
1402      * \param theSortPolicy Sort policy (see <VAR>SortPolicy</VAR> enumeration)
1403      */
1404     void SortByColumn(in long theColumn, in SortOrder theSortOrder, in SortPolicy theSortPolicy);
1405   };
1406
1407   //-------------------------------------------------------
1408   /*! \brief %PointMap3d representation interface
1409    *
1410    * Presentation parameters of the %Table Point Map in 3d view.
1411    */
1412   interface PointMap3d : ColoredPrs3dBase, ScaledPrs3d, Plot3dBase, Table {
1413   };
1414
1415   //-------------------------------------------------------
1416   /*! \brief Cut planes interface
1417    *
1418    * Presentation parameters of Cut planes presentation. This type of presentation
1419    * consists of cutting your initial mesh by a definite number of planes. As the
1420    * result you will see these planes which will be cutted by the borders of the mesh.
1421    */
1422   interface CutPlanes : ScalarMap, OptionalDeformation {
1423     /*!
1424      * This enumeration contains a set of elements defining the type of orientation in 3D space
1425      * of the cut planes.
1426      */
1427     enum Orientation {XY, /*!< The object is located in the plane formed by X and Y axis. */
1428                       YZ, /*!< The object is located in the plane formed by Y and Z axis. */
1429                       ZX}; /*!< The object is located in the plane formed by Z and X axis. */
1430
1431     /*!
1432      * Sets the type of orientation in 3D space of cut planes presentation.
1433      * \param theOrientation This parameter defines the type of orientation of cut planes
1434      *                       in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1435      * \param theXAngle The angle of rotation of the cut planes around
1436      *                  the first axis of the chosen orientation.
1437      * \param theXAngle The angle of rotation of the cut planes around
1438      *                  the second axis of the chosen orientation.
1439      */
1440     void SetOrientation(in Orientation theOrientation, in double theXAngle, in double theYAngle);
1441
1442     /*!
1443      * Gets the type of orientation in 3D space of cut planes presentation.
1444      */
1445     Orientation GetOrientationType();
1446
1447     /*!
1448      * Gets rotation angle of the cut plane presentation around the first axis of the chosen orientation.
1449      */
1450     double GetRotateX();
1451
1452     /*!
1453      * Gets rotation angle of the cut plane presentation around the second axis of the chosen orientation.
1454      */
1455     double GetRotateY();
1456
1457     /*!
1458      * Sets the displacement of the cut planes in 3D space.
1459      *
1460      * \param theDisp This parameter defines position of the cut planes
1461      * in 3D space. It varies from 0 to 1. If the chosen value is 0.5, the cut planes
1462      * will be evenly located regarding each other; in other words, the distance between all
1463      * of them will be equal. If the value is higher or lower than 0.5, the planes will be displaced
1464      * to one or another side.
1465      */
1466     void SetDisplacement(in double theDisp);
1467
1468     /*!
1469      * Gets the displacement of the cut planes in 3D space.
1470      */
1471     double GetDisplacement();
1472
1473     /*!
1474      * Sets the position of a definite cut plane.
1475      * \param thePlaneNumber The number of this cut plane.
1476      * \param thePlanePosition The position of this cut plane.
1477      */
1478      void SetPlanePosition(in long thePlaneNumber, in double thePlanePosition);
1479
1480     /*!
1481      * Sets the position of the choosen plane to default value.
1482      * \param thePlaneNumber The number of this cut plane.
1483      */
1484      void SetDefault(in long thePlaneNumber);
1485
1486     /*!
1487      * Gets the position of the choosen plane
1488      */
1489     double GetPlanePosition(in long thePlaneNumber);
1490
1491     /*!
1492      * Determines whether the choosen plane has default position.
1493      * \param thePlaneNumber The number of this cut plane.
1494      */
1495     boolean IsDefault(in long thePlaneNumber);
1496
1497     /*!
1498      * Sets the number of cut planes.
1499      * \param theNb The number of cut planes.
1500      */
1501     void SetNbPlanes(in long theNb);
1502
1503     /*!
1504      * Gets the number of cut planes.
1505      */
1506     long GetNbPlanes();
1507   };
1508
1509   //-------------------------------------------------------
1510   /*! \brief Base interface for Cut Lines and Cut Segment tools
1511    *
1512    */
1513   interface CutLinesBase : ScalarMap {
1514     /*!
1515      * Sets the number of cut lines.
1516      * \param theNb The number of cut lines.
1517      */
1518     void SetNbLines(in long theNb);
1519
1520     /*!
1521      * Gets the number of cut lines.
1522      */
1523     long GetNbLines();
1524
1525     /*! Invert all curves of corresponding table
1526      * \param theInvert - Invert all curves, if value is TRUE, else not.
1527      */
1528     void SetAllCurvesInverted(in boolean theInvert);
1529
1530     /*! Checks the orientation of all curves
1531      * \retval TRUE - if all curves are inverted, else FALSE
1532      */
1533     boolean IsAllCurvesInverted();
1534
1535     /*! Sets values which cutlines would be shown: aboslute or relative values
1536      * \param theAbsLength - boolean value, TRUE or false.
1537      */
1538     void SetUseAbsoluteLength(in boolean theAbsLength);
1539
1540     /*! Checks values of cutlines: using aboslute or relative values
1541      */
1542     boolean IsUseAbsoluteLength();
1543   };
1544
1545   //-------------------------------------------------------
1546   /*! \brief Cut lines presentation.
1547    *
1548    * Presentation parameters of a Cut lines presentation.
1549    * Cut Lines is a type of presentation which displays colored cells
1550    *   with applied scalar values on the mesh where lines are placed.
1551    * The procedure of construction of a Cut Lines presentation reuses the algorithm
1552    *   of creation of Cut Planes presentation and consists of two steps:
1553    *
1554    *   1. From Cut Planes presentation one plane is taken and
1555    *      it is used as base plane for construction of cut lines.
1556    *   2. This plane is cut by a regular array of planes. The result of this
1557    *      operation is a regular array of lines in space, belonging to the same plane
1558    *      and having the same orientation. They are located inside or on the mesh.
1559    */
1560   interface CutLines : CutLinesBase {
1561     /*!
1562      * Sets the type of orientation in 3D space of the base plane of a cut lines presentation.
1563      * \param theOrientation The orientation of the base plane in 3D space.
1564      * \param theXAngle The angle of rotation of the base plane around
1565      *                  the first axis of the chosen orientation.
1566      * \param theXAngle The angle of rotation of the base plane around
1567      *                  the second axis of the chosen orientation.
1568      */
1569     void SetOrientation(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1570
1571     /*!
1572      * Sets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1573      * \param theOrientation This parameter defines the type of orientation of the cutting planes
1574      *                       in 3D space. It is taken from the <VAR>Orientation</VAR> enumeration.
1575      * \param theXAngle The angle of rotation of the cutting planes
1576      *                  around the first axis of the chosen orientation.
1577      * \param theXAngle The angle of rotation of the cutting planes
1578      *                  around the second axis of the chosen orientation.
1579      */
1580     void SetOrientation2(in CutPlanes::Orientation theOrientation, in double theXAngle, in double theYAngle);
1581
1582     /*!
1583      * Gets the type of orientation in 3D space of the base plane of a cut lines presentation.
1584      */
1585     CutPlanes::Orientation GetOrientationType();
1586
1587     /*!
1588      * Gets the type of orientation in 3D space of the cutting planes of a cut lines presentation.
1589      */
1590     CutPlanes::Orientation GetOrientationType2();
1591
1592     /*!
1593      * Gets rotation angle of the base plane around the first axis of the chosen orientation.
1594      */
1595     double GetRotateX();
1596
1597     /*!
1598      * Gets rotation angle of the cutting planes around the first axis of the chosen orientation.
1599      */
1600     double GetRotateX2();
1601
1602     /*!
1603      * Gets rotation angle of the base plane around the second axis of the chosen orientation.
1604      */
1605     double GetRotateY();
1606
1607     /*!
1608      * Gets rotation angle of the cutting planes around the second axis of the chosen orientation.
1609      */
1610     double GetRotateY2();
1611
1612     /*!
1613      * Sets the displacement of the base plane of the cut lines presentation in 3D space.
1614      *
1615      * \param theDisp This parameter defines position of the base plane
1616      * in 3D space. It varies from 0 to 1.
1617      */
1618     void SetDisplacement(in double theDisp);
1619
1620     /*!
1621      * Sets the displacement of the cutting planes of the cut lines presentation in 3D space.
1622      *
1623      * \param theDisp This parameter defines position of the cutting planes
1624      * in 3D space. It varies from 0 to 1.
1625      */
1626     void SetDisplacement2(in double theDisp);
1627
1628     /*!
1629      * Gets the displacement of the base plane of the cut lines presentation in 3D space.
1630      */
1631     double GetDisplacement();
1632
1633     /*!
1634      * Gets the displacement of the cutting planes of the cut lines presentation in 3D space.
1635      */
1636     double GetDisplacement2();
1637
1638     /*! Sets the position of the base plane in 3D space.
1639      * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1640      */
1641     void SetBasePlanePosition(in double thePlanePosition);
1642
1643     /*! Gets the position of the base plane in 3D space.
1644      */
1645     double GetBasePlanePosition();
1646
1647     /*! Sets the position of one of cutting planes in 3D space.
1648      * \param thePlaneNumber A long value defining the order number of this cutting plane.
1649      * \param thePlanePosition A double value defining the position of the base plane in 3D space.
1650      */
1651     void SetLinePosition(in long thePlaneNumber, in double thePlanePosition);
1652
1653     /*! Gets the position of one of cutting planes in 3D space.
1654      * \param thePlaneNumber A long value defining the order number of this cutting plane.
1655      */
1656     double GetLinePosition(in long thePlaneNumber);
1657
1658     /*! Sets the position of the base plane to default value.
1659      */
1660     void SetDefault();
1661
1662     /*!
1663      * Determines whether the base plane has default position.
1664      * \return True if the base plane has default position.
1665      */
1666     boolean IsDefault();
1667
1668     /*!
1669      * Sets the position of the choosen cutting plane to default value.
1670      * \param thePlaneNumber The number of this cutting plane.
1671      */
1672     void SetDefaultPosition(in long thePlaneNumber);
1673
1674     /*!
1675      * Determines whether the choosen cutting plane has default position.
1676      * \param thePlaneNumber The number of this cutting plane.
1677      * \return True if this cutting plane has default position.
1678      */
1679     boolean IsDefaultPosition(in long thePlaneNumber);
1680   };
1681
1682   //-------------------------------------------------------
1683   /*! \brief Cut segment presentation.
1684    *
1685    * Presentation parameters of a Cut segment presentation.
1686    * Cut Segment is a simplified variant of Cut Lines presentation, which is used
1687    * to display a single line instead of set of them. Axis of this line is defined
1688    * by coordinates of two points in 3D space.
1689    */
1690   interface CutSegment : CutLinesBase {
1691     /*!
1692      * Sets coordinates of the first point of axis of the segment.
1693      * \param theX X coordinate of the point
1694      * \param theY Y coordinate of the point
1695      * \param theZ Z coordinate of the point
1696      */
1697     void SetPoint1(in double theX, in double theY, in double theZ);
1698
1699     /*!
1700      * Gets coordinates of the first point of axis of the segment.
1701      * \param theX X coordinate of the point
1702      * \param theY Y coordinate of the point
1703      * \param theZ Z coordinate of the point
1704      */
1705     void GetPoint1(out double theX, out double theY, out double theZ);
1706
1707     /*!
1708      * Sets coordinates of the second point of axis of the segment.
1709      * \param theX X coordinate of the point
1710      * \param theY Y coordinate of the point
1711      * \param theZ Z coordinate of the point
1712      */
1713     void SetPoint2(in double theX, in double theY, in double theZ);
1714
1715     /*!
1716      * Gets coordinates of the second point of axis of the segment.
1717      * \param theX X coordinate of the point
1718      * \param theY Y coordinate of the point
1719      * \param theZ Z coordinate of the point
1720      */
1721     void GetPoint2(out double theX, out double theY, out double theZ);
1722   };
1723
1724   /*! \brief Interface of the stream lines representation
1725    *
1726    * This interface contains presentation parameters of stream lines presentations.
1727    * <BR>Stream lines is a type of presentation transforming into lines the
1728    * cells with vectors having most similar direction. A stream line can be thought
1729    * of as the path that a massless particle takes in a vector field.
1730    * Streamlines are used to convey the structure of a vector field.
1731    * Usually streamlines are created to explore the most interesting features in the field.
1732    */
1733   interface StreamLines : MonoColorPrs {
1734     /*! This enumerations contains a set of elements necessary
1735      * for definition of direction of the stream lines.
1736      */
1737     enum Direction{ FORWARD,
1738                     BACKWARD,
1739                     BOTH
1740     };
1741
1742     /*! Sets the parameters of the stream lines presentation.
1743      * \param theIntStep Inegration step is a parameter of smoothness of the stream lines.
1744      *                   This parameter defines the accuracy of construction of the streamlines.
1745      *                   A smaller value of this parameter allows to construct smoother
1746      *                   streamlines (at the cost of more computation time).
1747      * \param thePropogationTime This parameter controls the maximum length of
1748      *                           the stream line (measured in units of time).
1749      * \param theStepLength This parameter defines the size of the output line segments
1750      *                      that make up the streamline (which is represented as a polyline).
1751      * \param thePrs3d The source presentation. The points of the field located on this source
1752      *                 presentation will serve as starting points for generation of stream lines.
1753      * \note If this parameter is not defined, your stream lines
1754      *       presentation will be generated on all points of the field.
1755      * \param thePercents This parameter defines the quantity of points of the field
1756      *                    (from 0 to 100%) which will be used as starting points for
1757      *                    construction of the stream lines. Thus, the value of this
1758      *                    parameter can vary from 0 to 1.
1759      * \param theDirection Direction of the stream lines (Forward, Backward or Both).
1760      * \return True if all parameters are properly set.
1761      */
1762     boolean SetParams(in double theIntStep,
1763                       in double thePropogationTime,
1764                       in double theStepLength,
1765                       in Prs3d thePrs3d,
1766                       in double thePercents,
1767                       in Direction theDirection);
1768
1769     /*! Gets the value of integration step of the stream lines presentation.
1770      */
1771     double GetIntegrationStep();
1772
1773     /*! Gets the value of propagation time of the stream lines presentation.
1774      */
1775     double GetPropagationTime();
1776
1777     /*! Gets the value of step length of the stream lines presentation.
1778      */
1779     double GetStepLength();
1780
1781     /*! Returns the source presentation used for generation of the stream lines.
1782      */
1783     Prs3d GetSource();
1784
1785     /*! Gets the quantity of points of the field used as starting
1786      *  points for generation of the stream lines presentation.
1787      */
1788     double GetUsedPoints();
1789
1790     /*! Returns the direction of the stream lines.
1791      */
1792     Direction GetDirection();
1793   };
1794
1795   /*! \brief Interface of the isometric surface presentation
1796    *
1797    * This interface contains presentation parameters of
1798    * isometric surface presentations.
1799    * <BR>Iso surfaces presentation combines all equal scalar
1800    * values on the cells and on the basis of them constructs
1801    * isobaric surfaces, which form this presentation.
1802    */
1803   interface IsoSurfaces : MonoColorPrs {
1804     /*!
1805      * Sets the number of isometric surfaces.
1806      * \param theNb A long value defining the number of isometric surfaces
1807      *              which will be used for construction of this presentation.
1808      */
1809     void SetNbSurfaces(in long theNb);
1810
1811     /*!
1812      * Gets the number of isometric surfaces
1813      */
1814     long GetNbSurfaces();
1815
1816     /*!
1817      * Returns TRUE if labels with values are shown
1818      */
1819     boolean IsLabeled();
1820
1821     /*!
1822      * Set show or not value labels
1823      */
1824     void ShowLabels(in boolean theShow, in long theNb);
1825
1826     /*!
1827      * Returns Nb of labels per surface
1828      */
1829    long GetNbLabels();
1830
1831   };
1832
1833   //-------------------------------------------------------
1834   /*! \brief Interface of the vector presentation.
1835    *
1836    * This interface contains presentation parameters of vector presentations.
1837    */
1838   interface Vectors : DeformedShape {
1839     /*!
1840      * Sets the width of the lines of the vectors.
1841      * \param theWidth A double value defining the width of the lines of the vectors.
1842      */
1843     void SetLineWidth(in double theWidth);
1844
1845     /*!
1846      * Gets the width of the lines of the vectors.
1847      */
1848     double GetLineWidth();
1849
1850     /*!
1851      * This enumeration contains a set of elements defining the type of representation of the vector head.
1852      */
1853     enum GlyphType{ ARROW,
1854                     CONE2,
1855                     CONE6,
1856                     NONE
1857                   };
1858
1859     /*!
1860      * Sets the type of representation of the vector head.
1861      * \param theType This parameter defines the type of representation of the vector head.
1862      * This value is taken from the <VAR>GlyphType</VAR> enumeration.
1863      */
1864     void SetGlyphType(in GlyphType theType);
1865
1866     /*!
1867      * Gets the type of representation of the vector head.
1868      */
1869     GlyphType GetGlyphType();
1870
1871     /*!
1872      * This enumeration contains a set of elements defining the position of the vector head.
1873      */
1874     enum GlyphPos{ CENTER, /*!<In the center of the vector.*/
1875                    TAIL,   /*!<In the tail of the vector.*/
1876                    HEAD  /*!<In the head of the vector.*/
1877                  };
1878
1879     /*!
1880      * Sets the position of the vector head.
1881      * \param thePos This parameter defines the position of the vector head.
1882      * This value is taken from the <VAR>GlyphPos</VAR> enumeration.
1883      */
1884     void SetGlyphPos(in GlyphPos thePos);
1885
1886     /*!
1887      * Gets the position of the vector head.
1888      */
1889     GlyphPos GetGlyphPos();
1890   };
1891
1892   //-------------------------------------------------------
1893   /*! \brief %Animation class
1894    *
1895    * This class provides a set of methods used for:<br>
1896    * <ul>
1897    *     <li> generating different animations on the basis of a field,
1898    *     <li> setting the parameters of the animations,
1899    *     <li> playing these animations in the %VISU module.
1900    * </ul>
1901    * \note
1902    * <BR><B>Field</B> represents the results of calculations
1903    * (it can be scalar or vector values), grouped together under one physical concept.
1904    * <BR><B>Time stamp</B> represents a subfield: the results
1905    * of calculations are taken in one definite moment.
1906    */
1907   interface Animation : Base
1908   {
1909     /*!
1910    * This enumeration contains a set of available animation modes.
1911    */
1912     enum AnimationMode{ PARALLEL, /*!< parallel mode of animation. */
1913                         SUCCESSIVE /*!< succcessive mode of animation. */
1914     };
1915
1916     /*! Defines the field which will be used as a base for generation of the animation.
1917      * \param theObject The %SObject corresponding to the field.
1918      */
1919     boolean addField(in SALOMEDS::SObject theObject);
1920
1921     /*! Remove all fields from Animation object.
1922      */
1923     void clearFields();
1924
1925     /*! Generates presentations on the basis of the field.
1926      * \param theFieldNum The number of the field, which will be used
1927      *                    as the basis for construction of the presentation.
1928      */
1929     void generatePresentations(in long theFieldNum);
1930
1931     /*! Generates a set of frames from the created by the method
1932      *  <VAR>generatePresentations</VAR>3D presentations. A sequence of
1933      *  these frames will be transformed into an animation.
1934      *  \return  True, if the frames have been successfully generated.
1935      */
1936     boolean generateFrames();
1937
1938     /*! Clears the view before starting an animation.
1939      */
1940     void clearView();
1941
1942     /*! \name Playback of an animation:
1943      */
1944 /*@{*/
1945
1946     /*! Starts an animation.
1947      */
1948     void startAnimation();
1949
1950     /*! Stops an animation.
1951      */
1952     void stopAnimation();
1953
1954     /*! Forwards to the next frame.
1955      */
1956     void nextFrame();
1957
1958     /*! Returns to the previous frame.
1959      */
1960     void prevFrame();
1961
1962     /*! Returns to the first frame of the animation.
1963      */
1964     void firstFrame();
1965
1966     /*! Forwards to the last frame of the animation.
1967      */
1968     void lastFrame();
1969
1970     /*!  Passes to a definite frame of the animation.
1971      * \param theFrame A long value defining the number of the frame.
1972      */
1973     void gotoFrame(in long theFrame);
1974 /*@}*/
1975
1976     /*! Gets the number of time stamps (subfields) contained in the given field.
1977      */
1978     long getNbFields();
1979
1980     /*! Gets the number of generated frames
1981      */
1982     long getNbFrames();
1983
1984     /*! Returns True, if the animation is currently running.
1985      */
1986     boolean isRunning();
1987
1988     /*! Returns the number of the current frame.
1989      */
1990     long getCurrentFrame();
1991
1992     /*!
1993      */
1994     ColoredPrs3d getPresentation(in long theField, in long theFrame);
1995
1996     /*! Sets the type of presentation (vectors, deformed shape etc.)
1997      *  which will be generated by the method <VAR>generatePresentations</VAR>.
1998      *  \note \c addField() method should be called before in order to add field
1999      *  with number theFieldNum.
2000      */
2001     void setPresentationType(in long theFieldNum, in VISUType theType);
2002
2003     /*! Gets the type of presentation (vectors, deformed shape etc.) which will
2004      *  be generated by the method <VAR>generatePresentations</VAR>.
2005      *  \note \c addField() method should be called before in order to add field
2006      *  with number theFieldNum.
2007      */
2008     VISUType getPresentationType(in long theFieldNum);
2009
2010     /*! Sets the speed of the animation.
2011      * \param theSpeed The speed of the animation. The value varies from 1 to 99.
2012      */
2013     void setSpeed(in long theSpeed);
2014
2015     /*!  Gets the speed of the animation.
2016      */
2017     long getSpeed();
2018
2019     /*! Ruturns True, if playback of the animation is proportional.
2020      * This option allows to render your animation with proportional periods
2021      * of time between every frame (not depending on the time stamps).
2022      */
2023     boolean isProportional();
2024
2025     /*! Sets the range of the animation. The range is defined on the basis of
2026      *  the time stamps of the field which have been used for generation of the animation.
2027      *  This method allows to bound the range of generated frames.
2028      *  If this method is not used, the animation will be generated
2029      *  on the basis of all time stamps contained in the field.
2030      *  \param theMin The value of the first time stamp which will be used for generation of the animation.
2031      *  \param theMax The value of the last time stamp which will be used for generation of the animation.
2032      */
2033     void setAnimationRange(in double theMin, in double theMax);
2034
2035     /*! Gets the number of the first time stamp which will be used for generation of the animation.
2036      */
2037     double getMinRange();
2038
2039     /*! Gets the number of the last time stamp which will be used for generation of the animation.
2040      */
2041     double getMaxRange();
2042
2043     /*! Returns True if the range of the animation has been defined
2044      *  by the method <VAR>setAnimationRange</VAR>. Otherwise
2045      *  the animation will be generated on the basis of all time stamps contained in the field.
2046      */
2047     boolean isRangeDefined();
2048
2049     /*! Sets the sequence of the animation. The sequence is defined on the basis of
2050      *  the time stamps of the field which have been used for generation of the animation.
2051      *  This method allows to set the sequence of generated frames.
2052      *  If this method is not used, the animation will be generated
2053      *  on the basis of all time stamps contained in the field.
2054      *  Format of the sequence: '1,9,2-5,7-8'
2055      *  \param theSequence The sequence of time stamps indices which will be used for generation of the animation.
2056      */
2057     void setAnimationSequence(in string theSequence);
2058
2059     /*! Gets the animation sequence.
2060      */
2061     string getAnimationSequence();
2062
2063     /*! Returns True if the sequence of the animation has been defined
2064      *  by the method <VAR>setAnimationSequence</VAR>. Otherwise
2065      *  the animation will be generated on the basis of all time stamps contained in the field.
2066      */
2067     boolean isSequenceDefined();
2068
2069     /*! Saves all the frames composing the animation into a definite directory.
2070      *  Pictures format is set with method <VAR>setDumpFormat()</VAR>.
2071      *  \param thePath The directory where all the frames will be saved.
2072      */
2073     void dumpTo(in string thePath);
2074
2075     /*! Set format for saving all the frames composing the animation.
2076      *  \param theFormat The format for saving pictures.
2077      *                   For available formats see QImageIO documentation (Qt).
2078      *                   If specified format is not available, default format will be used.
2079      *                   Default format is JPEG or first of supported, if JPEG is not available.
2080      *  \return Really set format. Differ from \a theFormat if \a theFormat is not available.
2081      */
2082     string setDumpFormat(in string theFormat);
2083
2084     /*! Set frequency of timestamps used to generate AVI file.
2085      *  \param theFrequency The frequency of timestamps to use.
2086      */
2087     void setTimeStampFrequency(in long theFrequency);
2088
2089     /*! Get frequency of timestamps used to generate AVI file.
2090      *  \return The frequency of timestamps to use.
2091      */
2092     long getTimeStampFrequency();
2093
2094     /*! Returns True, if the playback of the animation is cycling.
2095      */
2096     boolean isCycling();
2097
2098     /*! Gets the first time stamp of the field defined at the input of the animation.
2099      * \note This method is used if animation range is <b>NOT</b> defined.
2100      */
2101     double getMinTime();
2102
2103     /*! Gets the last time stamp of the field defined at the input of the animation.
2104      * \note This method is used if animation range is <b>NOT</b> defined.
2105      */
2106     double getMaxTime();
2107
2108     /*! Sets proprtional playback of the animation. This option allows to render your animation
2109      *  with proportional periods of time between every frame (not depending on the time stamps).
2110      *  \param theProp If this boolean parameter is True, playback
2111      *                 of your animation will be set as proportional.
2112      */
2113     void setProportional(in boolean theProp);
2114
2115     /*! Sets cycling playback of the animation. The number of cycles
2116      *  can be infinite, untill you use <VAR>startAnimation</VAR> method.
2117      *  \param theCycle If this boolean parameter is True, playback
2118      *                  of your animation will be set as cycling.
2119      */
2120     void setCycling(in boolean theCycle);
2121
2122     boolean isCleaningMemoryAtEachFrame();
2123     void setCleaningMemoryAtEachFrame(in boolean theCycle);
2124
2125     SALOMEDS::SObject publishInStudy();
2126
2127     void saveAnimation();
2128
2129     void restoreFromStudy(in SALOMEDS::SObject theSObj);
2130
2131     boolean isSavedInStudy();
2132
2133     /*!
2134      * Sets the animation mode.
2135      * \param theMode The value of this parameter is taken from the <VAR>AnimationMode</VAR> enumeration.
2136      */
2137     void setAnimationMode(in AnimationMode theMode);
2138
2139     /*!
2140      * Gets the animation mode.
2141      */
2142     AnimationMode getAnimationMode();
2143
2144     /*!
2145      * Apply the presentation properties to all fields. The exception is raised in the following cases:
2146      * 1) presentations for the given field is not yet created;
2147      * 2) invalid dynamic cast of the given presentation to VISU::ColoredPrs3d_i;
2148      * 3) the MED file is not the same;
2149      * 4) the mesh name is not the same;
2150      * 5) the field name is not the same;
2151      * 6) the entity is not the same.
2152      */
2153     void ApplyProperties(in long theFieldNum, in ColoredPrs3d thePrs)
2154       raises (SALOME::SALOME_Exception);
2155   };
2156
2157
2158   //-------------------------------------------------------
2159   interface XYPlot;
2160
2161   //-------------------------------------------------------
2162   /*! \brief Interface %Evolution
2163    *
2164    */
2165   interface Evolution : Base
2166   {
2167     /*!
2168      * Defines the field which will be used as a base for generation of the evolution.
2169      * \param theObject The %SObject corresponding to the field.
2170      */
2171     boolean setField(in SALOMEDS::SObject theObject);
2172
2173     /*!
2174      * Sets id of the point for which the evolution will be generated.
2175      * \param thePointId id of the point.
2176      */
2177     void setPointId(in long thePointId);
2178
2179     /*!
2180      * Sets id of the component for which the evolution will be generated.
2181      * \param thePointId id of the component.
2182      */
2183     void setComponentId(in long theComponentId);
2184
2185     /*!
2186      * Shows the evolution.
2187      */
2188     boolean showEvolution();
2189
2190     /*!
2191      * Restores the evolution from study.
2192      * \param theSObj the study object from which the evolution should be restored.
2193      */
2194     void restoreFromStudy(in SALOMEDS::SObject theSObj);
2195   };
2196
2197
2198   /*! \brief Interface %Result
2199    *
2200    * This interface serves for inner representation of data generated
2201    * in other sources (MED object or file). This data is needed
2202    * for further construction of graphical presentations.
2203    */
2204   interface Result : RemovableObject, SALOME::GenericObj
2205   {
2206     /*! Reads all data from the corresponding sources. By default the data is loaded on demand.
2207      */
2208     boolean BuildAll();
2209
2210     /*! Start to parse the source MED file and publish all its entities into the study*/
2211     boolean Build(in boolean theIsBuildAll, in boolean theIsAtOnce);
2212
2213     /*! Allow to check is all requested MED entites already loaded or not */
2214     boolean IsDone();
2215
2216     /*! Allow to check is corresponding MED entites already loaded or not */
2217     boolean IsEntitiesDone();
2218
2219     /*! Choose to parse MED fields and perform global min / max on the MED timestamps.*/
2220     void SetBuildFields(in boolean theIsBuildFields, in boolean theIsCalculateMinMax);
2221
2222     /*! Allow to check is corresponding MED fields already loaded or not */
2223     boolean IsFieldsDone();
2224
2225     /*! Choose to parse MED groups.*/
2226     void SetBuildGroups(in boolean theIsBuildGroups);
2227
2228     /*! Allow to check is corresponding MED groups and families already loaded or not */
2229     boolean IsGroupsDone();
2230
2231     /*! Allow to check is min / max calculation over field's components already perfrormed or not */
2232     boolean IsMinMaxDone();
2233
2234     /*! Allow to check is corresponding multi resolution structure already loaded or not */
2235     boolean IsPartsDone();
2236
2237     typedef sequence<Entity> Entities;
2238
2239     typedef string EntityName;
2240
2241     typedef sequence<EntityName> EntityNames;
2242
2243     typedef long TimeStampNumber;
2244
2245     typedef sequence<TimeStampNumber> TimeStampNumbers;
2246
2247     enum Resolution {
2248       FULL,
2249       MEDIUM,
2250       LOW,
2251       HIDDEN
2252     };
2253
2254     typedef sequence<Resolution> Resolutions;
2255
2256     /*! Gets existing mesh names */
2257     EntityNames GetMeshNames();
2258
2259     /*! Gets existing mesh entites for the given mesh name */
2260     Entities GetEntities(in EntityName theMeshName);
2261
2262     /*! Gets existing families for the given mesh name and entity */
2263     EntityNames GetFamilies(in EntityName theMeshName, in Entity theEntity);
2264
2265     /*! Gets existing families for the given mesh name */
2266     EntityNames GetGroups(in EntityName theMeshName);
2267
2268     /*! Gets existing fields for the given mesh name and entity */
2269     EntityNames GetFields(in EntityName theMeshName, in Entity theEntity);
2270
2271     /*! Gets number of components for the given mesh name, entity and name of field */
2272     long GetNumberOfComponents(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2273
2274     /*! Gets existing numbers of time stamps for the given mesh name, entity and name of field */
2275     TimeStampNumbers GetTimeStampNumbers(in EntityName theMeshName, in Entity theEntity,
2276                                          in EntityName theFieldName);
2277
2278     /*! Gets time values of time stamps for the given mesh name, entity and name of field */
2279     double_array GetTimeStampValues(in EntityName theMeshName, in Entity theEntity, in EntityName theFieldName);
2280
2281     /*! Gets existing parts of multi resolution structure for the given mesh name */
2282     EntityNames GetPartNames(in EntityName theMeshName);
2283
2284     /*! Gets available resolutions of multi resolution structure for the given mesh and part names */
2285     Resolutions GetResolutions(in EntityName theMeshName, in EntityName thePartName);
2286
2287     /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2288     Resolution GetResolution(in EntityName theMeshName, in EntityName thePartName);
2289
2290     /*! Gets current resolution of multi resolution structure for the given mesh and part names */
2291     void SetResolution(in EntityName theMeshName, in EntityName thePartName, in Resolution theResolution);
2292
2293     /*! Gets information about imported MED file */
2294     SALOME_MED::MedFileInfo GetMEDFileInfo();
2295
2296     /*! Export MED file from temp object.  */
2297     boolean ExportMED(in string theFileName);
2298   };
2299
2300   //-------------------------------------------------------
2301   interface ViewManager;
2302
2303   /*! \brief %VISU_Gen interface
2304    *
2305    * This is the main interface of %VISU component. It is necessary for creation of
2306    * post-processing presentations from given %Result and %Table object reference,
2307    * using the views provided by %ViewManager.
2308    */
2309   interface VISU_Gen : Engines::EngineComponent, SALOMEDS::Driver, Base
2310   {
2311     /*! Sets a definite study to be current.
2312      */
2313     void SetCurrentStudy(in SALOMEDS::Study theStudy);
2314
2315     /*! Gets the current study.
2316      */
2317     SALOMEDS::Study GetCurrentStudy();
2318
2319     /*!
2320      * Gets the %View Manager which is used for creation of
2321      * post-processing presentations.
2322      */
2323     ViewManager GetViewManager();
2324
2325     /*!
2326      * Imports tables from a file and create TableAttribute in Study
2327      */
2328     SALOMEDS::SObject ImportTables(in string theFileName,
2329                                    in boolean theFirstStrAsTitle);
2330
2331     /*!
2332      * Export table to a file
2333      */
2334     boolean ExportTableToFile(in SALOMEDS::SObject theTable, in string theFileName);
2335
2336     /*!
2337      * Imports data from a file. The access to this file will be conserved outside of the application.
2338      * \param theFileName String parameter defining the name of the file
2339      *                    from which the data will be imported.
2340      */
2341     Result ImportFile(in string theFileName);
2342
2343     /*!
2344      * Create result and initialize its with the file. The access to this file will be conserved outside of the application.
2345      * \param theFileName String parameter defining the name of the file
2346      *                    from which the data will be imported.
2347      */
2348     Result CreateResult(in string theFileName);
2349
2350     /*!
2351      * Imports data from a file. The access to this file will closed.
2352      * \param theFileName String parameter defining the name of the file
2353      *                    from which the data will be imported.
2354      */
2355     Result CopyAndImportFile(in string theFileName);
2356
2357     /*!
2358      * Imports data from a %MED object.
2359      */
2360     Result ImportMed(in SALOMEDS::SObject theMedSObject);
2361
2362     /*!
2363      * Imports data from a %MED field.
2364      */
2365     Result ImportMedField(in SALOME_MED::FIELD theField);
2366
2367     /*!
2368      * Rename a study object, representing a mesh, specified by given values.
2369      * \param theResult   Data generated in other sources (MED object or file).
2370      * \param theMeshName One of the meshes presented in MED file.
2371      * \param theEntity   Type of entity where the field is defined.
2372      * \param theSubMeshName Name of sub-mesh (group or family).
2373      * \param theNewName  Name to be given to the study object.
2374      */
2375     void RenameEntityInStudy(in Result theResult,
2376                              in string theMeshName,
2377                              in Entity theEntity,
2378                              in string theNewName);
2379     void RenameFamilyInStudy(in Result theResult,
2380                              in string theMeshName,
2381                              in Entity theEntity,
2382                              in string theSubMeshName,
2383                              in string theNewName);
2384     void RenameGroupInStudy(in Result theResult,
2385                             in string theMeshName,
2386                             in string theSubMeshName,
2387                             in string theNewName);
2388
2389     /*!
2390      * Creates a mesh on the basis of the data generated in other sources (MED object or file).
2391      * \param theResult   Data generated in other sources. (MED object or file)
2392      * \param theMeshName  One of the meshes presented in MED file
2393      * \param theEntity Type of entity where the field is defined
2394      */
2395     Mesh MeshOnEntity(in Result theResult, in string theMeshName, in Entity theEntity);
2396
2397     /*!
2398      * Creates on the basis of a family a mesh  which will be composed of geometrical
2399      * elements, corresponding to the type of cells (node, edge, face or cell) of this family.
2400      * \param theResult   Data generated in other sources. (MED object or file)
2401      * \param theMeshName  One of the meshes presented in MED file
2402      * \param theEntity Type of entity where the field is defined.
2403      */
2404     Mesh FamilyMeshOnEntity(in Result theResult, in string theMeshName,
2405                             in Entity theEntity, in string theFamilyName);
2406
2407     /*!
2408      * Creates a mesh on the basis of a group of families.
2409      * \param theResult   Data generated in other sources. (MED object or file)
2410      * \param theMeshName  One of the meshes presented in MED file
2411      * \param theGroupName Name of the group.
2412      */
2413     Mesh GroupMesh(in Result theResult, in string theMeshName, in string theGroupName);
2414
2415     /*!
2416      * Creates a scalar map presentation.
2417      * \param theResult    Data generated in other sources. (MED object or file)
2418      * \param theMeshName  One of the meshes presented in MED file
2419      * \param theEntity    Type of entity where the field is defined
2420      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2421      * \param theTimeStampNumber Number of iteration on the field
2422      */
2423     ScalarMap ScalarMapOnField(in Result theResult, in string theMeshName,
2424                                in Entity theEntity, in string theFieldName,
2425                                in long theTimeStampNumber);
2426
2427     /*!
2428      * Creates a Gauss Points presentation.
2429      * \param theResult    Data generated in other sources. (MED object or file)
2430      * \param theMeshName  One of the meshes presented in MED file
2431      * \param theEntity    Type of entity where the field is defined
2432      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2433      * \param theTimeStampNumber Number of iteration on the field
2434      */
2435     GaussPoints GaussPointsOnField(in Result theResult, in string theMeshName,
2436                                    in Entity theEntity, in string theFieldName,
2437                                    in long theTimeStampNumber);
2438
2439     /*!
2440      * Creates a deformed shape presentation.
2441      * \param theResult    Data generated in other sources. (MED object or file)
2442      * \param theMeshName  One of the meshes presented in MED file
2443      * \param theEntity    Type of entity where the field is defined
2444      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2445      * \param theTimeStampNumber Number of iteration on the field
2446      */
2447     DeformedShape DeformedShapeOnField(in Result theResult, in string theMeshName,
2448                                        in Entity theEntity, in string theFieldName,
2449                                        in long theTimeStampNumber);
2450
2451     /*!
2452      * Creates a deformed shape presentation. This function is obsolete. Use DeformedShapeAndScalarMapOnField instead.
2453      * \param theResult    Data generated in other sources. (MED object or file)
2454      * \param theMeshName  One of the meshes presented in MED file
2455      * \param theEntity    Type of entity where the field is defined
2456      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2457      * \param theTimeStampNumber Number of iteration on the field
2458      */
2459     DeformedShapeAndScalarMap ScalarMapOnDeformedShapeOnField(in Result theResult, in string theMeshName,
2460                                                               in Entity theEntity, in string theFieldName,
2461                                                               in long theTimeStampNumber);
2462
2463     /*!
2464      * Creates a deformed shape presentation.
2465      * \param theResult    Data generated in other sources. (MED object or file)
2466      * \param theMeshName  One of the meshes presented in MED file
2467      * \param theEntity    Type of entity where the field is defined
2468      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2469      * \param theTimeStampNumber Number of iteration on the field
2470      */
2471     DeformedShapeAndScalarMap DeformedShapeAndScalarMapOnField(in Result theResult, in string theMeshName,
2472                                                                in Entity theEntity, in string theFieldName,
2473                                                                in long theTimeStampNumber);
2474
2475     /*!
2476      * Creates a vector presentation.
2477      * \param theResult    Data generated in other sources. (MED object or file)
2478      * \param theMeshName  One of the meshes presented in MED file
2479      * \param theEntity    Type of entity where the field is defined
2480      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2481      * \param theTimeStampNumber Number of iteration on the field
2482      */
2483     Vectors VectorsOnField(in Result theResult, in string theMeshName,
2484                            in Entity theEntity, in string theFieldName,
2485                            in long theTimeStampNumber);
2486
2487     /*!
2488      * Creates an iso surface presentation.
2489      * \param theResult    Data generated in other sources. (MED object or file)
2490      * \param theMeshName  One of the meshes presented in MED file
2491      * \param theEntity    Type of entity where the field is defined
2492      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2493      * \param theTimeStampNumber Number of iteration on the field
2494      */
2495     IsoSurfaces IsoSurfacesOnField(in Result theResult, in string theMeshName,
2496                                    in Entity theEntity, in string theFieldName,
2497                                    in long theTimeStampNumber);
2498
2499     /*!
2500      * Creates an stream lines presentation.
2501      * \param theResult    Data generated in other sources. (MED object or file)
2502      * \param theMeshName  One of the meshes presented in MED file
2503      * \param theEntity    Type of entity where the field is defined
2504      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2505      * \param theTimeStampNumber Number of iteration on the field
2506      */
2507     StreamLines StreamLinesOnField(in Result theResult, in string theMeshName,
2508                                    in Entity theEntity, in string theFieldName,
2509                                    in long theTimeStampNumber);
2510
2511     /*!
2512      * Creates a presentation of cut planes.
2513      * \param theResult    Data generated in other sources. (MED object or file)
2514      * \param theMeshName  One of the meshes presented in MED file
2515      * \param theEntity    Type of entity where the field is defined
2516      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2517      * \param theTimeStampNumber Number of iteration on the field
2518      */
2519     CutPlanes CutPlanesOnField(in Result theResult, in string theMeshName,
2520                                in Entity theEntity, in string theFieldName,
2521                                in long theTimeStampNumber);
2522
2523     /*!
2524      * Creates a presentation of cut lines.
2525      * \param theResult    Data generated in other sources. (MED object or file)
2526      * \param theMeshName  One of the meshes presented in MED file
2527      * \param theEntity    Type of entity where the field is defined
2528      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2529      * \param theTimeStampNumber Number of iteration on the field
2530      */
2531     CutLines CutLinesOnField(in Result theResult, in string theMeshName,
2532                              in Entity theEntity, in string theFieldName,
2533                              in long theTimeStampNumber);
2534
2535     /*!
2536      * Creates a presentation of cut segment.
2537      * \param theResult    Data generated in other sources. (MED object or file)
2538      * \param theMeshName  One of the meshes presented in MED file
2539      * \param theEntity    Type of entity where the field is defined
2540      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2541      * \param theTimeStampNumber Number of iteration on the field
2542      */
2543     CutSegment CutSegmentOnField(in Result theResult, in string theMeshName,
2544                                  in Entity theEntity, in string theFieldName,
2545                                  in long theTimeStampNumber);
2546
2547     /*!
2548      * Creates a Plot3D presentation.
2549      * \param theResult    Data generated in other sources. (MED object or file)
2550      * \param theMeshName  One of the meshes presented in MED file
2551      * \param theEntity    Type of entity where the field is defined
2552      * \param theFieldName Group of data attributed to the %MESH. The data can be scalar or vector.
2553      * \param theTimeStampNumber Number of iteration on the field
2554      */
2555     Plot3D Plot3DOnField(in Result theResult, in string theMeshName,
2556                          in Entity theEntity, in string theFieldName,
2557                          in long theTimeStampNumber);
2558
2559     /*!
2560      * Creates a table presentation.
2561      * \param theTableEntry The entry of the table which will be displayed.
2562      */
2563     Table CreateTable(in string theTableEntry);
2564
2565     /*!
2566      * Creates a curve on the basis of points, whose values are taken from the table.
2567      * \param theTable  Table containing the data for construction of curves.
2568      * \param theHRow   Index of the row in the table: abscissa of the point.
2569      * \param theVRow   Index of the row in the table: ordinate of the point.
2570      */
2571     Curve CreateCurve(in Table theTable, in long theHRow, in long theVRow);
2572
2573     /*!
2574      * Creates a curve on the basis of points, whose values are taken from the table.
2575      * Each point has also assigned value, that will be shown as tooltip in Plot2d
2576      * \param theTable  Table containing the data for construction of curves.
2577      * \param theHRow   Index of the row in the table: abscissa of the point.
2578      * \param theVRow   Index of the row in the table: ordinate of the point.
2579      * \param theZRow   Index of the row in the table: assigned value (so-called as Z).
2580      */
2581     Curve CreateCurveWithZ( in Table theTable, in long theHRow, in long theVRow, in long theZRow );
2582
2583     /*!
2584      * Creates a curve on the basis of points, whose values are taken from the table.
2585      * Each point has also assigned value, that will be shown as tooltip in Plot2d.
2586      * The curve can be displayed using right axis of Plot2d view.
2587      * \param theTable  Table containing the data for construction of curves.
2588      * \param theHRow   Index of the row in the table: abscissa of the point.
2589      * \param theVRow   Index of the row in the table: ordinate of the point.
2590      * \param theZRow   Index of the row in the table: assigned value (so-called as Z).
2591      * \param theIsV2   Flag allowed to display the curve using right axis of Plot2d view.
2592      */
2593     Curve CreateCurveWithZExt( in Table theTable, in long theHRow, in long theVRow, in long theZRow,
2594                                in boolean theIsV2 );
2595
2596     /*!
2597      * Creates a presentation form containing an array of references to the curves.
2598      */
2599     Container CreateContainer();
2600
2601     /*! Creates an animation in the 3D view.
2602      * \param theView3d The 3D view, where the animation will be rendered.
2603      */
2604     Animation CreateAnimation(in View3D theView3d);
2605
2606     /*! Creates an evolution in the XY plot.
2607      * \param theXYPlot The XY plot, where the evolution will be rendered.
2608      */
2609     Evolution CreateEvolution(in XYPlot theXYPlot);
2610
2611     void DeleteResult(in Result theResult);
2612
2613     void DeletePrs3d(in Prs3d thePrs3d);
2614
2615     /*!
2616      * Get or create %ColoredPrs3dCache object.
2617      */
2618     ColoredPrs3dCache GetColoredPrs3dCache(in SALOMEDS::Study theStudy);
2619
2620
2621     /* Clipping planes management */
2622
2623     /*Create a clipping plane and return its ID (position in corresponded array)
2624       Id of clipping plane could be changed after deletion of other clipping plane
2625     */
2626     long CreateClippingPlane(in double X, in double Y, in double Z,
2627                              in double dX, in double dY, in double dZ,
2628                              in boolean auto, in string name);
2629
2630     void EditClippingPlane(in long id, in double X, in double Y, in double Z,
2631                              in double dX, in double dY, in double dZ,
2632                              in boolean auto, in string name);
2633
2634     /* Returns clipping plane by its Id */
2635     ClippingPlane GetClippingPlane(in long id);
2636
2637     /* Deletes clipping plane by its Id */
2638     boolean DeleteClippingPlane(in long id);
2639
2640     /* Applyes a clipping plane with Id to presentation thePrs */
2641     boolean ApplyClippingPlane(in Prs3d thePrs, in long id);
2642
2643     /* Detaches a clipping plane with Id from presentation thePrs */
2644     boolean DetachClippingPlane(in Prs3d thePrs, in long id);
2645
2646
2647     /* Get number of clipping planes */
2648     long GetClippingPlanesNb();
2649
2650     /*! Converts set of VTK files to the one MED-file
2651      * \param theVTKFiles sequence of VTK files
2652      * \param out MED-file
2653      * \param theMeshName mesh name. This parameter can be empty. In this case name
2654               of mesh is equal vtk2med
2655      * \param theTSNames values of time stamps. This array can be empty, in
2656               this case values of time stamps will be generated automatically ( 0, 1, 2 ... )
2657      * \return TRUE if operation has been completed successfully, FALSE otherwise
2658      */
2659     boolean VTK2MED( in string_array theVTKFiles,
2660                      in string theMEDFile,
2661                      in string theMeshName,
2662                      in double_array theTStamps );
2663
2664     /*!
2665      * Load texture from file
2666      * \param theTextureFile texture file name
2667      * \return unique texture identifier
2668      */
2669     long LoadTexture(in string theTextureFile);
2670   };
2671
2672   /*! \brief %View interface
2673    *
2674    * Contains a set of methods used by the %View frame, which can be one of
2675    * the following types: 3d, Table, XY plot.
2676    * %View interface is a base for all types of %view interfaces.
2677    */
2678   interface View: Base, SALOME::GenericObj
2679   {
2680     /*! \brief %ViewRepresentation enumeration
2681      *
2682      * displaying part ("ALL" isn't setable)
2683      */
2684     enum ViewRepresentation {
2685       OBJECTBROWSER,
2686       VIEWER,
2687       PYTHON,
2688       MESSAGES
2689     };
2690
2691     void ShowPart (in ViewRepresentation ViewRepr, in boolean state );
2692
2693     boolean IsPartShown( in ViewRepresentation ViewRepr );
2694
2695     /*!
2696      *  New methods for view parameters management.
2697      */
2698
2699     /*! \brief Split workarea of this view.
2700      *
2701      *  Horizontally split workarea of this view.
2702      *  This view is moved in a new right area.
2703      */
2704     void SplitRight();
2705
2706     /*! \brief Split workarea of this view.
2707      *
2708      *  Horizontally split workarea of this view.
2709      *  This view stays in an old left area, others are moved in a new right area.
2710      */
2711     void SplitLeft();
2712
2713     /*! \brief Split workarea of this view.
2714      *
2715      *  Vertically split workarea of this view.
2716      *  This view is moved in a new bottom area.
2717      */
2718     void SplitBottom();
2719
2720     /*! \brief Split workarea of this view.
2721      *
2722      *  Vertically split workarea of this view.
2723      *  This view stays in an old top area, others are moved in a new bottom area.
2724      */
2725     void SplitTop();
2726
2727     /*!
2728      *  Put this view window on top of its work area.
2729      */
2730     void OnTop();
2731
2732     /*!
2733      *  Put \a theView in workarea of this view right after it.
2734      *  If \a theView was alone in its workarea, workarea of \a theView will be destroyed.
2735      *  If \a theView was in the same workarea with this view, simple reordering will take place.
2736      *  \param theView A view window to be attracted to this one.
2737      */
2738     void Attract (in View theView);
2739
2740     /*!
2741      *  Put all the view windows from workarea of \a theView in workarea of this view right after it.
2742      *  Workarea of \a theView will be destroyed.
2743      *  If \a theView was in the same workarea with this view, simple reordering will take place.
2744      *  \param theView A view window to be attracted to this one together with all its workarea.
2745      */
2746     void AttractAll (in View theView);
2747
2748     /*!
2749      *  Set position of this view window relatively its splitter.
2750      *  \param thePosition Desired position of this view window relatively
2751      *         its splitter. Meaningfull values lays in range [0..1].
2752      *
2753      *  Direction of positioning is defined by the splitter orientation.
2754      */
2755     void SetRelativePositionInSplitter (in double thePosition);
2756
2757     /*!
2758      *  Set size of this view window relatively its splitter.
2759      *  \param theSize Desired size of this view window relatively
2760      *         its splitter. Meaningfull values lays in range [0..1].
2761      *
2762      *  Direction of resizing is defined by the splitter orientation.
2763      */
2764     void SetRelativeSizeInSplitter (in double theSize);
2765
2766     /*!
2767      *  Set horizontal position of this view window relatively its workstack.
2768      *  \param thePosition Desired horizontal position of this view window
2769      *         relatively its workstack. Meaningfull values lays in range [0..1].
2770      */
2771     void SetRelativePositionX (in double thePosition);
2772
2773     /*!
2774      *  Set vertical position of this view window relatively its workstack.
2775      *  \param thePosition Desired vertical position of this view window
2776      *         relatively its workstack. Meaningfull values lays in range [0..1].
2777      */
2778     void SetRelativePositionY (in double thePosition);
2779
2780     /*!
2781      *  Set horizontal size of this view window relatively its workstack.
2782      *  \param theSize Desired horizontal size of this view window relatively
2783      *         its workstack. Meaningfull values lays in range [0..1].
2784      */
2785     void SetRelativeSizeX (in double theSize);
2786
2787     /*!
2788      *  Set vertical size of this view window relatively its workstack.
2789      *  \param theSize Desired vertical size of this view window relatively
2790      *         its workstack. Meaningfull values lays in range [0..1].
2791      */
2792     void SetRelativeSizeY (in double theSize);
2793
2794     /*!
2795      *  Old methods for view parameters management, they don't work now
2796      */
2797     void SetViewWidth (in long Width); //setting width of view
2798     void SetViewHeight (in long Height); //setting height of view
2799     long GetViewWidth(); //getting view width
2800     long GetViewHeight(); //getting view height
2801     enum ViewPosition {TOP, CENTER, BOTTOM, RIGHT, LEFT}; //position of the study frame
2802     void SetViewPositionHorizontal (in ViewPosition ViewPosHor); //setting of the horizontal view position
2803     void SetViewPositionVertical (in ViewPosition ViewPosVer); //setting of the vertical view position
2804     void SetRelativePosition( in double x, in double y );
2805     void SetRelativeSize( in double x, in double y );
2806     void Minimize(); // Minimizes to the task bar or to the bottom of the Desktop the %View frame.
2807     void Restore(); // Restores the %View frame.
2808     void Maximize(); // Maximizes the %View frame.
2809
2810     /*!
2811      * Sets the title of the %View frame.
2812      * \param theTitle String parameter defining the title of the %View frame.
2813      */
2814     void SetTitle(in string theTitle);
2815
2816     /*!
2817      * Gets the title of the %View frame.
2818      */
2819     string GetTitle();
2820
2821     /*!
2822      * Sets background color of the %View frame.
2823      * \param theColor Background color defined in <VAR>SALOMEDS::Color</VAR> enumeration.
2824      */
2825     void SetBackground(in SALOMEDS::Color theColor);
2826
2827     /*!
2828      * Gets background color of the %View frame.
2829      */
2830     SALOMEDS::Color GetBackground();
2831
2832     /*!
2833      * Removes all presentations (presentable objects) from the %view.
2834      */
2835     void EraseAll();
2836
2837     /*!
2838      * Displays all presentations (presentable objects) in the %view.
2839      */
2840     void DisplayAll();
2841
2842     /*!
2843      * Removes a definite presentation (presentable object) from the %view.
2844      * \param thePrsObj The presentation (presentable object) which should be deleted.
2845      */
2846     void Erase(in PrsObject thePrsObj);
2847
2848     /*!
2849      * Displays a definite presentation (presentable object) in the %view.
2850      * \param thePrsObj The presentation (presentable object) which should be displayed.
2851      */
2852     void Display(in PrsObject thePrsObj);
2853
2854     /*!
2855      * Allows to display only a definite presentation (presentable object) in the %view.
2856      * All other presentations are removed from the %view.
2857      * \param thePrsObj The presentation (presentable object) which should be displayed.
2858      */
2859     void DisplayOnly(in PrsObject thePrsObj);
2860
2861     /*!
2862      * Updates the view.
2863      */
2864     void Update();
2865
2866     /*!
2867      * Saves the view.
2868      * \param theFileName The name of the file where the view will be saved.
2869      * \return True, if the view have been saved successfully.
2870      */
2871     boolean SavePicture(in string theFileName);
2872   };
2873
2874   //-------------------------------------------------------
2875   /*! \brief 3D view interface
2876    *
2877    *  This interface contains a set of methods necessary for representation of objects in 3D space.
2878    */
2879   interface View3D : View {
2880     /*!
2881      * This enumeration contains a set of elements determining a predefined point of view
2882      *  (position of the camera in 3D space relative to the presentable object).
2883      */
2884     enum ViewType{ FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM};
2885
2886     /*!
2887      * This enumeration contains a set of elements determining the axis
2888      */
2889     enum Axis{ XAxis, YAxis, ZAxis};
2890
2891     /*!
2892      * Data type defining coordinates in 3D space.
2893      */
2894     typedef double XYZ[3];
2895
2896     /*!
2897      * Makes all presentations, which are currently present in the %view, completely visible.
2898      */
2899     void FitAll();
2900
2901     /*!
2902      * Sets a predefined point of view (FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM). (In other words it means
2903      * a predefined position of the camera in 3D space with respect to the object which is represented.)
2904      */
2905     void SetView(in ViewType theType);
2906
2907     /*!
2908      * Sets the position of the camera in 3D space.
2909      * This point is used as the first point of the vector
2910      * defining the view direction of the camera.
2911      */
2912     void SetPointOfView(in XYZ theCoord);
2913
2914     /*!
2915      * Gets the position of the camera in 3D space.
2916      * This point is used as the first point of the vector
2917      * defining the view direction of the camera.
2918      */
2919     XYZ GetPointOfView();
2920
2921     /*!
2922      * Sets the vertical line of the camera in 3D space.
2923      */
2924     void SetViewUp(in XYZ theDir);
2925
2926     /*!
2927      * Gets the vertical line of the camera in 3D space.
2928      */
2929     XYZ GetViewUp();
2930
2931     /*!
2932      * Sets the point of sight of the camera. This point is used as the
2933      * second point of the vector defining the view direction of the camera.
2934      */
2935     void SetFocalPoint(in XYZ theDir);
2936
2937     /*!
2938      * Gets the point of sight of the camera. This point is used as the
2939      * second point of the vector defining the view direction of the camera.
2940      */
2941     XYZ GetFocalPoint();
2942
2943     /*!
2944      * Zooming of the presentable object. Sets the scale.
2945      */
2946     void SetParallelScale(in double theScale);
2947
2948     /*!
2949      * Zooming of the presentable object. Gets the scale.
2950      */
2951     double GetParallelScale();
2952
2953     /*!
2954      * Scaling of the view along a definite axis.
2955      * \param theAxis The axis of the scaling
2956      * \param theParam The coefficient of the scaling
2957      */
2958     void ScaleView(in Axis theAxis, in double theParam);
2959
2960     /*!
2961      * Removes the scaling of the view.
2962      */
2963     void RemoveScale();
2964
2965     /*!
2966      * Saves view parameters.
2967      * \return True if the view parameters have been created, False if the parameters have been modified.
2968      * \param theName The name under which the view parameters will be saved.
2969      */
2970     boolean SaveViewParams(in string theName);
2971
2972     /*! Restores view parameters.
2973      * \return True if the view parameters have been found and applied to the view,
2974      * False if the parameters with this name don't exist.
2975      * \param theName The name of the view parameters which will be restored.
2976      */
2977     boolean RestoreViewParams(in string theName);
2978
2979
2980     /*! Get representation type of the given presentation in this view.
2981      *  \param thePrs Object to get a representation type of.
2982      *  \return <VAR>PresentationType</VAR> Representation type of object in this view.
2983      */
2984     PresentationType GetPresentationType(in ScalarMap thePrs);
2985
2986     /*! Set representation type of the given presentation in this view.
2987      *  \param thePrs Object to set a representation type of.
2988      *  \param thePrsType Representation type to be set to the given object.
2989      *  \return Empty string in case of success, error description in case of failure.
2990      */
2991     string SetPresentationType(in ScalarMap thePrs, in PresentationType thePrsType);
2992
2993
2994     /*! Set representation type of 2D quadratic elements
2995      *  of the given presentation in this view.
2996      *  \param thePrs Object to set a representation type of 2D quadratic elements.
2997      *  \param theType Representation type of 2D quadratic elements to be set to the given object.
2998      *  \return Empty string in case of success, error description in case of failure.
2999      */
3000     string SetQuadratic2DPresentationType(in ScalarMap thePrs,in Quadratic2DPresentationType theType);
3001
3002
3003     /*! Get representation type of the 2D quadratic mesh elements of given presentation in this view.
3004      *  \param thePrs Object to get a representation type of 2D quadratic mesh elements.
3005      *  \return <VAR>Quadratic2DPresentationType</VAR> Representation type of 2D quadratic mesh elements
3006      *          in this view.
3007      */
3008     Quadratic2DPresentationType GetQuadratic2DPresentationType(in ScalarMap thePrs);
3009
3010
3011     /*! Get shrink state of the given presentation in this view.
3012      *  \param thePrs Object to get a shrink state of.
3013      *  \return TRUE if \a thePrs is shrinked in this view, FALSE overwise.
3014      */
3015     boolean IsShrinked(in ScalarMap thePrs);
3016
3017     /*! Make the given presentation shrinked or not shrinked in this view.
3018      *  \param thePrs Object to change a shrink state of.
3019      *  \param isShrinked Pass TRUE to make \a thePrs shrinked, FALSE overwise.
3020      *  \return Empty string in case of success, error description in case of failure.
3021      */
3022     string SetShrinked(in ScalarMap thePrs, in boolean isShrinked);
3023
3024     /*! Get shading state of the given presentation in this view.
3025      *  \param thePrs Object to get a shading state of.
3026      *  \return TRUE if \a thePrs is shaded in this view, FALSE overwise.
3027      */
3028     boolean IsShaded(in ScalarMap thePrs);
3029
3030     /*! Make the given presentation shaded or not shaded in this view.
3031      *  \param thePrs Object to set a shading state of.
3032      *  \param isShaded Pass TRUE to make \a thePrs shaded, FALSE overwise.
3033      *  \return Empty string in case of success, error description in case of failure.
3034      */
3035     string SetShaded(in ScalarMap thePrs, in boolean isShaded);
3036
3037     /*! Get opacity of the given presentation in this view.
3038      *  \param thePrs Object to get an opacity of.
3039      *  \return Opacity value in range [0, 1], 0 - transparent, 1 - opaque.
3040      */
3041     double GetOpacity(in ScalarMap thePrs);
3042
3043     /*! Set opacity of the given presentation in this view.
3044      *  \param thePrs Object to set an opacity of.
3045      *  \param theOpacity Opacity value [0, 1]. 0 - transparent, 1 - opaque.
3046      *  \return Empty string in case of success, error description in case of failure.
3047      */
3048     string SetOpacity(in ScalarMap thePrs, in double theOpacity);
3049
3050     /*! Get line width of the given presentation in this view.
3051      *  \param thePrs Object to get a line width of.
3052      *  \return Line width of \a thePrs in this view.
3053      */
3054     double GetLineWidth(in ScalarMap thePrs);
3055
3056     /*! Set line width of the given presentation in this view.
3057      *  \param thePrs Object to set a line width of.
3058      *  \param theLineWidth Line width value. Recommended values are in range [1, 10].
3059      *  \return Empty string in case of success, error description in case of failure.
3060      */
3061     string SetLineWidth(in ScalarMap thePrs, in double theLineWidth);
3062   };
3063
3064   //-------------------------------------------------------
3065   /*! \brief Interface of the Table view
3066    *
3067    * This interface is used for creation of a view necessary for presentation of a table.
3068    */
3069   interface TableView : View {
3070   };
3071
3072   //-------------------------------------------------------
3073   /*! \brief Interface of the 2D plot view
3074    *
3075    * This interface is used for creation of a view necessary for presentation
3076    * of a XY plot generated on the basis of one or several curve lines.
3077    */
3078   interface XYPlot : View {
3079     /*! Sets the title of the XY plot
3080      * \param theTitle  The title of the XY plot
3081      */
3082     void SetSubTitle(in string theTitle);
3083
3084     /*! Gets the title of the XY plot
3085      */
3086     string GetSubTitle();
3087
3088     /*!
3089      * This enumeration contains a set of elements determining the type
3090      * of the curve lines, which will be displayed in your XY plot.
3091      */
3092     enum CurveType { POINTS, MULTYLINE, SPLINE};
3093
3094     /*! Sets the type of the curve lines.
3095      * \param theType The type of the curve lines taken from <VAR>CurveType</VAR> enumeration.
3096      */
3097     void SetCurveType(in CurveType theType);
3098
3099     /*! Gets the type of the curve lines.
3100      */
3101     CurveType GetCurveType();
3102
3103     /*! Sets the size of the markers (data points) with help of
3104      * which the curve is constructed on the graphics.
3105      * \param theSize Long value defining the size of the markers.
3106      */
3107     void SetMarkerSize(in long theSize);
3108
3109     /*! Gets the size of the markers (data points) with help of
3110      * which the curve is constructed on the graphics.
3111      */
3112     long GetMarkerSize();
3113
3114     /*! Enable/disables X-axis grid of the 2D plot.
3115      */
3116     void EnableXGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
3117
3118     /*! Enable/disables Y-axis grid of the 2D plot.
3119      */
3120     void EnableYGrid(in boolean theMajor, in long theNumMajor, in boolean theMinor, in long theNumMinor);
3121
3122     /*! Sets horizontal scaling of the 2D plot.
3123      * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
3124      */
3125     void SetHorScaling(in Scaling theScaling);
3126
3127     /*! Gets the type horizontal scaling of the 2D plot.
3128      */
3129     Scaling GetHorScaling();
3130
3131     /*! Sets vertical scaling of the 2D plot.
3132      * \param theScaling Type of scaling taken from <VAR>Scaling</VAR> enumeration.
3133      */
3134     void SetVerScaling(in Scaling theScaling);
3135
3136     /*! Gets the type vertical scaling of the 2D plot.
3137      */
3138     Scaling GetVerScaling();
3139
3140     /*! Sets the title of the X-axis of the plot.
3141      * \param theTitle String value defining the title of the X-axis of the plot.
3142      */
3143     void SetXTitle(in string theTitle);
3144
3145     /*! Gets the title of the X-axis of the plot.
3146      */
3147     string GetXTitle();
3148
3149     /*! Sets the title of the Y-axis of the plot.
3150      * \param theTitle String value defining the title of the X-axis of the plot.
3151      */
3152     void SetYTitle(in string theTitle);
3153
3154     /*! Gets the title of the Y-axis of the plot.
3155      */
3156     string GetYTitle();
3157
3158     /*! Shows/hides the legend (description) of the 2D plot.
3159      */
3160     void ShowLegend(in boolean theShowing);
3161
3162     /*! Shrinks and enlarges the 2D plot to fit the 2D viewer.
3163      */
3164     void FitAll();
3165
3166     /*! Set range of the 2D plot to X axis of the 2D viewer.
3167      */
3168     void FitXRange(in double xMin, in double xMax);
3169
3170     /*! Set range of the 2D plot to Y axis of the 2D viewer.
3171      */
3172     void FitYRange(in double yMin, in double yMax);
3173
3174     /*! Set range of the 2D plot to XY axis of the 2D viewer.
3175      */
3176     void FitRange(in double xMin, in double xMax,
3177                   in double yMin, in double yMax);
3178
3179     void GetFitRanges(out double xMin,out double xMax,
3180                       out double yMin,out double yMax);
3181   };
3182
3183   //-------------------------------------------------------
3184   /*! \brief Interface of the %ViewManager
3185    *
3186    * The ViewManager is necessary for work with view windows (creation and deletion).
3187    */
3188   interface ViewManager: Base {
3189     /*! \brief Getting an active %View Frame
3190      *
3191      * Returns an object reference to the active %View Frame.
3192      * Type of the %View must be checked.
3193      * \note <BR>Returns nil if there are no views currently opened.
3194      */
3195     View GetCurrentView();
3196
3197     /*! \brief Creation of a 3d %View.
3198      *
3199      * Returns an object reference to the newly created 3D %View.
3200      */
3201     View3D Create3DView();
3202
3203     /*! \brief Creation of a Table %View.
3204      *
3205      * Returns an object reference to the newly created Table %View.
3206      */
3207     TableView CreateTableView(in Table theTable);
3208
3209     /*! \brief Creation of a 2D plot %View.
3210      *
3211      * Returns an object reference to the newly created 2D plot %View.
3212      */
3213     XYPlot CreateXYPlot();
3214
3215     /*! Deletes a definite view.
3216      * \param theView The view which should be deleted.
3217      */
3218     void Destroy(in View theView);
3219   };
3220
3221
3222 };
3223
3224 #endif