Salome HOME
065403f80131cde787c2d6028461a5c6faed0f86
[modules/visu.git] / src / VISU_I / VISU_Tools.h
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 //  File   : VISU_Tools.h
21 //  Author : Oleg UVAROV
22 //  Module : VISU
23 //
24 #ifndef VISU_TOOLS_H
25 #define VISU_TOOLS_H
26
27 #include "VISUConfig.hh"
28 #include "VISU_I.hxx"
29
30 #include <Qtx.h>
31
32 #include <SALOMEDSClient_Study.hxx>
33
34 class SPlot2d_Curve;
35 class Plot2d_ViewFrame;
36 class SalomeApp_Study;
37 class SalomeApp_Application;
38 class VISU_ActorBase;
39 class SALOME_Actor;
40
41 namespace VISU 
42 {
43   class Gen_i;
44   class Table_i;
45   class Curve_i;
46   class Container_i;
47
48   /*! Display/Erase/Update a curve presentation.
49    *  Parameter \a frame may be NULL, in this case there is only update without display/erase
50    */
51   VISU_I_EXPORT void                                 UpdateCurve( VISU::Curve_i*,
52                                                                   Plot2d_ViewFrame*,
53                                                                   SPlot2d_Curve*,
54                                                                   int theDisplaying );
55
56   VISU_I_EXPORT void                                 PlotTable( SalomeApp_Study*,
57                                                                 Plot2d_ViewFrame*,
58                                                                 VISU::Table_i*,
59                                                                 int theDisplaying );
60
61   VISU_I_EXPORT void                                 PlotCurve( Plot2d_ViewFrame*,
62                                                                 VISU::Curve_i*,
63                                                                 int theDisplaying );
64
65   VISU_I_EXPORT void                                 PlotRemoveCurve(SalomeApp_Application*,
66                                                                      VISU::Curve_i* );
67
68   VISU_I_EXPORT void                                 PlotContainer( Plot2d_ViewFrame*,
69                                                                     VISU::Container_i*,
70                                                                     int theDisplaying );
71
72   VISU_I_EXPORT void                                 CreatePlot( VISU_Gen_i*,
73                                                                  Plot2d_ViewFrame*,
74                                                                  _PTR(SObject) theTableSO );
75
76   VISU_I_EXPORT void                                 SetVisibilityState(std::string entry, Qtx::VisibilityState state);
77   VISU_I_EXPORT void                                 SetVisibilityState(SALOME_Actor *theActor, Qtx::VisibilityState state);
78
79   VISU_I_EXPORT void                                 CurveVisibilityChanged(VISU::Curve_i* theCurve, 
80                                                                             int theDisplaying,
81                                                                             bool updateCurve,
82                                                                             bool updateTable,
83                                                                             bool updateContainers);
84
85   VISU_I_EXPORT Qtx::VisibilityState                 GetStateByDisplaying(int theDisplaying);
86   VISU_I_EXPORT void                                 updateContainerVisibility(VISU::Container_i* theContainer);
87 }
88
89 #endif