]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/font.h
de17523e9f6191c5b7d7f3fb091d54a69e1dfaa8
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
29 // ----------------------------------------------------------------------------
31 // ----------------------------------------------------------------------------
33 class wxFont
: public wxFontBase
38 wxFont(const wxFont
& font
) : wxFontBase() { Init(); Ref(font
); }
39 wxFont(const wxString
& fontname
,
40 wxFontEncoding fontenc
= wxFONTENCODING_DEFAULT
)
44 Create(fontname
, fontenc
);
47 wxFont(const wxNativeFontInfo
& info
);
53 bool underlined
= FALSE
,
54 const wxString
& face
= wxEmptyString
,
55 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
59 (void)Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
66 bool underlined
= FALSE
,
67 const wxString
& face
= wxEmptyString
,
68 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
71 bool Create(const wxString
& fontname
,
72 wxFontEncoding fontenc
= wxFONTENCODING_DEFAULT
);
73 bool Create(const wxNativeFontInfo
& fontinfo
);
78 wxFont
& operator=(const wxFont
& font
);
80 // implement base class pure virtuals
81 virtual int GetPointSize() const;
82 virtual int GetFamily() const;
83 virtual int GetStyle() const;
84 virtual int GetWeight() const;
85 virtual wxString
GetFaceName() const;
86 virtual bool GetUnderlined() const;
87 virtual wxFontEncoding
GetEncoding() const;
88 virtual wxNativeFontInfo
*GetNativeFontInfo() const;
89 virtual bool IsFixedWidth() const;
91 virtual void SetPointSize( int pointSize
);
92 virtual void SetFamily( int family
);
93 virtual void SetStyle( int style
);
94 virtual void SetWeight( int weight
);
95 virtual void SetFaceName( const wxString
& faceName
);
96 virtual void SetUnderlined( bool underlined
);
97 virtual void SetEncoding(wxFontEncoding encoding
);
98 virtual void SetNativeFontInfo( const wxNativeFontInfo
& info
);
100 // implementation from now on
103 GdkFont
* GetInternalFont(float scale
= 1.0) const;
108 // common part of all ctors
111 // do we have the XFLD for this font (or just wxWin description)?
112 inline bool HasNativeFont() const;
115 DECLARE_DYNAMIC_CLASS(wxFont
)
118 #endif // __GTKFONTH__