Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CUI_FixedBMFont.h

Go to the documentation of this file.
00001 
00016 #ifndef CUI_FIXEDBMFONT_H
00017 #define CUI_FIXEDBMFONT_H
00018 
00019 #include "UI_Lib.h"
00020 #include "UI_types.h"
00021 #include "IUI_Renderer.h"
00022 #include "IUI_Font.h"
00023 
00025 
00029 class GLGUI_ENTRY CUI_FixedBMFont : public IUI_Font
00030 {
00031 public:
00033 
00042         CUI_FixedBMFont( IUI_Shader *shader = NULL,
00043                                         int charx = 16, int chary = 24, int xres = 256, int yres = 256,
00044                                         int startoffset = 0 );
00045 
00047         virtual ~CUI_FixedBMFont();
00048 
00050         virtual bool CalculateLookupTable( );
00051 
00053 
00058         virtual bool RenderText( double dtime, IUI_Renderer *renderer, char *text );
00059 
00061 
00064         virtual bool RenderText( double dtime, IUI_Renderer *renderer, char *text, unsigned int columns, unsigned int rows,
00065                                                                 unsigned int startColumn, unsigned int startRow, bool wrap,
00066                                                                 unsigned int &textColumns, unsigned int &textRows,                                                              
00067                                                                 bool invert = false,
00068                                                                 unsigned int cursorPosition = 0, unsigned short cursorType = UI_CURSOR_NONE
00069                                                                 );
00070 
00072         virtual bool Count( char *text, unsigned int columns, unsigned int rows,
00073                                                 bool wrap, unsigned int &textColumns, unsigned int &textRows );
00074 
00076         virtual bool SetShader( IUI_Shader *shader )
00077         { m_shader = shader; CalculateLookupTable(); return false; }
00078 
00080         virtual bool SetCharSize( int charx, int chary )
00081         { m_charx = charx; m_chary = chary; CalculateLookupTable(); return false; }
00082 
00084         virtual bool SetBitmapResolution( int resx, int resy )
00085         { m_resx = resx; m_resy = resy; CalculateLookupTable(); return false; }
00086 
00088         virtual bool SetCharPerRow( int charperrow )
00089         { m_charperrow = charperrow; CalculateLookupTable(); return false; }
00090 
00092         virtual bool SetOffset( int offset )
00093         { m_startoffset = offset; CalculateLookupTable(); return false; }
00094 
00095 protected:
00096 
00098         IUI_Shader *m_shader;
00099 
00101         int m_charx;
00103         int m_chary;
00105         int m_resx;
00107         int m_resy;
00109         int m_charperrow;
00110 
00112         int m_startoffset;
00113 
00115         v4_f *m_textureTable;
00116 
00117 };
00118 
00119 #endif

Generated on Mon Sep 29 23:07:02 2003 for glGUI by doxygen 1.3.4