00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _SO_TEXT_PROPERTY_
00027 #define _SO_TEXT_PROPERTY_
00028
00029 #include <Inventor/nodes/SoNode.h>
00030 #include <Inventor/fields/SoSFEnum.h>
00031 #include <Inventor/fields/SoSFBool.h>
00032 #include <Inventor/fields/SoSFVec2i32.h>
00033 #include <Inventor/fields/SoSFBitMask.h>
00034 #include <Inventor/fields/SoSFFloat.h>
00035 #include <Inventor/fields/SoMFColorRGBA.h>
00036 #include <Inventor/fields/SoMFBool.h>
00037 #include <Inventor/elements/SoTextStyleElement.h>
00038
00140 class SoTextProperty : public SoNode {
00141
00142 SO_NODE_HEADER(SoTextProperty) ;
00143
00144 public:
00148 SoTextProperty();
00149
00154 inline virtual void setOverride(const SbBool state)
00155 { override.setValue(state); }
00156
00160 inline virtual SbBool isOverride() const
00161 { return override.getValue(); }
00162
00181 SoSFFloat aliasingFactor;
00182
00184 enum AlignmentH {
00188 LEFT = 0x01,
00189
00193 CENTER = 0x03,
00194
00198 RIGHT = 0x02
00199 };
00200
00213 SoSFEnum alignmentH;
00214
00216 enum AlignmentV {
00220 TOP = 0x01,
00221
00225 HALF = 0x03,
00226
00230 BASE = 0x04,
00231
00235 BOTTOM = 0x05
00236 };
00237
00248 SoSFEnum alignmentV;
00249
00258 SoSFFloat backFrameLineWidth;
00259
00266 SoSFBool kerning ;
00267
00269 enum Orientation {
00273 LEFT_TO_RIGHT = 0x01,
00274
00278 RIGHT_TO_LEFT = 0x02,
00279
00283 TOP_TO_BOTTOM = 0x03,
00284
00288 BOTTOM_TO_TOP = 0x04
00289 };
00290
00296 SoSFEnum orientation;
00297
00308 SoSFVec2i32 textureQualityRange;
00309
00311 enum Style
00312 {
00314 NONE = SoTextStyleElement::NONE,
00316 UNDERLINE = SoTextStyleElement::UNDERLINE,
00318 STRIKETHROUGH = SoTextStyleElement::STRIKETHROUGH,
00320 DOUBLE_STRIKETHROUGH = SoTextStyleElement::DOUBLE_STRIKETHROUGH,
00322 BACK_FRAME = SoTextStyleElement::BACK_FRAME,
00324 BACK_FRAME_LINE = SoTextStyleElement::BACK_FRAME_LINE,
00326 OVERLINE = SoTextStyleElement::OVERLINE
00327 };
00328
00338 SoSFBitMask style;
00339
00343 enum StyleColor
00344 {
00346 UNDERLINE_COLOR,
00348 STRIKETHROUGH_COLOR,
00350 DOUBLE_STRIKETHROUGH_COLOR,
00352 BACK_FRAME_COLOR,
00354 BACK_FRAME_LINE_COLOR,
00356 OVERLINE_COLOR,
00358 NUM_EFFECTS_COLORS
00359 };
00360
00389 SoMFColorRGBA styleColors;
00390
00399 SoSFFloat margin;
00400
00410 SoMFBool styleColorsUseCurrentMaterial;
00411
00421 SoSFFloat characterSpacing;
00422
00436 SoSFBool enableTextAccumulation;
00437
00438 private:
00439 virtual void doAction(SoAction *action);
00440 virtual void GLRender(SoGLRenderAction *action);
00441 virtual void callback(SoCallbackAction *action);
00442 virtual void pick(SoPickAction *action);
00443 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
00444 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
00445
00446 private:
00447
00448 static void initClass();
00449 static void exitClass();
00450
00451 SoSFBool override;
00452
00453 private:
00454 virtual ~SoTextProperty();
00455 } ;
00456
00457
00458
00459 #endif // _SO_TEXT_PROPERTY_
00460
00461
00462
00463
00464