]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/font.h
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 #include "wx/gdiobj.h"
21 WXDLLEXPORT_DATA(extern const wxChar
*) wxEmptyString
;
23 // ----------------------------------------------------------------------------
25 // ----------------------------------------------------------------------------
27 class WXDLLEXPORT wxFont
: public wxFontBase
32 wxFont(const wxFont
& font
) { Init(); Ref(font
); }
38 bool underlined
= FALSE
,
39 const wxString
& face
= wxEmptyString
,
40 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
)
44 (void)Create(size
, family
, style
, weight
, underlined
, face
, encoding
);
51 bool underlined
= FALSE
,
52 const wxString
& face
= wxEmptyString
,
53 wxFontEncoding encoding
= wxFONTENCODING_DEFAULT
);
58 wxFont
& operator=(const wxFont
& font
);
60 // implement base class pure virtuals
61 virtual int GetPointSize() const;
62 virtual int GetFamily() const;
63 virtual int GetStyle() const;
64 virtual int GetWeight() const;
65 virtual bool GetUnderlined() const;
66 virtual wxString
GetFaceName() const;
67 virtual wxFontEncoding
GetEncoding() const;
69 virtual void SetPointSize(int pointSize
);
70 virtual void SetFamily(int family
);
71 virtual void SetStyle(int style
);
72 virtual void SetWeight(int weight
);
73 virtual void SetFaceName(const wxString
& faceName
);
74 virtual void SetUnderlined(bool underlined
);
75 virtual void SetEncoding(wxFontEncoding encoding
);
77 // implementation only from now on
78 // -------------------------------
80 int GetFontId() const;
81 virtual bool IsFree() const;
82 virtual bool RealizeResource();
83 virtual WXHANDLE
GetResourceHandle();
84 virtual bool FreeResource(bool force
= FALSE
);
86 virtual bool UseResource();
87 virtual bool ReleaseResource();
91 // common part of all ctors
97 DECLARE_DYNAMIC_CLASS(wxFont
)