QbLabel.h

00001 #ifndef QBLABEL_H
00002 #define QBLABEL_H
00003 
00004 #include "QbWidget.h"
00005 
00006 class QbLabel : public QbWidget {
00007   SO_NODE_HEADER(QbLabel);
00008   typedef QbWidget inherited;
00009 
00010 public:
00011   static void initClass(void);
00012   QbLabel(void);
00013   SoSFString caption;
00014   SoSFEnum textAlignment;
00015   SoSFName fontName;
00016   SoSFColor fontColor;
00017   SoSFBool autoSize;
00018 
00019   virtual void notify(SoNotList * list);
00020 protected:
00021   virtual void setWidgetController(QbWidgetController *controller);
00022   virtual void doResize(const SbVec2f size);
00023 private:
00024   void setUpText();
00025   void sizeToText();
00026 
00027   // this ClipPlane clips text on the left border
00028   SoClipPlane * leftClipPlane; // needs no transform - origin actually is left
00029 
00030   // this ClipPlane clips text on the right border
00031   SoTransformSeparator * rightClipSeperator; // needs to be transformed to the right
00032   SoTranslation * rightClipTranslation;
00033   SoClipPlane * rightClipPlane;
00034 
00035   SoSeparator * textSeparator;
00036   SoTranslation * textTranslation; // needs to be aligned
00037   SoFont * font;
00038   SoBaseColor * color;
00039   SoAsciiText * text;
00040 
00041   //void setupText();
00042 }
00043 ;
00044 
00045 #endif

Generated on Thu Oct 28 10:59:16 2004 for gitk by doxygen 1.3.6