]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/font.h
becbfb1eeb27603cbade952ddcd2b20e7606f592
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 //-----------------------------------------------------------------------------
33 class wxFontNameDirectory
;
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
39 //extern wxFontNameDirectory *wxTheFontNameDirectory; // defined below
41 //-----------------------------------------------------------------------------
43 //-----------------------------------------------------------------------------
45 class wxFont
: public wxGDIObject
47 DECLARE_DYNAMIC_CLASS(wxFont
)
51 wxFont( int PointSize
, int FontIdOrFamily
, int Style
, int Weight
,
52 bool underlined
= FALSE
, const char *Face
= ( const char *) NULL
);
53 wxFont( int PointSize
, const char *Face
, int Family
,
54 int Style
, int Weight
, bool underlined
= FALSE
);
55 wxFont( const wxFont
& font
);
57 wxFont
& operator = ( const wxFont
& font
);
58 bool operator == ( const wxFont
& font
);
59 bool operator != ( const wxFont
& font
);
62 int GetPointSize() const;
63 wxString
GetFaceName() const;
64 int GetFamily() const;
65 wxString
GetFamilyString() const;
66 int GetFontId() const;
67 wxString
GetFaceString() const;
69 wxString
GetStyleString() const;
70 int GetWeight() const;
71 wxString
GetWeightString() const;
72 bool GetUnderlined() const;
74 wxFont( char *xFontName
);
78 GdkFont
* GetInternalFont(float scale
= 1.0) const;
83 //-----------------------------------------------------------------------------
85 //-----------------------------------------------------------------------------
87 class wxFontNameDirectory
: public wxObject
89 DECLARE_DYNAMIC_CLASS(wxFontNameDirectory
)
92 wxFontNameDirectory();
93 ~wxFontNameDirectory();
96 void Initialize(int fontid
, int family
, const char *name
);
98 int FindOrCreateFontId(const char *name
, int family
);
99 char* GetAFMName(int fontid
, int weight
, int style
);
100 int GetFamily(int fontid
);
101 int GetFontId(const char *name
);
102 char* GetFontName(int fontid
);
104 char* GetPostScriptName(int fontid
, int weight
, int style
);
105 char* GetScreenName(int fontid
, int weight
, int style
);
107 class wxHashTable
*table
;
111 extern wxFontNameDirectory
*wxTheFontNameDirectory
;
113 #endif // __GTKFONTH__