]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/font.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
19 #include "wx/object.h"
20 #include "wx/string.h"
22 #include "wx/gdiobj.h"
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
34 class wxFontNameDirectory;
37 //-----------------------------------------------------------------------------
39 //-----------------------------------------------------------------------------
42 extern wxFontNameDirectory *wxTheFontNameDirectory;
44 extern const wxChar
* wxEmptyString
;
46 //-----------------------------------------------------------------------------
48 //-----------------------------------------------------------------------------
50 class wxFont
: public wxGDIObject
52 DECLARE_DYNAMIC_CLASS(wxFont
)
56 wxFont( int pointSize
, int family
, int style
, int weight
, bool underlined
= FALSE
,
57 const wxString
& face
= wxEmptyString
);
58 wxFont( const wxFont
& font
);
60 wxFont
& operator = ( const wxFont
& font
);
61 bool operator == ( const wxFont
& font
) const;
62 bool operator != ( const wxFont
& font
) const;
65 int GetPointSize() const;
66 int GetFamily() const;
68 int GetWeight() const;
69 bool GetUnderlined() const;
71 void SetPointSize( int pointSize
);
72 void SetFamily( int family
);
73 void SetStyle( int style
);
74 void SetWeight( int weight
);
75 void SetFaceName( const wxString
& faceName
);
76 void SetUnderlined( bool underlined
);
78 wxString
GetFaceName() const;
79 wxString
GetFamilyString() const;
80 wxString
GetStyleString() const;
81 wxString
GetWeightString() const;
85 wxFont( char *xFontName
);
88 GdkFont
* GetInternalFont(float scale
= 1.0) const;
94 //-----------------------------------------------------------------------------
96 //-----------------------------------------------------------------------------
98 class wxFontNameDirectory: public wxObject
100 DECLARE_DYNAMIC_CLASS(wxFontNameDirectory)
103 wxFontNameDirectory();
104 ~wxFontNameDirectory();
107 void Initialize(int fontid, int family, const char *name);
109 int FindOrCreateFontId(const char *name, int family);
110 char* GetAFMName(int fontid, int weight, int style);
111 int GetFamily(int fontid);
112 int GetFontId(const char *name);
113 char* GetFontName(int fontid);
115 char* GetPostScriptName(int fontid, int weight, int style);
116 char* GetScreenName(int fontid, int weight, int style);
118 class wxHashTable *table;
123 #endif // __GTKFONTH__