1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // VISU OBJECT : interactive object for VISU entities implementation
24 // File: VISU_ScalarBarCtrl.hxx
25 // Author: Peter KURNEV
28 #ifndef VISU_ScalarBarCtrl_HeaderFile
29 #define VISU_ScalarBarCtrl_HeaderFile
31 #include "VISUPipeline.hxx"
33 #include <vtkObject.h>
35 #include "VTKViewer.h"
38 class VISU_LookupTable;
39 class VISU_ScalarBarActor;
41 class VISU_PIPELINE_EXPORT VISU_ScalarBarCtrl : public vtkObject
44 vtkTypeMacro(VISU_ScalarBarCtrl, vtkObject);
49 enum EMode {eSimple, eGlobal, eLocal};
53 SetMode(EMode theMode);
60 SetRangeGlobal(double theMin,
63 SetRangeGlobal(double *theRange);
66 SetGlobalRangeIsDefined(bool theIsDefined);
69 SetRangeLocal(double theMin,
72 SetRangeLocal(double *theRange);
89 AddToRender(vtkRenderer* theRenderer);
92 RemoveFromRender(vtkRenderer* theRenderer);
96 SetVisibility(int theFlag);
99 GetVisibility() const;
103 SetCtrlVisibility(int theFlag);
106 GetCtrlVisibility() const;
113 SetWidth(const double theWidth);
119 SetHeight(const double theHeight);
125 SetPosition(const double* thePosition);
132 SetSpacing(const double theSpacing);
142 SetBicolor(const bool theBicolor);
146 SetMarkValue(const double theValue);
149 GetMarkValue() const;
152 SetIsMarked(const bool theFlag);
158 VISU_ScalarBarCtrl();
161 ~VISU_ScalarBarCtrl();
176 PrepareTables(VISU_ScalarBarActor* theScalarBarActor,
177 VISU_LookupTable *theLookupTable,
182 bool myGlobalRangeIsDefined;
185 double myPosition[2];
187 int myCtrlVisibility;
189 unsigned char myBlack[3];
190 unsigned char myGrey[3];
193 double myMarkedValue;
195 VISU_ScalarBarActor *myGlobalScalarBar;
196 VISU_LookupTable *myGlobalLookupTable;
198 VISU_ScalarBarActor *myLocalScalarBar;
199 VISU_LookupTable *myLocalLookupTable;