]>
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 //-----------------------------------------------------------------------------
33 class wxFontNameDirectory
;
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
39 extern wxFontNameDirectory
*wxTheFontNameDirectory
;
40 extern const char* wxEmptyString
;
42 //-----------------------------------------------------------------------------
44 //-----------------------------------------------------------------------------
46 class wxFont
: public wxGDIObject
48 DECLARE_DYNAMIC_CLASS(wxFont
)
52 wxFont( int pointSize
, int family
, int style
, int weight
, bool underlined
= FALSE
,
53 const wxString
& face
= wxEmptyString
);
54 wxFont( const wxFont
& font
);
56 wxFont
& operator = ( const wxFont
& font
);
57 bool operator == ( const wxFont
& font
);
58 bool operator != ( const wxFont
& font
);
61 int GetPointSize() const;
62 int GetFamily() const;
63 int GetFontId() const;
65 int GetWeight() const;
66 bool GetUnderlined() const;
68 void SetPointSize( int pointSize
);
69 void SetFamily( int family
);
70 void SetStyle( int style
);
71 void SetWeight( int weight
);
72 void SetFaceName( const wxString
& faceName
);
73 void SetUnderlined( bool underlined
);
75 wxString
GetFaceName() const;
76 wxString
GetFamilyString() const;
77 wxString
GetStyleString() const;
78 wxString
GetWeightString() const;
82 wxFont( char *xFontName
);
85 GdkFont
* GetInternalFont(float scale
= 1.0) const;
90 //-----------------------------------------------------------------------------
92 //-----------------------------------------------------------------------------
94 class wxFontNameDirectory
: public wxObject
96 DECLARE_DYNAMIC_CLASS(wxFontNameDirectory
)
99 wxFontNameDirectory();
100 ~wxFontNameDirectory();
103 void Initialize(int fontid
, int family
, const char *name
);
105 int FindOrCreateFontId(const char *name
, int family
);
106 char* GetAFMName(int fontid
, int weight
, int style
);
107 int GetFamily(int fontid
);
108 int GetFontId(const char *name
);
109 char* GetFontName(int fontid
);
111 char* GetPostScriptName(int fontid
, int weight
, int style
);
112 char* GetScreenName(int fontid
, int weight
, int style
);
114 class wxHashTable
*table
;
118 #endif // __GTKFONTH__