MeVisLabToolboxReference
|
SoView2DLegend allows to draw legends on SoView2D. More...
#include <SoView2DLegend.h>
Public Types | |
enum | LegendAlignPosition { LEGEND_TOP, LEGEND_BOTTOM, LEGEND_LEFT, LEGEND_RIGHT } |
enumeration for alignment More... | |
enum | LegendFormat { TEXT_LINE, LINE_TEXT } |
text/line format.. draw a line or the text first? More... | |
Public Member Functions | |
SoView2DLegend () | |
void | toggleLegend () |
Static Public Member Functions | |
static void | initClass () |
Initializes this class. | |
Public Attributes | |
SoSFString | legendString |
the string to be parsed the format for one entry (item) is: $(item rr gg bb line_width line_stipple "text") 0 <= rr,gg,bb <= 255 0 <= line_width <= 16 0 <= line_stipple <= 65535 "text" should NOT contain closing brackets ')' all numbers can be either octal, decimal or hexadecimal | |
SoSFFloat | margin |
the margin of the legend relative to the nearest border | |
SoSFBool | showLegend |
show legend? | |
SoSFEnum | legendFontSize |
set the font size (or set it to 'automatic') | |
SoSFEnum | legendAlignment |
set the alignment | |
SoSFEnum | legendFormat |
text <-> line | |
SoSFBool | textShadow |
text shadow? | |
SoSFBool | drawTheBox |
draw the box? | |
SoSFColor | boxColor |
the color of the box | |
Protected Member Functions | |
virtual void | draw (View2DSliceList *dsl, View2DSlice *dslice, int slice) |
inherited draw method.. parses the string and draws the legend | |
virtual bool | evalEvent (SoView2D *view2d, View2DSliceList *slicelist, View2DEvent *ec, View2DEventPhase phase) |
Called by the SoView2D for each event that happens on the viewer. | |
virtual bool | implementsManagedInteraction () const |
also implements managed interactions | |
virtual bool | implementsManagedInteractionAndClassicEventHandling () const |
this node is a hybrid module providing managed interaction and classic event handling | |
virtual void | fieldChanged (SoSensor *sensor) |
handle changes to editingOn field |
SoView2DLegend allows to draw legends on SoView2D.
Definition at line 70 of file SoView2DLegend.h.
enumeration for alignment
Definition at line 76 of file SoView2DLegend.h.
text/line format.. draw a line or the text first?
Definition at line 84 of file SoView2DLegend.h.
SoView2DLegend::SoView2DLegend | ( | ) |
virtual void SoView2DLegend::draw | ( | View2DSliceList * | dsl, |
View2DSlice * | dslice, | ||
int | slice | ||
) | [protected, virtual] |
inherited draw method.. parses the string and draws the legend
Reimplemented from SoView2DExtension.
virtual bool SoView2DLegend::evalEvent | ( | SoView2D * | view2d, |
View2DSliceList * | slicelist, | ||
View2DEvent * | ec, | ||
View2DEventPhase | phase | ||
) | [protected, virtual] |
Called by the SoView2D for each event that happens on the viewer.
Implement this method if you want to handle events. If this method is called depends on the fields wantsAllEvents
, wantsKeyEvents
, wantsMouseWheelEvents
and the mouse mask given by button1
, button2
, button3
, shift
, control
, alt
. When using the mouse mask (when wantsAllEvents is set to false), the View2DEventPhase
indicates in which phase of the mouse mask you are in.
Reimplemented from SoView2DExtension.
virtual void SoView2DLegend::fieldChanged | ( | SoSensor * | sensor | ) | [protected, virtual] |
handle changes to editingOn field
Reimplemented from SoView2DExtension.
virtual bool SoView2DLegend::implementsManagedInteraction | ( | ) | const [inline, protected, virtual] |
also implements managed interactions
Definition at line 132 of file SoView2DLegend.h.
virtual bool SoView2DLegend::implementsManagedInteractionAndClassicEventHandling | ( | ) | const [inline, protected, virtual] |
this node is a hybrid module providing managed interaction and classic event handling
Reimplemented from SoView2DExtension.
Definition at line 136 of file SoView2DLegend.h.
static void SoView2DLegend::initClass | ( | ) | [static] |
Initializes this class.
Reimplemented from SoView2DExtension.
void SoView2DLegend::toggleLegend | ( | ) |
SoSFColor SoView2DLegend::boxColor |
the color of the box
Definition at line 114 of file SoView2DLegend.h.
SoSFBool SoView2DLegend::drawTheBox |
draw the box?
Definition at line 112 of file SoView2DLegend.h.
SoSFEnum SoView2DLegend::legendAlignment |
set the alignment
Definition at line 106 of file SoView2DLegend.h.
SoSFEnum SoView2DLegend::legendFontSize |
set the font size (or set it to 'automatic')
Definition at line 104 of file SoView2DLegend.h.
SoSFEnum SoView2DLegend::legendFormat |
text <-> line
Definition at line 108 of file SoView2DLegend.h.
SoSFString SoView2DLegend::legendString |
the string to be parsed the format for one entry (item) is: $(item rr gg bb line_width line_stipple "text") 0 <= rr,gg,bb <= 255 0 <= line_width <= 16 0 <= line_stipple <= 65535 "text" should NOT contain closing brackets ')' all numbers can be either octal, decimal or hexadecimal
Definition at line 97 of file SoView2DLegend.h.
SoSFFloat SoView2DLegend::margin |
the margin of the legend relative to the nearest border
Definition at line 100 of file SoView2DLegend.h.
SoSFBool SoView2DLegend::showLegend |
show legend?
Definition at line 102 of file SoView2DLegend.h.
SoSFBool SoView2DLegend::textShadow |
text shadow?
Definition at line 110 of file SoView2DLegend.h.