Salome HOME
Merge from V6_main 01/04/2013
[modules/visu.git] / src / VISU_I / VISU_View_i.hh
index 76b44da55bc089c5f24c561ea4994f2a1e2bdbe4..29155d18a5c23a4d9653a37a8cb06a26253a1a83 100644 (file)
@@ -1,37 +1,39 @@
-//  VISU OBJECT : interactive object for VISU entities implementation
-//
-//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
+//  VISU OBJECT : interactive object for VISU entities implementation
 //  File   : VISU_View_i.hh
 //  Author : Alexey PETROV
 //  Module : VISU
-
+//
 #ifndef VISU_View_i_HeaderFile
 #define VISU_View_i_HeaderFile
 
 #include "VISUConfig.hh"
+#include "SALOME_GenericObj_i.hh"
 
 class QWidget;
 
-class VisuGUI_TableDlg;
+class VISU_TableDlg;
 
 class SalomeApp_Application;
 
@@ -45,8 +47,9 @@ namespace VISU
   class Prs3d_i;
   class Curve_i;
 
-  class View_i : public virtual POA_VISU::View,
-                 public virtual Storable
+  class VISU_I_EXPORT View_i : public virtual POA_VISU::View,
+                              public virtual SALOME::GenericObj_i,
+                              public virtual Storable
   {
   public:
     View_i (SalomeApp_Application *theApplication,
@@ -124,8 +127,8 @@ namespace VISU
 
 
   //===========================================================================
-  class XYPlot_i : public virtual POA_VISU::XYPlot,
-                   public virtual View_i
+  class VISU_I_EXPORT XYPlot_i : public virtual POA_VISU::XYPlot,
+                                public virtual View_i
   {
   public:
     typedef VISU::XYPlot TInterface;
@@ -152,6 +155,11 @@ namespace VISU
     virtual void EnableYGrid (CORBA::Boolean theMajor, CORBA::Long theNumMajor,
                               CORBA::Boolean theMinor, CORBA::Long theNumMinor);
 
+    virtual void EnableYGrid (CORBA::Boolean theMajor, CORBA::Long theNumMajor,
+                              CORBA::Boolean theMinor, CORBA::Long theNumMinor,
+                             CORBA::Boolean the2Major, CORBA::Long the2NumMajor,
+                              CORBA::Boolean the2Minor, CORBA::Long the2NumMinor);
+                             
     virtual void SetHorScaling (VISU::Scaling theScaling);
     virtual VISU::Scaling GetHorScaling();
     virtual void SetVerScaling (VISU::Scaling theScaling);
@@ -172,13 +180,15 @@ namespace VISU
     virtual void Update();
 
     virtual void FitAll();
-    virtual void FitXRange(const CORBA::Double xMin,const CORBA::Double xMax);
-    virtual void FitYRange(const CORBA::Double yMin,const CORBA::Double yMax);
-    virtual void FitRange(const CORBA::Double xMin,const CORBA::Double xMax,
-                         const CORBA::Double yMin,const CORBA::Double yMax);
+    virtual void FitXRange(CORBA::Double xMin, CORBA::Double xMax);
+    virtual void FitYRange(CORBA::Double yMin, CORBA::Double yMax);
+    virtual void FitRange(CORBA::Double xMin, CORBA::Double xMax,
+                                     CORBA::Double yMin, CORBA::Double yMax);
     virtual void GetFitRanges(double& xMin, double& xMax, double& yMin, double& yMax);
 
     virtual void Close();
+
+    Plot2d_ViewFrame* GetView() { return myView; }
   protected:
     Plot2d_ViewFrame* myView;
   public:
@@ -187,7 +197,7 @@ namespace VISU
 
 
   //===========================================================================
-  class TableView_i : public virtual POA_VISU::TableView,
+  class VISU_I_EXPORT TableView_i : public virtual POA_VISU::TableView,
                       public virtual View_i
   {
   public:
@@ -203,15 +213,15 @@ namespace VISU
 
     virtual void Close();
   protected:
-    VisuGUI_TableDlg* myView;
+    VISU_TableDlg* myView;
   public:
     virtual Storable* Create (VISU::Table_ptr theTable);
   };
 
 
   //===========================================================================
-  class View3D_i : public virtual POA_VISU::View3D,
-                   public virtual View_i
+  class VISU_I_EXPORT View3D_i : public virtual POA_VISU::View3D,
+                                public virtual View_i
   {
   public:
     typedef VISU::View3D TInterface;
@@ -259,7 +269,7 @@ namespace VISU
     static  void SetFocalPoint (SUIT_ViewWindow* theViewWindow, const CORBA::Double theFocalPnt[3]);
     virtual void SetFocalPoint (const VISU::View3D::XYZ theCoord);
 
-    static  void View3D_i::GetFocalPoint (SUIT_ViewWindow* theViewWindow, CORBA::Double theFocalPnt[3]);
+    static  void GetFocalPoint (SUIT_ViewWindow* theViewWindow, CORBA::Double theFocalPnt[3]);
     virtual VISU::View3D::XYZ_slice* GetFocalPoint();
 
     static  void SetParallelScale (SUIT_ViewWindow* theViewWindow, CORBA::Double theScale);
@@ -278,12 +288,12 @@ namespace VISU
     static void ToStream (SUIT_ViewWindow* theViewWindow, std::ostringstream& theStr);
 
     static  bool           SaveViewParams (SUIT_ViewManager* theViewManager,
-                                           const char* theName);
-    virtual CORBA::Boolean SaveViewParams (const char* theName);
+                                           const std::string& theName);
+    virtual CORBA::Boolean SaveViewParams (const char* theViewParamsName);
 
     static  bool           RestoreViewParams (SUIT_ViewManager* theViewManager,
-                                              const char* theName);
-    virtual CORBA::Boolean RestoreViewParams (const char* theName);
+                                              const std::string& theName);
+    virtual CORBA::Boolean RestoreViewParams (const char* theViewParamsName);
 
     static QString GenerateViewParamsName();
 
@@ -292,6 +302,21 @@ namespace VISU
 
     virtual void Close();
 
+    // Certain presentation view parameters management
+    virtual PresentationType GetPresentationType(ScalarMap_ptr thePrs);
+    virtual CORBA::Boolean   IsShrinked         (ScalarMap_ptr thePrs);
+    virtual CORBA::Boolean   IsShaded           (ScalarMap_ptr thePrs);
+    virtual CORBA::Double    GetOpacity         (ScalarMap_ptr thePrs);
+    virtual CORBA::Double    GetLineWidth       (ScalarMap_ptr thePrs);
+    virtual Quadratic2DPresentationType GetQuadratic2DPresentationType(ScalarMap_ptr thePrs);
+
+    virtual char* SetPresentationType(ScalarMap_ptr thePrs, PresentationType thePrsType);
+    virtual char* SetShrinked        (ScalarMap_ptr thePrs, CORBA::Boolean   isShrinked);
+    virtual char* SetShaded          (ScalarMap_ptr thePrs, CORBA::Boolean   isShaded);
+    virtual char* SetOpacity         (ScalarMap_ptr thePrs, CORBA::Double    theOpacity);
+    virtual char* SetLineWidth       (ScalarMap_ptr thePrs, CORBA::Double    theLineWidth);
+    virtual char* SetQuadratic2DPresentationType(ScalarMap_ptr thePrs, Quadratic2DPresentationType theType);
+
   protected:
     static int myNbViewParams;