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.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File: VISU_ScalarBarCtrl.hxx
24 // Author: Peter KURNEV
27 #ifndef VISU_ScalarBarCtrl_HeaderFile
28 #define VISU_ScalarBarCtrl_HeaderFile
30 #include "VISUPipeline.hxx"
32 #include <vtkObject.h>
34 #include "VTKViewer.h"
37 class VISU_LookupTable;
38 class VISU_ScalarBarActor;
40 class VISU_PIPELINE_EXPORT VISU_ScalarBarCtrl : public vtkObject
43 vtkTypeMacro(VISU_ScalarBarCtrl, vtkObject);
48 enum EMode {eSimple, eGlobal, eLocal};
52 SetMode(EMode theMode);
59 SetRangeGlobal(vtkFloatingPointType theMin,
60 vtkFloatingPointType theMax);
62 SetRangeGlobal(vtkFloatingPointType *theRange);
65 SetGlobalRangeIsDefined(bool theIsDefined);
68 SetRangeLocal(vtkFloatingPointType theMin,
69 vtkFloatingPointType theMax);
71 SetRangeLocal(vtkFloatingPointType *theRange);
88 AddToRender(vtkRenderer* theRenderer);
91 RemoveFromRender(vtkRenderer* theRenderer);
95 SetVisibility(int theFlag);
98 GetVisibility() const;
102 SetCtrlVisibility(int theFlag);
105 GetCtrlVisibility() const;
112 SetWidth(const vtkFloatingPointType theWidth);
118 SetHeight(const vtkFloatingPointType theHeight);
124 SetPosition(const vtkFloatingPointType* thePosition);
126 const vtkFloatingPointType*
131 SetSpacing(const vtkFloatingPointType theSpacing);
141 SetBicolor(const bool theBicolor);
145 SetMarkValue(const vtkFloatingPointType theValue);
148 GetMarkValue() const;
151 SetIsMarked(const bool theFlag);
157 VISU_ScalarBarCtrl();
160 ~VISU_ScalarBarCtrl();
175 PrepareTables(VISU_ScalarBarActor* theScalarBarActor,
176 VISU_LookupTable *theLookupTable,
181 bool myGlobalRangeIsDefined;
183 vtkFloatingPointType myDistance;
184 vtkFloatingPointType myPosition[2];
186 int myCtrlVisibility;
188 unsigned char myBlack[3];
189 unsigned char myGrey[3];
192 vtkFloatingPointType myMarkedValue;
194 VISU_ScalarBarActor *myGlobalScalarBar;
195 VISU_LookupTable *myGlobalLookupTable;
197 VISU_ScalarBarActor *myLocalScalarBar;
198 VISU_LookupTable *myLocalLookupTable;