Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[modules/visu.git] / src / VISU_I / VISU_ViewManager_i.hh
1 //  VISU OBJECT : interactive object for VISU entities implementation
2 //
3 //  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
21 //
22 //
23 //  File   : VISU_ViewManager_i.hh
24 //  Author : Alexey PETROV
25 //  Module : VISU
26
27 #ifndef VISU_ViewManager_i_HeaderFile
28 #define VISU_ViewManager_i_HeaderFile
29
30 #include "VISUConfig.hh"
31
32 class SalomeApp_Application;
33
34 class VISU_Actor;
35
36 class SUIT_ViewWindow;
37
38 class SVTK_ViewWindow;
39 class Plot2d_ViewFrame;
40
41 class vtkRenderer;
42 class vtkCamera;
43
44
45 namespace VISU {
46   class Prs3d_i;
47   class Curve_i;
48
49   class ViewManager_i : public virtual POA_VISU::ViewManager,
50                         public virtual Base_i
51   {
52   public:
53     ViewManager_i(SALOMEDS::Study_ptr theStudy);
54     virtual ~ViewManager_i();
55     virtual VISU::VISUType GetType() { return VISU::TVIEWMANAGER;};
56
57     virtual View3D_ptr    Create3DView();
58     virtual View_ptr      GetCurrentView();
59     virtual TableView_ptr CreateTableView(VISU::Table_ptr theTable);
60     virtual XYPlot_ptr    CreateXYPlot();
61     virtual void          Destroy(View_ptr theView);
62
63   protected:
64     SalomeApp_Application *myApplication;
65   };
66
67   vtkRenderer*     GetRenderer   (SUIT_ViewWindow* theViewWindow);
68   vtkCamera*       GetCamera     (SUIT_ViewWindow* theViewWindow);
69
70   void RepaintView (SUIT_ViewWindow* theViewWindow);
71
72   enum Displaing {eDisplayAll, eDisplay, eDisplayOnly, eErase, eEraseAll};
73   VISU_Actor* UpdateViewer (SUIT_ViewWindow* theViewWindow, int theDisplaing, Prs3d_i* thePrs = NULL);
74   void UpdatePlot2d (Plot2d_ViewFrame *theView, int theDisplaying, Curve_i* theCurve);
75
76   VISU_Actor* GetActor (VISU::Prs3d_i* thePrs, SVTK_ViewWindow* theViewWindow);
77
78   void DeleteActors (VISU::Prs3d_i* thePrs);
79   void DeleteActors (VISU::Curve_i* thePrs);
80 }
81
82 #endif