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 <vtkObject.h>
32 #include "VTKViewer.h"
36 class vtkScalarBarActor;
38 class VISU_ScalarBarCtrl : public vtkObject
41 vtkTypeMacro(VISU_ScalarBarCtrl, vtkObject);
46 enum EMode {eSimple, eGlobal, eLocal};
50 SetMode(EMode theMode);
57 SetRangeGlobal(vtkFloatingPointType theMin,
58 vtkFloatingPointType theMax);
60 SetRangeGlobal(vtkFloatingPointType *theRange);
63 SetGlobalRangeIsDefined(bool theIsDefined);
66 SetRangeLocal(vtkFloatingPointType theMin,
67 vtkFloatingPointType theMax);
69 SetRangeLocal(vtkFloatingPointType *theRange);
86 AddToRender(vtkRenderer* theRenderer);
89 RemoveFromRender(vtkRenderer* theRenderer);
93 SetVisibility(int theFlag);
96 GetVisibility() const;
100 SetCtrlVisibility(int theFlag);
103 GetCtrlVisibility() const;
110 SetWidth(const vtkFloatingPointType theWidth);
116 SetHeight(const vtkFloatingPointType theHeight);
122 SetPosition(const vtkFloatingPointType* thePosition);
124 const vtkFloatingPointType*
129 SetSpacing(const vtkFloatingPointType theSpacing);
139 SetBicolor(const bool theBicolor);
143 SetMarkValue(const vtkFloatingPointType theValue);
146 GetMarkValue() const;
149 SetIsMarked(const bool theFlag);
155 VISU_ScalarBarCtrl();
158 ~VISU_ScalarBarCtrl();
173 PrepareTables(vtkScalarBarActor* theScalarBarActor,
174 vtkLookupTable *theLookupTable,
179 bool myGlobalRangeIsDefined;
181 vtkFloatingPointType myDistance;
182 vtkFloatingPointType myPosition[2];
184 int myCtrlVisibility;
186 unsigned char myBlack[3];
187 unsigned char myGrey[3];
190 vtkFloatingPointType myMarkedValue;
192 vtkScalarBarActor *myGlobalScalarBar;
193 vtkLookupTable *myGlobalLookupTable;
195 vtkScalarBarActor *myLocalScalarBar;
196 vtkLookupTable *myLocalLookupTable;