]>
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"
18 WXDLLEXPORT_DATA(extern const wxChar
*) wxEmptyString
;
20 // ----------------------------------------------------------------------------
22 // ----------------------------------------------------------------------------
24 class WXDLLEXPORT wxFont
: public wxFontBase
34 ,bool bUnderlined
= false
35 ,const wxString
& rsFace
= wxEmptyString
36 ,wxFontEncoding vEncoding
= wxFONTENCODING_DEFAULT
49 wxFont( const wxNativeFontInfo
& rInfo
59 wxFont(const wxString
& rsFontDesc
);
61 bool Create( int nSize
65 ,bool bUnderlined
= false
66 ,const wxString
& rsFace
= wxEmptyString
67 ,wxFontEncoding vEncoding
= wxFONTENCODING_DEFAULT
69 bool Create( const wxNativeFontInfo
& rInfo
76 // Implement base class pure virtuals
78 virtual int GetPointSize(void) const;
79 virtual int GetFamily(void) const;
80 virtual int GetStyle(void) const;
81 virtual int GetWeight(void) const;
82 virtual bool GetUnderlined(void) const;
83 virtual wxString
GetFaceName(void) const;
84 virtual wxFontEncoding
GetEncoding(void) const;
85 virtual const wxNativeFontInfo
* GetNativeFontInfo() const;
87 virtual void SetPointSize(int nPointSize
);
88 virtual void SetFamily(int nFamily
);
89 virtual void SetStyle(int nStyle
);
90 virtual void SetWeight(int nWeight
);
91 virtual bool SetFaceName(const wxString
& rsFaceName
);
92 virtual void SetUnderlined(bool bUnderlined
);
93 virtual void SetEncoding(wxFontEncoding vEncoding
);
96 // For internal use only!
99 void SetFM( PFONTMETRICS pFM
103 // Implementation only from now on
104 // -------------------------------
106 virtual bool IsFree(void) const;
107 virtual bool RealizeResource(void);
108 virtual WXHANDLE
GetResourceHandle(void);
109 virtual bool FreeResource(bool bForce
= false);
111 WXHFONT
GetHFONT(void) const;
114 virtual void DoSetNativeFontInfo(const wxNativeFontInfo
& rInfo
);
119 DECLARE_DYNAMIC_CLASS(wxFont
)
122 #endif // _WX_FONT_H_