Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

glt/fontasci.h

Go to the documentation of this file.
00001 #ifndef GLT_FONTASCI_H
00002 #define GLT_FONTASCI_H
00003 
00004 /*
00005 
00006   GLT OpenGL C++ Toolkit      
00007   Copyright (C) 2000-2002 Nigel Stewart
00008   Email: nigels.com@gmail.com   WWW: http://www.nigels.com/glt/
00009 
00010   This library is free software; you can redistribute it and/or
00011   modify it under the terms of the GNU Lesser General Public
00012   License as published by the Free Software Foundation; either
00013   version 2.1 of the License, or (at your option) any later version.
00014 
00015   This library is distributed in the hope that it will be useful,
00016   but WITHOUT ANY WARRANTY; without even the implied warranty of
00017   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018   Lesser General Public License for more details.
00019 
00020   You should have received a copy of the GNU Lesser General Public
00021   License along with this library; if not, write to the Free Software
00022   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023 
00024 */
00025 
00038 #include <glt/config.h>
00039 #include <glt/font.h>
00040 
00050 class GltFontAscii : public GltFont
00051 {
00052 public:
00054     GltFontAscii(void *data = NULL);
00056     ~GltFontAscii();
00057 
00058     void init(void *);  
00059     void clear(); 
00060 
00061     bool print(const wchar_t ch) const;
00062     bool print(const std::wstring &str) const;
00063 
00064     //
00065     // Convert between raw font data and a GLTF buffer
00066     //
00067 
00068     static bool  makeHeader(std::string &header,const int width,const int height);
00069     static void *getHeader(const void * const h,int &width,int &height);
00070 
00071 private:
00072 
00073     bool print(const char ch) const;        
00074     bool print(const std::string &str) const;
00075 
00076     void compileLists(void *);
00077 
00078     int   _width;
00079     int   _height;
00080     int   _listBase;
00081 };
00082 
00083 #endif

Generated on Tue Nov 5 11:11:03 2002 for GLT by doxygen1.2.18