]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/font.h
correcting import/export (_adv gave linking errors)
[wxWidgets.git] / include / wx / mac / carbon / font.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: font.h
3// Purpose: wxFont class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
8cf73271
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_FONT_H_
13#define _WX_FONT_H_
14
8cf73271
SC
15// ----------------------------------------------------------------------------
16// wxFont
17// ----------------------------------------------------------------------------
18
19class WXDLLEXPORT wxFont : public wxFontBase
20{
21public:
22 // ctors and such
f8855e47 23 wxFont() { }
8cf73271
SC
24
25 wxFont(int size,
26 int family,
27 int style,
28 int weight,
29 bool underlined = FALSE,
30 const wxString& face = wxEmptyString,
31 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
32 {
8cf73271
SC
33 (void)Create(size, family, style, weight, underlined, face, encoding);
34 }
35
36 wxFont(const wxNativeFontInfo& info)
37 {
8cf73271
SC
38 (void)Create(info);
39 }
40
41 wxFont(const wxString& fontDesc);
42
43 bool Create(int size,
44 int family,
45 int style,
46 int weight,
47 bool underlined = FALSE,
48 const wxString& face = wxEmptyString,
49 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
50
51 bool Create(const wxNativeFontInfo& info);
52
4f305456 53 bool MacCreateThemeFont( wxUint16 themeFontID ) ;
ebf2a1ec
SC
54#ifdef __LP64__
55 bool MacCreateUIFont( wxUint32 coreTextFontType );
56#endif
4f305456 57
8cf73271
SC
58 virtual ~wxFont();
59
8cf73271
SC
60 // implement base class pure virtuals
61 virtual int GetPointSize() const;
ccd67a6a 62 virtual wxSize GetPixelSize() const;
8cf73271
SC
63 virtual int GetFamily() const;
64 virtual int GetStyle() const;
65 virtual int GetWeight() const;
66 virtual bool GetUnderlined() const;
67 virtual wxString GetFaceName() const;
68 virtual wxFontEncoding GetEncoding() const;
69 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
70
71 virtual void SetPointSize(int pointSize);
72 virtual void SetFamily(int family);
73 virtual void SetStyle(int style);
74 virtual void SetWeight(int weight);
85ab460e 75 virtual bool SetFaceName(const wxString& faceName);
8cf73271
SC
76 virtual void SetUnderlined(bool underlined);
77 virtual void SetEncoding(wxFontEncoding encoding);
78
79 // implementation only from now on
80 // -------------------------------
81
82 virtual bool RealizeResource();
83
84 // Unofficial API, don't use
85 virtual void SetNoAntiAliasing( bool noAA = TRUE ) ;
5ac2e80c 86 virtual bool GetNoAntiAliasing() const ;
8cf73271
SC
87
88 // Mac-specific, risks to change, don't use in portable code
7bca6cef 89
ebf2a1ec 90#ifndef __LP64__
7bca6cef 91 // 'old' Quickdraw accessors
4f305456
SC
92 short MacGetFontNum() const;
93 short MacGetFontSize() const;
94 wxByte MacGetFontStyle() const;
7bca6cef
SC
95
96 // 'new' ATSUI accessors
4f305456
SC
97 wxUint32 MacGetATSUFontID() const;
98 wxUint32 MacGetATSUAdditionalQDStyles() const;
99 wxUint16 MacGetThemeFontID() const ;
ebf2a1ec 100
7bca6cef
SC
101 // Returns an ATSUStyle not ATSUStyle*
102 void* MacGetATSUStyle() const ;
ebf2a1ec
SC
103#else
104 const void * MacGetCTFont() const;
105 // soon to be removed for 64bit, Returns an ATSUStyle not ATSUStyle*
106 void* MacGetATSUStyle() const ;
107#endif
7bca6cef 108
83dcd781
PC
109private:
110 void Unshare();
8cf73271 111
8cf73271
SC
112 DECLARE_DYNAMIC_CLASS(wxFont)
113};
114
115#endif
116 // _WX_FONT_H_