Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
PoLabelField.h
Go to the documentation of this file.
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23
24#ifndef _PO_LABEL_FIELD_
25#define _PO_LABEL_FIELD_
26
28
34
36
37
73
75
76 /* Define fields for new parts */
78 SO_KIT_CATALOG_ENTRY_HEADER(labelField) ;
79
80
81 public:
82
97
98
99
122
123
124
138
160
161
162
163 /* Fields */
164
169
175
183
188
193
198
204
214
215 /* Methods */
216
221 { init(TRUE) ; }
222
227 PoLabelField(int numPoints, const SbVec2f *_point, const char **_string,
228 const float *_value, float _fontSize,
229 ConcatType type = STRING_BEFORE_VALUE, Justification _justification
230 = LEFT, VerticalJustification _verticalJustification = BASE)
231 { init(FALSE, numPoints, _point, _string, _value, _fontSize, type, _justification,
232 _verticalJustification) ; }
233
242
248
252 virtual void rebuild() ;
253
254 /*----------------------------------------------------------------------------*/
255 private:
256 static void initClass() ;
257 static void exitClass() ;
258
259 private:
260 // Methods
261 // Destructor
262 virtual ~PoLabelField() ;
263 virtual void setDefaultOnNonWritingFields() ;
264 virtual SbBool setUpConnections(SbBool onOff, SbBool doItAlways = FALSE) ;
265
266 // Manage the connection with PbBase objects
267 virtual void basicObjectChange(PbBase *basicObj) ;
268
269 // Overloaded methods
270 virtual void addElementsAllCaches() ;
271 virtual void preRebuild() ;
272
273 private:
274 // Init method
275 void init(SbBool isDefault, int numPoints=0, const SbVec2f *_point=NULL,
276 const char **_string=NULL,
277 const float *_value=NULL, float _fontSize=1.0,
278 ConcatType type = STRING_BEFORE_VALUE, Justification _justification
279 = LEFT, VerticalJustification _verticalJustification = BASE) ;
280
281 // Numeric Display format
282 PbNumericDisplayFormat *m_numericDisplayFormat, *m_defaultNumericDisplayFormat ;
283
284 // Sensors
285 FieldSensorList m_fieldSensorList ;
286
287 // List of fields defined in this class
288 SoFieldList m_fieldList ;
289
290} ;
291
292/*----------------------------------------------------------------------------*/
293
294#endif /* _PO_LABEL_FIELD_ */
295
#define TRUE
Possible value of SbBool.
Definition SbBase.h:77
#define FALSE
Possible value of SbBool.
Definition SbBase.h:75
#define SO_KIT_CATALOG_ENTRY_HEADER(partName)
Definition SoSubKit.h:107
#define SO_KIT_HEADER(className)
Definition SoSubKit.h:91
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for all b...
Definition PbBase.h:49
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to define a numeri...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract base class for ...
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to build a label f...
const PbNumericDisplayFormat * getFormat() const
Gets a reference to a PbNumericDisplayFormat object for the numeric display format for the values.
SoMFString string
List of strings to display.
PoLabelField(int numPoints, const SbVec2f *_point, const char **_string, const float *_value, float _fontSize, ConcatType type=STRING_BEFORE_VALUE, Justification _justification=LEFT, VerticalJustification _verticalJustification=BASE)
Constructor.
SoSFEnum coordinateType
Type of coordinates.
SoSFEnum verticalJustification
Vertical justification.
CoordinateType
Type of coordinates.
@ COORDINATE_IN_CURRENT_UNIT
Coordinates are in current unit.
@ COORDINATE_IN_DOMAIN
Coordinates are in the current domain.
ConcatType
Type of string concatenation.
@ VALUE_BEFORE_STRING
Values are concatenated before strings.
@ VALUE_ABOVE_STRING
Values are concatenated above strings.
@ STRING_BEFORE_VALUE
Strings are concatenated before values.
@ STRING_ABOVE_VALUE
Strings are concatenated above values.
SoSFEnum justification
Horizontal justification.
SoMFVec2f point
List of points which are the coordinates of the strings.
SoSFEnum concatType
Concatenation type between values and strings.
virtual void rebuild()
Forces node-kit rebuilding.
SoSFFloat fontSize
Font size for strings to display.
@ HALF
Strings are aligned on the half of its characters.
@ BASE
Strings are aligned on the base of its characters.
@ BOTTOM
Strings are aligned on the bottom of its characters.
@ TOP
Strings are aligned on the top of its characters.
@ CAP
Strings are aligned on the capital of its characters.
@ RIGHT
Right edges of all string are aligned.
@ LEFT
Left edges of all string are aligned.
@ CENTER
Centered of all strings are aligned.
SoMFFloat value
List of values to display.
PoLabelField()
Default constructor.
void setFormat(PbNumericDisplayFormat *format)
Sets a reference to a PbNumericDisplayFormat object for the numeric display format for the values.
2D vector class.
Definition SbVec.h:76
Maintains a list of pointers to fields.
Definition SoFieldList.h:72
Multiple-value field containing any number of floating point values.
Definition SoMFFloat.h:90
Multiple-value field containing any number of strings.
Definition SoMFString.h:116
Multiple-value field containing any number of two-dimensional vectors.
Definition SoMFVec2f.h:89
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a floating-point value.
Definition SoSFFloat.h:78
int SbBool
Boolean type.
Definition SbBase.h:87