24#ifndef _PO_ITEM_LEGEND_
25#define _PO_ITEM_LEGEND_
27#include <MeshViz/graph/PoLegend.h>
29#include <Inventor/fields/SoSFVec2f.h>
30#include <Inventor/fields/SoSFBool.h>
31#include <Inventor/fields/SoMFString.h>
32#include <Inventor/fields/SoMFColor.h>
33#include <Inventor/fields/SoMFUShort.h>
34#include <Inventor/fields/SoMFFloat.h>
99 SO_KIT_CATALOG_ENTRY_HEADER(lineSep) ;
100 SO_KIT_CATALOG_ENTRY_HEADER(lineApp) ;
101 SO_KIT_CATALOG_ENTRY_HEADER(line) ;
103 SO_KIT_CATALOG_ENTRY_HEADER(markerSep) ;
104 SO_KIT_CATALOG_ENTRY_HEADER(markerApp) ;
105 SO_KIT_CATALOG_ENTRY_HEADER(marker) ;
214 const char** _item,
const SbColor *_boxColor=NULL)
215 { init(FALSE, _start, _end, _numItems, _item, _boxColor) ; }
226 static void initClass() ;
227 static void exitClass() ;
231 virtual void setDefaultOnNonWritingFields() ;
238 virtual void setRevertOrder(
float startY,
float endY)
239 { m_revertOrder = (startY <= endY ? TRUE : FALSE) ; }
244 int _numItems,
const char** _item,
const SbColor *_boxColor) ;
247 void computeItemFontSize(
float legend_width,
float legend_height,
int nb_lines,
248 int nb_columns,
float f0,
float *maxTextSizePerCol,
252 void drawBoxLegendBoxesA(
SoGroup *boxBorderGroup,
SoGroup *boxGroup,
253 const SbVec2f &topLeftCorner,
float width,
float height,
257 void drawLines(
int nb_lines,
int nb_columns,
int numItems,
258 const float *maxTextSizePerCol,
const SbVec2f &space_box,
259 const Plimit ¤t_limit) ;
262 void drawHorLine(
SoGroup *lineGroup,
const SbVec2f &orig,
float size,
266 void drawMarkers(
int nb_lines,
int nb_columns,
int numItems,
267 const float *maxTextSizePerCol,
const SbVec2f &space_box,
268 const Plimit ¤t_limit) ;
276 void computeGraphicSizeForValues(
float &width,
float &height,
280 FieldSensorList m_fieldSensorList ;
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Class to build an items ...
PoItemLegend()
Default constructor.
SoMFFloat lineSize
List of sizes for lines.
SoMFString item
List of item names.
SoMFUShort linePattern
Be careful: (lineColor or lineSize or linePattern).getNum() must be greater or equal to item....
SoMFColor markerColor
List of color for markers.
SoSFBool boxVisibility
Visibility of the boxes.
SoSFVec2f start
First point of one of the diagonals of the rectangle delimiting the legend.
SoMFFloat markerSize
List of sizes for markers.
SoMFColor lineColor
List of colors for lines.
SoSFBool lineVisibility
Visibility of the lines.
SoMFColor boxColor
List of colors for the boxes (boxColor.getNum() must be greater or equal to item.getNum(),...
virtual void rebuild()
Forces node-kit rebuilding.
SoSFVec2f end
Second point of the same diagonal.
SoSFBool markerVisibility
Visibility of the markers.
PoItemLegend(const SbVec2f &_start, const SbVec2f &_end, int _numItems, const char **_item, const SbColor *_boxColor=NULL)
Constructor.
SoMFString markerString
The markers are defined by a list of strings.
<a href="IconLegend.html"><img src="extMV.gif" alt="MeshViz" border="0"></a> Abstract class for legen...
Maintains a list of pointers to fields.
Base class for all group nodes.
Multiple-value field containing any number of RGB colors stored as three floats.
Multiple-value field containing any number of floating point values.
Multiple-value field containing any number of strings.
Multiple-value field containing any number of unsigned short integers.
Field containing a single Boolean value.
Field containing a two-dimensional vector.