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
00134 class SoTextProperty : public SoNode {
00135
00136 SO_NODE_HEADER(SoTextProperty) ;
00137
00138 public:
00142 SoTextProperty();
00143
00148 inline virtual void setOverride(const SbBool state)
00149 { override.setValue(state); }
00150
00154 inline virtual SbBool isOverride() const
00155 { return override.getValue(); }
00156
00175 SoSFFloat aliasingFactor;
00176
00178 enum AlignmentH {
00182 LEFT = 0x01,
00183
00187 CENTER = 0x03,
00188
00192 RIGHT = 0x02
00193 };
00194
00207 SoSFEnum alignmentH;
00208
00210 enum AlignmentV {
00214 TOP = 0x01,
00215
00219 HALF = 0x03,
00220
00224 BASE = 0x04,
00225
00229 BOTTOM = 0x05
00230 };
00231
00242 SoSFEnum alignmentV;
00243
00252 SoSFFloat backFrameLineWidth;
00253
00260 SoSFBool kerning ;
00261
00263 enum Orientation {
00267 LEFT_TO_RIGHT = 0x01,
00268
00272 RIGHT_TO_LEFT = 0x02,
00273
00277 TOP_TO_BOTTOM = 0x03,
00278
00282 BOTTOM_TO_TOP = 0x04
00283 };
00284
00290 SoSFEnum orientation;
00291
00302 SoSFVec2i32 textureQualityRange;
00303
00305 enum Style
00306 {
00308 NONE = SoTextStyleElement::NONE,
00310 UNDERLINE = SoTextStyleElement::UNDERLINE,
00312 STRIKETHROUGH = SoTextStyleElement::STRIKETHROUGH,
00314 DOUBLE_STRIKETHROUGH = SoTextStyleElement::DOUBLE_STRIKETHROUGH,
00316 BACK_FRAME = SoTextStyleElement::BACK_FRAME,
00318 BACK_FRAME_LINE = SoTextStyleElement::BACK_FRAME_LINE,
00320 OVERLINE = SoTextStyleElement::OVERLINE
00321 };
00322
00332 SoSFBitMask style;
00333
00337 enum StyleColor
00338 {
00340 UNDERLINE_COLOR,
00342 STRIKETHROUGH_COLOR,
00344 DOUBLE_STRIKETHROUGH_COLOR,
00346 BACK_FRAME_COLOR,
00348 BACK_FRAME_LINE_COLOR,
00350 OVERLINE_COLOR,
00352 NUM_EFFECTS_COLORS
00353 };
00354
00383 SoMFColorRGBA styleColors;
00384
00393 SoSFFloat margin;
00394
00404 SoMFBool styleColorsUseCurrentMaterial;
00405
00415 SoSFFloat characterSpacing;
00416
00417 private:
00418 virtual void doAction(SoAction *action);
00419 virtual void GLRender(SoGLRenderAction *action);
00420 virtual void callback(SoCallbackAction *action);
00421 virtual void pick(SoPickAction *action);
00422 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
00423 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
00424
00425 private:
00426
00427 static void initClass();
00428 static void exitClass();
00429
00430 SoSFBool override;
00431
00432 private:
00433 virtual ~SoTextProperty();
00434 } ;
00435
00436
00437
00438 #endif // _SO_TEXT_PROPERTY_
00439
00440
00441
00442
00443