]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/font.h
f7596f241b292a355094e08d4f1d23fa8e3a79dd
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFont class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
16 #pragma interface "font.h"
19 // ----------------------------------------------------------------------------
21 // ----------------------------------------------------------------------------
23 // convert wxFontEncoding into one of Windows XXX_CHARSET constants (fill exact
24 // parameter if it's not NULL with TRUE if encoding is realyl supported under
25 // Windows and FALSE if not and we just chose something close to it)
26 extern int wxCharsetFromEncoding(wxFontEncoding encoding
, bool *exact
= NULL
);
28 // ----------------------------------------------------------------------------
30 // ----------------------------------------------------------------------------
32 class WXDLLEXPORT wxFont
: public wxFontBase
37 wxFont(const wxFont
& font
) { Init(); Ref(font
); }
43 bool underlined
= FALSE
,
44 const wxString
& face
= wxEmptyString
,
45 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
49 (void)Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
56 bool underlined
= FALSE
,
57 const wxString
& face
= wxEmptyString
,
58 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
63 wxFont
& operator=(const wxFont
& font
);
65 // implement base class pure virtuals
66 virtual int GetPointSize() const;
67 virtual int GetFamily() const;
68 virtual int GetStyle() const;
69 virtual int GetWeight() const;
70 virtual bool GetUnderlined() const;
71 virtual wxString
GetFaceName() const;
72 virtual wxFontEncoding
GetEncoding() const;
74 virtual void SetPointSize(int pointSize
);
75 virtual void SetFamily(int family
);
76 virtual void SetStyle(int style
);
77 virtual void SetWeight(int weight
);
78 virtual void SetFaceName(const wxString
& faceName
);
79 virtual void SetUnderlined(bool underlined
);
80 virtual void SetEncoding(wxFontEncoding encoding
);
82 // implementation only from now on
83 // -------------------------------
85 int GetFontId() const;
86 virtual bool IsFree() const;
87 virtual bool RealizeResource();
88 virtual WXHANDLE
GetResourceHandle();
89 virtual bool FreeResource(bool force
= FALSE
);
91 virtual bool UseResource();
92 virtual bool ReleaseResource();
96 // common part of all ctors
102 DECLARE_DYNAMIC_CLASS(wxFont
)