]> SALOME platform Git repositories - modules/visu.git/blob - src/VISU_I/VISU_ViewManager_i.hh
Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/visu.git] / src / VISU_I / VISU_ViewManager_i.hh
1 //  Copyright (C) 2007-2008  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 //  VISU OBJECT : interactive object for VISU entities implementation
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 class VISU_ActorBase;
36
37 class SUIT_ViewWindow;
38
39 class SVTK_ViewWindow;
40 class Plot2d_ViewFrame;
41
42 class vtkRenderer;
43 class vtkCamera;
44
45
46 namespace VISU {
47   class Prs3d_i;
48   class Curve_i;
49   class TActorFactory;
50
51   class VISU_I_EXPORT ViewManager_i : public virtual POA_VISU::ViewManager,
52                         public virtual Base_i
53   {
54   public:
55     ViewManager_i(SALOMEDS::Study_ptr theStudy);
56     virtual ~ViewManager_i();
57     virtual VISU::VISUType GetType() { return VISU::TVIEWMANAGER;};
58
59     virtual View3D_ptr    Create3DView();
60     virtual View_ptr      GetCurrentView();
61     virtual TableView_ptr CreateTableView(VISU::Table_ptr theTable);
62     virtual XYPlot_ptr    CreateXYPlot();
63     virtual void          Destroy(View_ptr theView);
64
65   protected:
66     SalomeApp_Application *myApplication;
67   };
68
69   vtkRenderer*     GetRenderer   (SUIT_ViewWindow* theViewWindow);
70   vtkCamera*       GetCamera     (SUIT_ViewWindow* theViewWindow);
71
72   void RepaintView (SUIT_ViewWindow* theViewWindow);
73
74   enum Displaing {eDisplayAll, eDisplay, eDisplayOnly, eErase, eEraseAll};
75   VISU_I_EXPORT VISU_Actor* UpdateViewer (SUIT_ViewWindow* theViewWindow, int theDisplaing, Prs3d_i* thePrs = NULL);
76   void UpdatePlot2d (Plot2d_ViewFrame *theView, int theDisplaying, Curve_i* theCurve);
77
78   VISU_I_EXPORT VISU_Actor* FindActor(SVTK_ViewWindow* theViewWindow, VISU::Prs3d_i* thePrs3d);
79   VISU_I_EXPORT VISU_ActorBase* FindActorBase(SVTK_ViewWindow* theViewWindow, VISU::TActorFactory* theActor);
80
81   void DeleteActors (VISU::Prs3d_i* thePrs);
82   void DeleteActors (VISU::Curve_i* thePrs);
83 }
84
85 #endif