]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/font.h
410e0bc200abc30f0bc2a0d333bbcc112c716ed2
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
42 (void)Create(nSize
, nFamily
, nStyle
, nWeight
, bUnderlined
, rsFace
, vEncoding
);
45 bool Create( int nSize
49 ,bool bUnderlined
= FALSE
50 ,const wxString
& rsFace
= wxEmptyString
51 ,wxFontEncoding vEncoding
= wxFONTENCODING_DEFAULT
59 wxFont
& operator=(const wxFont
& rFont
);
62 // Implement base class pure virtuals
64 virtual int GetPointSize(void) const;
65 virtual int GetFamily(void) const;
66 virtual int GetStyle(void) const;
67 virtual int GetWeight(void) const;
68 virtual bool GetUnderlined(void) const;
69 virtual wxString
GetFaceName(void) const;
70 virtual wxFontEncoding
GetEncoding(void) const;
71 virtual HPS
GetPS(void) const;
73 virtual void SetPointSize(int nPointSize
);
74 virtual void SetFamily(int nFamily
);
75 virtual void SetStyle(int nStyle
);
76 virtual void SetWeight(int nWeight
);
77 virtual void SetFaceName(const wxString
& rsFaceName
);
78 virtual void SetUnderlined(bool bUnderlined
);
79 virtual void SetEncoding(wxFontEncoding vEncoding
);
80 virtual void SetPS(HPS hPS
);
81 virtual void SetFM( PFONTMETRICS pFM
86 // Implementation only from now on
87 // -------------------------------
89 int GetFontId(void) const;
90 virtual bool IsFree(void) const;
91 virtual bool RealizeResource(void);
92 virtual WXHANDLE
GetResourceHandle(void);
93 virtual bool FreeResource(bool bForce
= FALSE
);
97 // Common part of all ctors
103 void OS2SelectMatchingFontByName(void);
105 DECLARE_DYNAMIC_CLASS(wxFont
)
108 #endif // _WX_FONT_H_