1 // VISU OBJECT : interactive object for VISU entities implementation
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
23 // File : VISU_PrsObject_i.hxx
24 // Author : Alexey PETROV
27 #ifndef VISU_ColoredPrs3d_i_HeaderFile
28 #define VISU_ColoredPrs3d_i_HeaderFile
30 #include "VISU_Prs3d_i.hh"
32 class VISU_ScalarMapPL;
36 //============================================================================
37 class ColoredPrs3d_i : public virtual POA_VISU::ColoredPrs3d,
38 public virtual Prs3d_i
41 ColoredPrs3d_i(const ColoredPrs3d_i&);
43 //----------------------------------------------------------------------------
44 typedef Prs3d_i TSuperClass;
47 ColoredPrs3d_i(Result_i* theResult,
50 ColoredPrs3d_i(Result_i* theResult,
51 SALOMEDS::SObject_ptr theSObject);
60 //----------------------------------------------------------------------------
67 SetScalarMode(CORBA::Long theScalarMode);
79 SetNbColors(CORBA::Long theNbColors);
87 SetBarOrientation(VISU::ScalarMap::Orientation theOrientation);
90 VISU::ScalarMap::Orientation
95 SetPosition(CORBA::Double X, CORBA::Double Y);
107 SetSize(CORBA::Double theWidth, CORBA::Double theHeight);
119 SetLabels(CORBA::Long theNbLabels);
127 SetTitle(const char* theName);
133 //----------------------------------------------------------------------------
135 VISU::ScalarMap::Orientation myOrientation;
137 int myNumberOfLabels;
138 float myPosition[2], myWidth, myHeight;
141 //----------------------------------------------------------------------------
144 Create(const char* theMeshName,
145 VISU::Entity theEntity,
146 const char* theFieldName,
151 Restore(const Storable::TRestoringMap& theMap);
155 ToStream(std::ostringstream& theStr);
159 SameAs(const Prs3d_i* theOrigin);
162 * \brief Works like SameAs() method, but keep myIteration value unchanged.
164 * Is used in VISU_TimeAnimation class implementation.
167 SameAsParams(const ColoredPrs3d_i* theOrigin);
169 virtual const VISU::PField&
179 GetFieldName() const;
182 GetIteration() const;
193 SetBoldTitle(bool isBold);
201 SetItalicTitle(bool isItalic);
209 SetShadowTitle(bool isShadow);
217 SetTitFontType(int theType);
221 GetTitleColor(float* theR, float* theG, float* theB);
225 SetTitleColor(float theR, float theG, float theB);
233 SetBoldLabel(bool isBold);
241 SetItalicLabel(bool isItalic);
249 SetShadowLabel(bool isShadow);
257 SetLblFontType(int theType);
261 GetLabelColor(float* theR, float* theG, float* theB);
265 SetLabelColor(float theR, float theG, float theB);
267 //----------------------------------------------------------------------------
271 std::string myFieldName;
276 bool myIsItalicTitle;
277 bool myIsShadowTitle;
279 float myTitleColor[3];
282 bool myIsItalicLabel;
283 bool myIsShadowLabel;
285 float myLabelColor[3];
287 VISU_ScalarMapPL* myScalarMapPL;
292 DoSetInput(Result_i* theResult) = 0;
295 Build(int theRestoring);