QbLineEdit.h

00001 #ifndef QBLINEEDIT_H
00002 #define QBLINEEDIT_H
00003 
00004 #include "QbLabel.h"
00005 #include "QbSpacer.h"
00006 
00007 class QbLineEdit : public QbWidget {
00008   SO_NODE_HEADER(QbLineEdit);
00009   typedef QbWidget inherited;
00010 
00011 public:
00012   QbLineEdit(void);
00013   ~QbLineEdit(void);
00014   static void initClass(void);
00015   SoSFString string;
00016   SoSFUShort cursorPos;
00017   virtual void notify(SoNotList * list);
00018   virtual void handleEvent(SoHandleEventAction * action);
00019 protected:
00020   virtual void doKeyDown(const SoKeyboardEvent::Key key);
00021   virtual void doResize(const SbVec2f size);
00022   virtual void doFocus();
00023   virtual void doUnFocus();
00024   virtual void setUp();
00025 private:
00026   void insertChar(const char c);
00027   void deleteChar();
00028   QbLabel * labelHead;
00029   QbLabel * labelTail;
00030   QbSpacer * cursor;
00031 
00032   // this ClipPlane clips text on the left border
00033   SoClipPlane * leftClipPlane; // needs no transform - origin actually is left
00034 
00035   // this ClipPlane clips text on the right border
00036   SoTransformSeparator * rightClipSeperator; // needs to be transformed to the right
00037   SoTranslation * rightClipTranslation;
00038   SoClipPlane * rightClipPlane;
00039 
00040   SoNode * cursorModel;
00041 
00042   static const char * DEFAULT_EDIT[];
00043   static const char * DEFAULT_CURSOR[];
00044 };
00045 
00046 #endif

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