00001 #ifndef TEXTNODE_H
00002 #define TEXTNODE_H
00003
00004 #include "Types.h"
00005 #include "Rendernode.h"
00006 #include "PropertyProxy.h"
00007
00008 using namespace std;
00009
00010 namespace RenderTools{
00011
00012 class TextNode : public Rendernode {
00013 public:
00014
00015 TextNode( void );
00016 virtual ~TextNode( void );
00017
00018 static PropertyPtr create( const XMLNodePtr & xml = XMLNodePtr() );
00019 virtual void createProperties( void );
00020 virtual const string getTypeName( bool ofComponent = false ) const;
00021
00022 virtual void onInitialize( void );
00023 virtual void onRender( void );
00024 static void loadFont( void );
00025 static void setFontSize( int height );
00026 void setText( const string );
00027 const string & getText( void ) const;
00028 NAABB getBounds( void ) const;
00029
00030 private:
00031 string m_text;
00032 #ifdef RT_FTGL
00033 static FTFont * s_font;
00034 #elif RT_GLUT
00035 static void * s_font;
00036 #endif
00037 static string s_fontname;
00038 };
00039
00040 };
00041
00042 #endif