]>
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
24 wxFont(const wxFont
& font
)
35 bool underlined
= FALSE
,
36 const wxString
& face
= wxEmptyString
,
37 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
41 (void)Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
44 wxFont(const wxNativeFontInfo
& info
)
51 wxFont(const wxString
& fontDesc
);
57 bool underlined
= FALSE
,
58 const wxString
& face
= wxEmptyString
,
59 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
61 bool Create(const wxNativeFontInfo
& info
);
63 bool MacCreateThemeFont( wxUint16 themeFontID
) ;
68 wxFont
& operator=(const wxFont
& font
);
70 // implement base class pure virtuals
71 virtual int GetPointSize() const;
72 virtual int GetFamily() const;
73 virtual int GetStyle() const;
74 virtual int GetWeight() const;
75 virtual bool GetUnderlined() const;
76 virtual wxString
GetFaceName() const;
77 virtual wxFontEncoding
GetEncoding() const;
78 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
80 virtual void SetPointSize(int pointSize
);
81 virtual void SetFamily(int family
);
82 virtual void SetStyle(int style
);
83 virtual void SetWeight(int weight
);
84 virtual void SetFaceName(const wxString
& faceName
);
85 virtual void SetUnderlined(bool underlined
);
86 virtual void SetEncoding(wxFontEncoding encoding
);
88 // implementation only from now on
89 // -------------------------------
91 virtual bool RealizeResource();
93 // Unofficial API, don't use
94 virtual void SetNoAntiAliasing( bool noAA
= TRUE
) ;
95 virtual bool GetNoAntiAliasing() const ;
97 // Mac-specific, risks to change, don't use in portable code
99 // 'old' Quickdraw accessors
101 short MacGetFontNum() const;
102 short MacGetFontSize() const;
103 wxByte
MacGetFontStyle() const;
105 // 'new' ATSUI accessors
107 wxUint32
MacGetATSUFontID() const;
108 wxUint32
MacGetATSUAdditionalQDStyles() const;
109 wxUint16
MacGetThemeFontID() const ;
110 // Returns an ATSUStyle not ATSUStyle*
111 void* MacGetATSUStyle() const ;
114 // common part of all ctors
120 DECLARE_DYNAMIC_CLASS(wxFont
)