]>
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 #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
);
67 bool MacCreateThemeFont( wxUint16 themeFontID
) ;
72 wxFont
& operator=(const wxFont
& font
);
74 // implement base class pure virtuals
75 virtual int GetPointSize() const;
76 virtual int GetFamily() const;
77 virtual int GetStyle() const;
78 virtual int GetWeight() const;
79 virtual bool GetUnderlined() const;
80 virtual wxString
GetFaceName() const;
81 virtual wxFontEncoding
GetEncoding() const;
82 virtual const wxNativeFontInfo
*GetNativeFontInfo() const;
84 virtual void SetPointSize(int pointSize
);
85 virtual void SetFamily(int family
);
86 virtual void SetStyle(int style
);
87 virtual void SetWeight(int weight
);
88 virtual void SetFaceName(const wxString
& faceName
);
89 virtual void SetUnderlined(bool underlined
);
90 virtual void SetEncoding(wxFontEncoding encoding
);
92 // implementation only from now on
93 // -------------------------------
95 virtual bool RealizeResource();
97 // Unofficial API, don't use
98 virtual void SetNoAntiAliasing( bool noAA
= TRUE
) ;
99 virtual bool GetNoAntiAliasing() const ;
101 // Mac-specific, risks to change, don't use in portable code
103 // 'old' Quickdraw accessors
105 short MacGetFontNum() const;
106 short MacGetFontSize() const;
107 wxByte
MacGetFontStyle() const;
109 // 'new' ATSUI accessors
111 wxUint32
MacGetATSUFontID() const;
112 wxUint32
MacGetATSUAdditionalQDStyles() const;
113 wxUint16
MacGetThemeFontID() const ;
114 // Returns an ATSUStyle not ATSUStyle*
115 void* MacGetATSUStyle() const ;
118 // common part of all ctors
124 DECLARE_DYNAMIC_CLASS(wxFont
)