]>
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
29 wxFont(const wxFont
& rFont
) { Init(); Ref(rFont
); }
35 ,bool bUnderlined
= FALSE
36 ,const wxString
& rsFace
= wxEmptyString
37 ,wxFontEncoding vEncoding
= wxFONTENCODING_DEFAULT
52 wxFont( const wxNativeFontInfo
& rInfo
64 wxFont(const wxString
& rsFontDesc
);
66 bool Create( int nSize
70 ,bool bUnderlined
= FALSE
71 ,const wxString
& rsFace
= wxEmptyString
72 ,wxFontEncoding vEncoding
= wxFONTENCODING_DEFAULT
74 bool Create( const wxNativeFontInfo
& rInfo
83 wxFont
& operator=(const wxFont
& rFont
);
86 // Implement base class pure virtuals
88 virtual int GetPointSize(void) const;
89 virtual int GetFamily(void) const;
90 virtual int GetStyle(void) const;
91 virtual int GetWeight(void) const;
92 virtual bool GetUnderlined(void) const;
93 virtual wxString
GetFaceName(void) const;
94 virtual wxFontEncoding
GetEncoding(void) const;
95 virtual const wxNativeFontInfo
* GetNativeFontInfo() const;
97 virtual void SetPointSize(int nPointSize
);
98 virtual void SetFamily(int nFamily
);
99 virtual void SetStyle(int nStyle
);
100 virtual void SetWeight(int nWeight
);
101 virtual void SetFaceName(const wxString
& rsFaceName
);
102 virtual void SetUnderlined(bool bUnderlined
);
103 virtual void SetEncoding(wxFontEncoding vEncoding
);
106 // For internal use only!
109 void SetFM( PFONTMETRICS pFM
113 // Implementation only from now on
114 // -------------------------------
116 virtual bool IsFree(void) const;
117 virtual bool RealizeResource(void);
118 virtual WXHANDLE
GetResourceHandle(void);
119 virtual bool FreeResource(bool bForce
= FALSE
);
121 WXHFONT
GetHFONT(void) const;
124 virtual void DoSetNativeFontInfo(const wxNativeFontInfo
& rInfo
);
127 // Common part of all ctors
133 DECLARE_DYNAMIC_CLASS(wxFont
)
136 #endif // _WX_FONT_H_