Salome HOME
Fix for the "0051899: curves are not shown in opened study" issue.
[modules/visu.git] / src / VISU_I / VISU_ViewManager_i.hh
1 // Copyright (C) 2007-2013  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
23 //  VISU OBJECT : interactive object for VISU entities implementation
24 //  File   : VISU_ViewManager_i.hh
25 //  Author : Alexey PETROV
26 //  Module : VISU
27 //
28 #ifndef VISU_ViewManager_i_HeaderFile
29 #define VISU_ViewManager_i_HeaderFile
30
31 #include "VISUConfig.hh"
32
33 class SalomeApp_Application;
34
35 class VISU_Actor;
36 class VISU_ActorBase;
37
38 class SUIT_ViewWindow;
39
40 class SVTK_ViewWindow;
41 class Plot2d_ViewFrame;
42
43 class vtkRenderer;
44 class vtkCamera;
45
46
47 namespace VISU {
48   class Prs3d_i;
49   class Curve_i;
50   class TActorFactory;
51
52   class VISU_I_EXPORT ViewManager_i : public virtual POA_VISU::ViewManager,
53                         public virtual Base_i
54   {
55   public:
56     ViewManager_i(SALOMEDS::Study_ptr theStudy);
57     virtual ~ViewManager_i();
58     virtual VISU::VISUType GetType() { return VISU::TVIEWMANAGER;};
59
60     virtual View3D_ptr    Create3DView();
61     virtual View_ptr      GetCurrentView();
62     virtual TableView_ptr CreateTableView(VISU::Table_ptr theTable);
63     virtual XYPlot_ptr    CreateXYPlot();
64     virtual void          Destroy(View_ptr theView);
65
66   protected:
67     SalomeApp_Application *myApplication;
68   };
69
70   vtkRenderer*     GetRenderer   (SUIT_ViewWindow* theViewWindow);
71   vtkCamera*       GetCamera     (SUIT_ViewWindow* theViewWindow);
72
73   void RepaintView (SUIT_ViewWindow* theViewWindow);
74
75   enum Displaing {eDisplayAll, eDisplay, eDisplayOnly, eErase, eEraseAll, eUpdateData};
76   VISU_I_EXPORT VISU_Actor* UpdateViewer (SUIT_ViewWindow* theViewWindow, int theDisplaing, Prs3d_i* thePrs = NULL);
77   void UpdatePlot2d (Curve_i* theCurve, int theDisplaying, Plot2d_ViewFrame* theView = NULL);
78
79   VISU_I_EXPORT VISU_Actor* FindActor(SVTK_ViewWindow* theViewWindow, VISU::Prs3d_i* thePrs3d);
80   VISU_I_EXPORT VISU_ActorBase* FindActorBase(SVTK_ViewWindow* theViewWindow, VISU::TActorFactory* theActor);
81
82   void DeleteActors (VISU::Prs3d_i* thePrs);
83   void DeleteActors (VISU::Curve_i* thePrs);
84 }
85
86 #endif