]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/font.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
13 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
29 // ----------------------------------------------------------------------------
31 // ----------------------------------------------------------------------------
33 class wxFont
: public wxFontBase
38 wxFont(const wxFont
& font
) : wxFontBase() { Init(); Ref(font
); }
41 wxFont(const wxString
& fontname
)
48 wxFont(const wxNativeFontInfo
& info
);
54 bool underlined
= false,
55 const wxString
& face
= wxEmptyString
,
56 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
60 (void)Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
67 bool underlined
= false,
68 const wxString
& face
= wxEmptyString
,
69 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
72 bool Create(const wxString
& fontname
);
77 wxFont
& operator=(const wxFont
& font
);
79 // implement base class pure virtuals
80 virtual int GetPointSize() const;
81 virtual int GetFamily() const;
82 virtual int GetStyle() const;
83 virtual int GetWeight() const;
84 virtual wxString
GetFaceName() const;
85 virtual bool GetUnderlined() const;
86 virtual wxFontEncoding
GetEncoding() const;
87 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
88 virtual bool IsFixedWidth() 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
);
98 virtual void SetNoAntiAliasing( bool no
= true );
99 virtual bool GetNoAntiAliasing();
101 // implementation from now on
105 GdkFont
* GetInternalFont(float scale
= 1.0) const;
111 virtual void DoSetNativeFontInfo( const wxNativeFontInfo
& info
);
113 // common part of all ctors
117 DECLARE_DYNAMIC_CLASS(wxFont
)
120 #endif // __GTKFONTH__