]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/classic/font.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFont class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "font.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 class WXDLLEXPORT wxFont
: public wxFontBase
28 wxFont(const wxFont
& font
)
39 bool underlined
= FALSE
,
40 const wxString
& face
= wxEmptyString
,
41 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
45 (void)Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
48 wxFont(const wxNativeFontInfo
& info
)
55 wxFont(const wxString
& fontDesc
);
61 bool underlined
= FALSE
,
62 const wxString
& face
= wxEmptyString
,
63 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
65 bool Create(const wxNativeFontInfo
& info
);
70 wxFont
& operator=(const wxFont
& font
);
72 // implement base class pure virtuals
73 virtual int GetPointSize() const;
74 virtual int GetFamily() const;
75 virtual int GetStyle() const;
76 virtual int GetWeight() const;
77 virtual bool GetUnderlined() const;
78 virtual wxString
GetFaceName() const;
79 virtual wxFontEncoding
GetEncoding() const;
80 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
82 virtual void SetPointSize(int pointSize
);
83 virtual void SetFamily(int family
);
84 virtual void SetStyle(int style
);
85 virtual void SetWeight(int weight
);
86 virtual void SetFaceName(const wxString
& faceName
);
87 virtual void SetUnderlined(bool underlined
);
88 virtual void SetEncoding(wxFontEncoding encoding
);
90 // implementation only from now on
91 // -------------------------------
93 virtual bool RealizeResource();
95 // Unofficial API, don't use
96 virtual void SetNoAntiAliasing( bool noAA
= TRUE
) ;
97 virtual bool GetNoAntiAliasing() ;
99 // Mac-specific, risks to change, don't use in portable code
100 short GetMacFontNum() const;
101 short GetMacFontSize() const;
102 wxByte
GetMacFontStyle() const;
103 wxUint32
GetMacATSUFontID() const;
106 // common part of all ctors
112 DECLARE_DYNAMIC_CLASS(wxFont
)