]>
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 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
29 // ----------------------------------------------------------------------------
31 // ----------------------------------------------------------------------------
33 class wxFont
: public wxFontBase
38 wxFont(const wxFont
& font
) { 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;
90 virtual void SetPointSize( int pointSize
);
91 virtual void SetFamily( int family
);
92 virtual void SetStyle( int style
);
93 virtual void SetWeight( int weight
);
94 virtual void SetFaceName( const wxString
& faceName
);
95 virtual void SetUnderlined( bool underlined
);
96 virtual void SetEncoding(wxFontEncoding encoding
);
97 virtual void SetNativeFontInfo( const wxNativeFontInfo
& info
);
99 // implementation from now on
102 GdkFont
* GetInternalFont(float scale
= 1.0) const;
107 // common part of all ctors
111 DECLARE_DYNAMIC_CLASS(wxFont
)
114 #endif // __GTKFONTH__