]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/font.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFont class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 // ----------------------------------------------------------------------------
17 // ----------------------------------------------------------------------------
19 class WXDLLEXPORT wxFont
: public wxFontBase
29 bool underlined
= FALSE
,
30 const wxString
& face
= wxEmptyString
,
31 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
33 (void)Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
36 wxFont(const wxNativeFontInfo
& info
)
41 wxFont(const wxString
& fontDesc
);
47 bool underlined
= FALSE
,
48 const wxString
& face
= wxEmptyString
,
49 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
51 bool Create(const wxNativeFontInfo
& info
);
53 bool MacCreateThemeFont( wxUint16 themeFontID
) ;
57 // implement base class pure virtuals
58 virtual int GetPointSize() const;
59 virtual wxSize
GetPixelSize() const;
60 virtual int GetFamily() const;
61 virtual int GetStyle() const;
62 virtual int GetWeight() const;
63 virtual bool GetUnderlined() const;
64 virtual wxString
GetFaceName() const;
65 virtual wxFontEncoding
GetEncoding() const;
66 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
68 virtual void SetPointSize(int pointSize
);
69 virtual void SetFamily(int family
);
70 virtual void SetStyle(int style
);
71 virtual void SetWeight(int weight
);
72 virtual bool SetFaceName(const wxString
& faceName
);
73 virtual void SetUnderlined(bool underlined
);
74 virtual void SetEncoding(wxFontEncoding encoding
);
76 // implementation only from now on
77 // -------------------------------
79 virtual bool RealizeResource();
81 // Unofficial API, don't use
82 virtual void SetNoAntiAliasing( bool noAA
= TRUE
) ;
83 virtual bool GetNoAntiAliasing() const ;
85 // Mac-specific, risks to change, don't use in portable code
87 // 'old' Quickdraw accessors
89 short MacGetFontNum() const;
90 short MacGetFontSize() const;
91 wxByte
MacGetFontStyle() const;
93 // 'new' ATSUI accessors
95 wxUint32
MacGetATSUFontID() const;
96 wxUint32
MacGetATSUAdditionalQDStyles() const;
97 wxUint16
MacGetThemeFontID() const ;
98 // Returns an ATSUStyle not ATSUStyle*
99 void* MacGetATSUStyle() const ;
104 DECLARE_DYNAMIC_CLASS(wxFont
)