Class to build an items legend. More...
#include <MeshViz/graph/PoItemLegend.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
virtual const SoNodekitCatalog * | getNodekitCatalog () const |
PoItemLegend () | |
PoItemLegend (const SbVec2f &_start, const SbVec2f &_end, int _numItems, const char **_item, const SbColor *_boxColor=NULL) | |
virtual void | rebuild () |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static const SoNodekitCatalog * | getClassNodekitCatalog () |
Public Attributes | |
SoSFVec2f | start |
SoSFVec2f | end |
SoMFString | item |
SoSFBool | boxVisibility |
SoMFColor | boxColor |
SoSFBool | lineVisibility |
SoMFColor | lineColor |
SoMFFloat | lineSize |
SoMFUShort | linePattern |
SoSFBool | markerVisibility |
SoMFColor | markerColor |
SoMFFloat | markerSize |
SoMFString | markerString |
This legend associates a string (this is the values of the legend) to a box or/and a line or/and a marker. All the sizes cannot be controlled by the application and depend on the dimensions of the legend. The font size F of strings is calculated as function of the rectangle delimiting the legend. The size of the markers is equal to F. The height of the boxes is equal to 1.5 * F, and the width of the lines and of the boxes is equal to 1.5 * F * boxRatio.
titleVisibility | VISIBILITY_OFF |
titlePosition | POS_BOTTOM |
titlePath | RIGHT_PATH |
titleFontSize | 0 |
titleFontName | "" |
titleString | "" |
valueVisibility | VISIBILITY_ON |
valuePosition | POS_RIGHT |
valueFontName | "" |
valueAddStringVisibility | FALSE |
valueAddString | "" |
marginType | REL_MARGIN |
marginLeft | 0.05 |
marginRight | 0.05 |
marginBottom | 0.05 |
marginTop | 0.05 |
incrementType | VERTICAL_INCREMENT |
numColumns | 1 |
boxRatio | 1 |
start | 0 0 |
end | 1 1 |
item | "" |
boxVisibility | TRUE |
boxColor | 0 0 0 |
lineVisibility | FALSE |
lineColor | 0 0 0 |
lineSize | 0 |
linePattern | 0xFFFF |
markerVisibility | FALSE |
markerColor | 0 0 0 |
markerSize | 0 |
markerString | "." |
PoItemLegend::PoItemLegend | ( | ) | [inline] |
Default constructor.
PoItemLegend::PoItemLegend | ( | const SbVec2f & | _start, | |
const SbVec2f & | _end, | |||
int | _numItems, | |||
const char ** | _item, | |||
const SbColor * | _boxColor = NULL | |||
) | [inline] |
Constructor.
static const SoNodekitCatalog* PoItemLegend::getClassNodekitCatalog | ( | ) | [static] |
Returns the SoNodekitCatalog for this class.
Reimplemented from PoLegend.
static SoType PoItemLegend::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from PoLegend.
virtual const SoNodekitCatalog* PoItemLegend::getNodekitCatalog | ( | ) | const [virtual] |
Returns the SoNodekitCatalog for this instance.
Reimplemented from PoLegend.
virtual SoType PoItemLegend::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from PoLegend.
virtual void PoItemLegend::rebuild | ( | ) | [virtual] |
List of colors for the boxes (boxColor.getNum() must be greater or equal to item.getNum(), otherwise all boxes get the same color which is the inherited color).
Visibility of the boxes.
Second point of the same diagonal.
List of item names.
List of colors for lines.
Be careful: (lineColor or lineSize or linePattern).getNum() must be greater or equal to item.getNum() in order to take into account one of these fields, otherwise the inherited attributes will be used.
List of sizes for lines.
Visibility of the lines.
List of color for markers.
Be careful: markerColor.getNum() must be greater or equal to item.getNum() in order to take into account one of this field, otherwise the inherited attributes will be used.
List of sizes for markers.
Be careful: markerSize.getNum() must be greater or equal to item.getNum() in order to take into account one of this field, otherwise the inherited attributes will be used.
The markers are defined by a list of strings.
For each string of markerString equals to ".", the marker is an SoPointSet shape, otherwise an SoText2 shape. Futhermore, only the first character of each string of markerString is used. To change the font of the text markers, set catalog part markerApp.font.name. Be careful, in this version, text markers are not vertically aligned.
Visibility of the markers.
First point of one of the diagonals of the rectangle delimiting the legend.