Salome HOME
Restore support of med-2.1 in MEDWrapper
[modules/visu.git] / src / VISU_I / VISU_MonoColorPrs_i.hh
1 //  Copyright (C) 2007-2010  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 //  VISU OBJECT : interactive object for VISU entities implementation
21 //  File   : VISU_MonoColorPrs_i.hxx
22 //  Author : Vitaly Smetannikov
23 //  Module : VISU
24 //
25 #ifndef VISU_MonoColorPrs_i_HeaderFile
26 #define VISU_MonoColorPrs_i_HeaderFile
27
28 #include "VISU_I.hxx"
29 #include "VISU_ScalarMap_i.hh"
30
31 namespace VISU
32 {
33   //----------------------------------------------------------------------------
34   class VISU_I_EXPORT MonoColorPrs_i : public virtual POA_VISU::MonoColorPrs,
35                                        public virtual ScalarMap_i
36   {
37     MonoColorPrs_i(const MonoColorPrs_i&);
38
39   public:
40     //----------------------------------------------------------------------------
41     typedef ScalarMap_i TSuperClass;
42     typedef VISU::MonoColorPrs TInterface;
43
44     explicit MonoColorPrs_i(EPublishInStudyMode thePublishInStudyModep);
45
46     virtual void SameAs(const Prs3d_i* theOrigin);
47
48     virtual ~MonoColorPrs_i();
49
50     virtual CORBA::Boolean IsColored();
51
52     virtual void ShowColored(CORBA::Boolean theColored);
53
54     virtual SALOMEDS::Color GetColor();
55
56     virtual void SetColor(const SALOMEDS::Color& theColor);
57
58   protected:
59     SALOMEDS::Color myColor;
60     bool myIsColored;
61
62   public:
63     virtual Storable* Create(const std::string& theMeshName, 
64                              VISU::Entity theEntity,
65                              const std::string& theFieldName, 
66                              CORBA::Long theTimeStampNumber);
67
68     virtual void ToStream(std::ostringstream& theStr);
69
70     virtual Storable* Restore(SALOMEDS::SObject_ptr theSObject,
71                               const Storable::TRestoringMap& theMap);
72
73     virtual VISU_Actor* CreateActor();
74
75     virtual VISU_Actor* CreateActor(bool toSupressShrinking);
76
77     virtual void UpdateActor(VISU_ActorBase* theActor);
78   };
79 };
80 #endif