]>
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; // 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
, int Style
, int Weight
,
54 bool underlined
= FALSE
);
55 wxFont( const wxFont
& font
);
56 wxFont( const wxFont
* font
);
58 wxFont
& operator = ( const wxFont
& font
);
59 bool operator == ( const wxFont
& font
);
60 bool operator != ( const wxFont
& font
);
63 int GetPointSize(void) const;
64 wxString
GetFaceName(void) const;
65 int GetFamily(void) const;
66 wxString
GetFamilyString(void) const;
67 int GetFontId(void) const;
68 wxString
GetFaceString(void) const;
69 int GetStyle(void) const;
70 wxString
GetStyleString(void) const;
71 int GetWeight(void) const;
72 wxString
GetWeightString(void) const;
73 bool GetUnderlined(void) const;
75 wxFont( char *xFontName
);
79 GdkFont
* GetInternalFont(float scale
= 1.0) const;
84 //-----------------------------------------------------------------------------
86 //-----------------------------------------------------------------------------
88 class wxFontNameDirectory
: public wxObject
90 DECLARE_DYNAMIC_CLASS(wxFontNameDirectory
)
93 wxFontNameDirectory(void);
94 ~wxFontNameDirectory();
96 void Initialize(void);
97 void Initialize(int fontid
, int family
, const char *name
);
99 int FindOrCreateFontId(const char *name
, int family
);
100 char* GetAFMName(int fontid
, int weight
, int style
);
101 int GetFamily(int fontid
);
102 int GetFontId(const char *name
);
103 char* GetFontName(int fontid
);
104 int GetNewFontId(void);
105 char* GetPostScriptName(int fontid
, int weight
, int style
);
106 char* GetScreenName(int fontid
, int weight
, int style
);
109 class wxHashTable
*table
;
113 extern wxFontNameDirectory
*wxTheFontNameDirectory
;
115 #endif // __GTKFONTH__