Back to index

plt-scheme  4.2.1
FontDirectory.h
Go to the documentation of this file.
00001  /*                                                     -*- C++ -*-
00002  * $Id: FontDirectory.h,v 1.8 2005/01/01 14:57:11 eli Exp $
00003  *
00004  * Purpose: wxWindows font name handling
00005  *
00006  * Authors: Markus Holzem, Julian Smart, and Matthew Flatt
00007  *
00008  * Copyright: (C) 2004-2009 PLT Scheme Inc.
00009  * Copyright: (C) 1995, AIAI, University of Edinburgh (Julian)
00010  * Copyright: (C) 1995, GNU (Markus)
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
00025  * USA.
00026  */
00027 
00028 #ifndef FontDirectory_h
00029 #define FontDirectory_h
00030 
00031 #ifdef __GNUG__
00032 # ifndef wx_mac
00033 #  pragma interface
00034 # endif
00035 #endif
00036 
00037 class wxHashTable;
00038 
00039 class wxFontNameDirectory : public wxObject
00040 {
00041   wxHashTable *table;
00042   int nextFontId;
00043  public:
00044   wxFontNameDirectory(void);
00045   ~wxFontNameDirectory();
00046   char *GetScreenName(int fontid, int weight, int style);
00047   char *GetPostScriptName(int fontid, int weight, int style);
00048   void SetScreenName(int fontid, int weight, int style, char *s);
00049   void SetPostScriptName(int fontid, int weight, int style, char *s);
00050 
00051   void Initialize(int fontid, int family, const char *name);
00052   int GetNewFontId(void);
00053   
00054   int FindOrCreateFontId(const char *name, int family);
00055 
00056   int GetFontId(const char *name, int family);
00057   char *GetFontName(int fontid);
00058   int GetFamily(int fontid);
00059 };
00060 
00061 extern wxFontNameDirectory *wxTheFontNameDirectory;
00062 
00063 void wxInitializeFontNameDirectory(void);
00064 
00065 #endif /* FontDirectory_h */