]>
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
53 wxFont( const wxNativeFontInfo
& rInfo
65 wxFont(const wxString
& rsFontDesc
);
67 bool Create( int nSize
71 ,bool bUnderlined
= FALSE
72 ,const wxString
& rsFace
= wxEmptyString
73 ,wxFontEncoding vEncoding
= wxFONTENCODING_DEFAULT
75 bool Create( const wxNativeFontInfo
& rInfo
84 wxFont
& operator=(const wxFont
& rFont
);
87 // Implement base class pure virtuals
89 virtual int GetPointSize(void) const;
90 virtual int GetFamily(void) const;
91 virtual int GetStyle(void) const;
92 virtual int GetWeight(void) const;
93 virtual bool GetUnderlined(void) const;
94 virtual wxString
GetFaceName(void) const;
95 virtual wxFontEncoding
GetEncoding(void) const;
96 virtual wxNativeFontInfo
* GetNativeFontInfo() const;
98 virtual void SetPointSize(int nPointSize
);
99 virtual void SetFamily(int nFamily
);
100 virtual void SetStyle(int nStyle
);
101 virtual void SetWeight(int nWeight
);
102 virtual void SetFaceName(const wxString
& rsFaceName
);
103 virtual void SetUnderlined(bool bUnderlined
);
104 virtual void SetEncoding(wxFontEncoding vEncoding
);
107 // For internal use only!
110 void SetFM( PFONTMETRICS pFM
114 // Implementation only from now on
115 // -------------------------------
117 virtual bool IsFree(void) const;
118 virtual bool RealizeResource(void);
119 virtual WXHANDLE
GetResourceHandle(void);
120 virtual bool FreeResource(bool bForce
= FALSE
);
122 WXHFONT
GetHFONT(void) const;
125 virtual void DoSetNativeFontInfo(const wxNativeFontInfo
& rInfo
);
128 // Common part of all ctors
134 DECLARE_DYNAMIC_CLASS(wxFont
)
137 #endif // _WX_FONT_H_