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
00138 class SoTextProperty : public SoNode {
00139
00140 SO_NODE_HEADER(SoTextProperty) ;
00141
00142 public:
00146 SoTextProperty();
00147
00152 inline virtual void setOverride(const SbBool state)
00153 { override.setValue(state); }
00154
00158 inline virtual SbBool isOverride() const
00159 { return override.getValue(); }
00160
00179 SoSFFloat aliasingFactor;
00180
00182 enum AlignmentH {
00186 LEFT = 0x01,
00187
00191 CENTER = 0x03,
00192
00196 RIGHT = 0x02
00197 };
00198
00211 SoSFEnum alignmentH;
00212
00214 enum AlignmentV {
00218 TOP = 0x01,
00219
00223 HALF = 0x03,
00224
00228 BASE = 0x04,
00229
00233 BOTTOM = 0x05
00234 };
00235
00246 SoSFEnum alignmentV;
00247
00256 SoSFFloat backFrameLineWidth;
00257
00264 SoSFBool kerning ;
00265
00267 enum Orientation {
00271 LEFT_TO_RIGHT = 0x01,
00272
00276 RIGHT_TO_LEFT = 0x02,
00277
00281 TOP_TO_BOTTOM = 0x03,
00282
00286 BOTTOM_TO_TOP = 0x04
00287 };
00288
00294 SoSFEnum orientation;
00295
00306 SoSFVec2i32 textureQualityRange;
00307
00309 enum Style
00310 {
00312 NONE = SoTextStyleElement::NONE,
00314 UNDERLINE = SoTextStyleElement::UNDERLINE,
00316 STRIKETHROUGH = SoTextStyleElement::STRIKETHROUGH,
00318 DOUBLE_STRIKETHROUGH = SoTextStyleElement::DOUBLE_STRIKETHROUGH,
00320 BACK_FRAME = SoTextStyleElement::BACK_FRAME,
00322 BACK_FRAME_LINE = SoTextStyleElement::BACK_FRAME_LINE,
00324 OVERLINE = SoTextStyleElement::OVERLINE
00325 };
00326
00336 SoSFBitMask style;
00337
00341 enum StyleColor
00342 {
00344 UNDERLINE_COLOR,
00346 STRIKETHROUGH_COLOR,
00348 DOUBLE_STRIKETHROUGH_COLOR,
00350 BACK_FRAME_COLOR,
00352 BACK_FRAME_LINE_COLOR,
00354 OVERLINE_COLOR,
00356 NUM_EFFECTS_COLORS
00357 };
00358
00387 SoMFColorRGBA styleColors;
00388
00397 SoSFFloat margin;
00398
00408 SoMFBool styleColorsUseCurrentMaterial;
00409
00419 SoSFFloat characterSpacing;
00420
00421 private:
00422 virtual void doAction(SoAction *action);
00423 virtual void GLRender(SoGLRenderAction *action);
00424 virtual void callback(SoCallbackAction *action);
00425 virtual void pick(SoPickAction *action);
00426 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
00427 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
00428
00429 private:
00430
00431 static void initClass();
00432 static void exitClass();
00433
00434 SoSFBool override;
00435
00436 private:
00437 virtual ~SoTextProperty();
00438 } ;
00439
00440
00441
00442 #endif // _SO_TEXT_PROPERTY_
00443
00444
00445
00446
00447