#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 () | |
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. | |
Definition at line 70 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.
| static void SoView2DLegend::initClass | ( | ) | [static] |
| SoSFColor SoView2DLegend::boxColor |
| SoSFBool SoView2DLegend::drawTheBox |
| SoSFEnum SoView2DLegend::legendAlignment |
| SoSFEnum SoView2DLegend::legendFontSize |
| SoSFEnum SoView2DLegend::legendFormat |
| 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 |
| SoSFBool SoView2DLegend::textShadow |
1.5.8