]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/font.h
4e9a085d73e614f8bf28be7a69cd7181d16a81d1
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
20 #include "wx/object.h"
21 #include "wx/string.h"
23 #include "wx/gdiobj.h"
25 //-----------------------------------------------------------------------------
27 //-----------------------------------------------------------------------------
34 class wxFontNameDirectory
;
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 //extern wxFontNameDirectory *wxTheFontNameDirectory; // defined below
42 //-----------------------------------------------------------------------------
44 //-----------------------------------------------------------------------------
46 class wxFont
: public wxGDIObject
48 DECLARE_DYNAMIC_CLASS(wxFont
)
52 wxFont( int PointSize
, int FontIdOrFamily
, int Style
, int Weight
,
53 bool underlined
= FALSE
, const char *Face
= ( const char *) NULL
);
54 wxFont( int PointSize
, const char *Face
, int Family
, int Style
, int Weight
,
55 bool underlined
= FALSE
);
56 wxFont( const wxFont
& font
);
57 wxFont( const wxFont
* font
);
59 wxFont
& operator = ( const wxFont
& font
);
60 bool operator == ( const wxFont
& font
);
61 bool operator != ( const wxFont
& font
);
64 int GetPointSize(void) const;
65 wxString
GetFaceName(void) const;
66 int GetFamily(void) const;
67 wxString
GetFamilyString(void) const;
68 int GetFontId(void) const;
69 wxString
GetFaceString(void) const;
70 int GetStyle(void) const;
71 wxString
GetStyleString(void) const;
72 int GetWeight(void) const;
73 wxString
GetWeightString(void) const;
74 bool GetUnderlined(void) const;
76 wxFont( char *xFontName
);
80 GdkFont
* GetInternalFont(float scale
= 1.0) const;
85 //-----------------------------------------------------------------------------
87 //-----------------------------------------------------------------------------
89 class wxFontNameDirectory
: public wxObject
91 DECLARE_DYNAMIC_CLASS(wxFontNameDirectory
)
94 wxFontNameDirectory(void);
95 ~wxFontNameDirectory();
97 void Initialize(void);
98 void Initialize(int fontid
, int family
, const char *name
);
100 int FindOrCreateFontId(const char *name
, int family
);
101 char* GetAFMName(int fontid
, int weight
, int style
);
102 int GetFamily(int fontid
);
103 int GetFontId(const char *name
);
104 char* GetFontName(int fontid
);
105 int GetNewFontId(void);
106 char* GetPostScriptName(int fontid
, int weight
, int style
);
107 char* GetScreenName(int fontid
, int weight
, int style
);
110 class wxHashTable
*table
;
114 extern wxFontNameDirectory
*wxTheFontNameDirectory
;
116 #endif // __GTKFONTH__