]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/font.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFont class
4 // Author: David Webster
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/gdiobj.h"
16 #include "wx/os2/private.h"
17 #include "wx/fontutil.h"
19 WXDLLEXPORT_DATA(extern const wxChar
*) wxEmptyString
;
21 // ----------------------------------------------------------------------------
23 // ----------------------------------------------------------------------------
25 class WXDLLEXPORT wxFont
: public wxFontBase
30 wxFont(const wxFont
& rFont
) { Init(); Ref(rFont
); }
36 ,bool bUnderlined
= FALSE
37 ,const wxString
& rsFace
= wxEmptyString
38 ,wxFontEncoding vEncoding
= wxFONTENCODING_DEFAULT
43 (void)Create(nSize
, nFamily
, nStyle
, nWeight
, bUnderlined
, rsFace
, vEncoding
);
46 wxFont(const wxNativeFontInfo
& rInfo
);
48 bool Create( int nSize
52 ,bool bUnderlined
= FALSE
53 ,const wxString
& rsFace
= wxEmptyString
54 ,wxFontEncoding vEncoding
= wxFONTENCODING_DEFAULT
62 wxFont
& operator=(const wxFont
& rFont
);
65 // Implement base class pure virtuals
67 virtual int GetPointSize(void) const;
68 virtual int GetFamily(void) const;
69 virtual int GetStyle(void) const;
70 virtual int GetWeight(void) const;
71 virtual bool GetUnderlined(void) const;
72 virtual wxString
GetFaceName(void) const;
73 virtual wxFontEncoding
GetEncoding(void) const;
74 virtual HPS
GetPS(void) const;
76 virtual void SetPointSize(int nPointSize
);
77 virtual void SetFamily(int nFamily
);
78 virtual void SetStyle(int nStyle
);
79 virtual void SetWeight(int nWeight
);
80 virtual void SetFaceName(const wxString
& rsFaceName
);
81 virtual void SetUnderlined(bool bUnderlined
);
82 virtual void SetEncoding(wxFontEncoding vEncoding
);
83 virtual void SetPS(HPS hPS
);
84 virtual void SetFM( PFONTMETRICS pFM
89 // Implementation only from now on
90 // -------------------------------
92 int GetFontId(void) const;
93 virtual bool IsFree(void) const;
94 virtual bool RealizeResource(void);
95 virtual WXHANDLE
GetResourceHandle(void);
96 virtual bool FreeResource(bool bForce
= FALSE
);
98 WXHFONT
GetHFONT(void) const;
101 // Common part of all ctors
107 void OS2SelectMatchingFontByName(void);
109 DECLARE_DYNAMIC_CLASS(wxFont
)
112 #endif // _WX_FONT_H_