]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/classic/font.h
misc fixes for wxDirDialog; new wxDD_CHANGE_DIR flag (patch 1478051)
[wxWidgets.git] / include / wx / mac / classic / font.h
CommitLineData
52479aef
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
52479aef
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_FONT_H_
13#define _WX_FONT_H_
14
52479aef
SC
15// ----------------------------------------------------------------------------
16// wxFont
17// ----------------------------------------------------------------------------
18
19class WXDLLEXPORT wxFont : public wxFontBase
20{
21public:
22 // ctors and such
f8855e47 23 wxFont() { }
52479aef
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 {
52479aef
SC
33 (void)Create(size, family, style, weight, underlined, face, encoding);
34 }
35
36 wxFont(const wxNativeFontInfo& info)
37 {
52479aef
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
53 virtual ~wxFont();
54
52479aef
SC
55 // implement base class pure virtuals
56 virtual int GetPointSize() const;
57 virtual int GetFamily() const;
58 virtual int GetStyle() const;
59 virtual int GetWeight() const;
60 virtual bool GetUnderlined() const;
61 virtual wxString GetFaceName() const;
62 virtual wxFontEncoding GetEncoding() const;
63 virtual const wxNativeFontInfo *GetNativeFontInfo() const;
64
65 virtual void SetPointSize(int pointSize);
66 virtual void SetFamily(int family);
67 virtual void SetStyle(int style);
68 virtual void SetWeight(int weight);
69 virtual void SetFaceName(const wxString& faceName);
70 virtual void SetUnderlined(bool underlined);
71 virtual void SetEncoding(wxFontEncoding encoding);
72
73 // implementation only from now on
74 // -------------------------------
75
76 virtual bool RealizeResource();
77
78 // Unofficial API, don't use
79 virtual void SetNoAntiAliasing( bool noAA = TRUE ) ;
5ac2e80c 80 virtual bool GetNoAntiAliasing() const ;
52479aef
SC
81
82 // Mac-specific, risks to change, don't use in portable code
83 short GetMacFontNum() const;
84 short GetMacFontSize() const;
85 wxByte GetMacFontStyle() const;
86 wxUint32 GetMacATSUFontID() const;
87
88protected:
52479aef
SC
89 void Unshare();
90
91private:
92 DECLARE_DYNAMIC_CLASS(wxFont)
93};
94
95#endif
96 // _WX_FONT_H_