Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGTextFaceFactory.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #ifndef _OSGTEXTFACEFACTORY_H_
00040 #define _OSGTEXTFACEFACTORY_H_
00041 
00042 #ifdef _MSC_VER
00043 # pragma once
00044 #endif
00045 
00046 
00047 #include <OSGConfig.h>
00048 #include <OSGSystemDef.h>
00049 #include <OSGBaseTypes.h>
00050 
00051 #include "OSGTextFace.h"
00052 #include "OSGTextTXFParam.h"
00053 
00054 #include <map>
00055 #include <vector>
00056 #include <string>
00057 
00058 
00059 OSG_BEGIN_NAMESPACE
00060 
00061 
00062 class TextBackend;
00063 class TextVectorFace;
00064 class TextPixmapFace;
00065 class TextTXFFace;
00066 
00067 
00078 class OSG_SYSTEMLIB_DLLMAPPING TextFaceFactory
00079 {
00080     /*==========================  PUBLIC  =================================*/
00081   public:
00082 
00084     ~TextFaceFactory();
00085 
00092     TextVectorFace *createVectorFace(const std::string &family, 
00093                                      TextFace::Style style = TextFace::STYLE_PLAIN);
00094 
00102     TextPixmapFace *createPixmapFace(const std::string &family, 
00103                                      TextFace::Style style = TextFace::STYLE_PLAIN, 
00104                                      UInt32 size = 32);
00105 
00114     TextTXFFace *createTXFFace(const std::string &family,
00115                                TextFace::Style style = TextFace::STYLE_PLAIN,
00116                                const TextTXFParam &param = TextTXFParam());
00117 
00119     void clearCache();
00120 
00126     void getFontFamilies(std::vector<std::string> &families) const;
00127 
00132     static inline TextFaceFactory &the();
00133 
00134     /*==========================  PRIVATE  ================================*/
00135   private:
00136 
00138     TextFaceFactory();
00139 
00141     TextFaceFactory(const TextFaceFactory &);
00142 
00144     const TextFaceFactory &operator=(const TextFaceFactory &);
00145 
00147     static TextFaceFactory _the;
00148 
00150     TextBackend *_backend;
00151 
00153     typedef std::multimap<std::string, TextVectorFace*> VectorFaceMap;
00154 
00156     VectorFaceMap _vectorFaceMap;
00157 
00159     typedef std::multimap<std::string, TextPixmapFace*> PixmapFaceMap;
00160 
00162     PixmapFaceMap _pixmapFaceMap;
00163 
00165     typedef std::multimap<std::string, TextTXFFace*> TXFFaceMap;
00166 
00168     TXFFaceMap _txfFaceMap;
00169 };
00170 
00171 
00172 OSG_END_NAMESPACE
00173 
00174 
00175 #include <OSGTextFaceFactory.inl>
00176 
00177 #define OSGTEXTFACEFACTORY_HEADER_CVSID "@(#)$Id: OSGTextFaceFactory.h,v 1.1 2005/03/03 13:43:06 a-m-z Exp $"
00178 
00179 #endif /* _OSGTEXTFACEFACTORY_H_ */

Generated on Thu Aug 25 04:11:18 2005 for OpenSG by  doxygen 1.4.3