]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/font.h
Fixed comment bug [ 1390056 ] Wrong Documentation for TransferFromWindow
[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
23 wxFont() { Init(); }
24 wxFont(const wxFont& font)
25 : wxFontBase()
26 {
27 Init();
28 Ref(font);
29 }
30
31 wxFont(int size,
32 int family,
33 int style,
34 int weight,
35 bool underlined = FALSE,
36 const wxString& face = wxEmptyString,
37 wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
38 {
39 Init();
40
41 (void)Create(size, family, style, weight, underlined, face, encoding);
42 }
43
44 wxFont(const wxNativeFontInfo& info)
45 {
46 Init();
47
48 (void)Create(info);
49 }
50
51 wxFont(const wxString& fontDesc);
52
53 bool Create(int size,
54 int family,
55 int style,
56 int weight,
57 bool underlined = FALSE,
58 const wxString& face = wxEmptyString,
59 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
60
61 bool Create(const wxNativeFontInfo& info);
62
4f305456
SC
63 bool MacCreateThemeFont( wxUint16 themeFontID ) ;
64
8cf73271
SC
65 virtual ~wxFont();
66
67 // assignment
68 wxFont& operator=(const wxFont& font);
69
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;
79
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);
87
88 // implementation only from now on
89 // -------------------------------
90
91 virtual bool RealizeResource();
92
93 // Unofficial API, don't use
94 virtual void SetNoAntiAliasing( bool noAA = TRUE ) ;
5ac2e80c 95 virtual bool GetNoAntiAliasing() const ;
8cf73271
SC
96
97 // Mac-specific, risks to change, don't use in portable code
7bca6cef
SC
98
99 // 'old' Quickdraw accessors
100
4f305456
SC
101 short MacGetFontNum() const;
102 short MacGetFontSize() const;
103 wxByte MacGetFontStyle() const;
7bca6cef
SC
104
105 // 'new' ATSUI accessors
106
4f305456
SC
107 wxUint32 MacGetATSUFontID() const;
108 wxUint32 MacGetATSUAdditionalQDStyles() const;
109 wxUint16 MacGetThemeFontID() const ;
7bca6cef
SC
110 // Returns an ATSUStyle not ATSUStyle*
111 void* MacGetATSUStyle() const ;
112
8cf73271
SC
113protected:
114 // common part of all ctors
115 void Init();
116
117 void Unshare();
118
119private:
120 DECLARE_DYNAMIC_CLASS(wxFont)
121};
122
123#endif
124 // _WX_FONT_H_